[Pkg-mozext-commits] [personasplus] 01/76: Custom Persona Data:URI Bug Fix

David Prévot taffit at moszumanska.debian.org
Fri Aug 4 21:45:01 UTC 2017


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository personasplus.

commit 42105da2ffa5277a0ef075e5f9a55bba176f0e99
Author: Baris Derin <baris at barisderin.com>
Date:   Mon Jun 20 18:20:44 2016 +0300

     	Custom Persona Data:URI Bug Fix
---
 extension/content/customPersonaEditor.js | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/extension/content/customPersonaEditor.js b/extension/content/customPersonaEditor.js
index 7ba80ae..7d646cb 100644
--- a/extension/content/customPersonaEditor.js
+++ b/extension/content/customPersonaEditor.js
@@ -99,6 +99,10 @@ var CustomPersonaEditor = {
   get _blankImage() {
     return "resource://personas/content/blank.gif"
   },
+  
+  get ex_blankImage() {
+    return "data:image/gif;base64,R0lGODlhAQABAJH/AP///wAAAMDAwAAAACH5BAEAAAIALAAAAAABAAEAAAICVAEAOw=="
+  },
 
   customPersona: null,
 
@@ -143,7 +147,14 @@ var CustomPersonaEditor = {
 
   _restore: function() {
     try {
-      this.customPersona = JSON.parse(this._prefs.get("custom"));
+      var custom = JSON.parse(this._prefs.get("custom"));
+      if(custom.headerURL == this.ex_blankImage) {
+        custom.headerURL = this._blankImage
+      }
+      if(custom.footerURL == this.ex_blankImage) {
+        custom.footerURL = this._blankImage
+      }
+      this.customPersona = custom;
       this.customPersona.custom = true;
     }
     catch(ex) {
@@ -164,9 +175,9 @@ var CustomPersonaEditor = {
     // FIXME: This is a workaround for bug 532741, where the LightweightThemeManager
     // needs a header and footer to be specified in order to preview the persona.
     // Remove the blank image info from the textboxes
-    if (this._header.value == this._blankImage)
+    if (this._header.value == this._blankImage || this._header.value == this.ex_blankImage)
       this._header.value = "";
-    if (this._footer.value == this._blankImage)
+    if (this._footer.value == this._blankImage || this._footer.value == this.ex_blankImage)
       this._footer.value = "";
 
     PersonaService.previewPersona(this.customPersona);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/personasplus.git



More information about the Pkg-mozext-commits mailing list