[Pkg-mozext-commits] [nosquint] 18/47: Import of 2.0.3 release into git

David Prévot taffit at moszumanska.debian.org
Tue Apr 28 01:41:17 UTC 2015


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

taffit pushed a commit to annotated tag 2.1.6
in repository nosquint.

commit 69079d7e6589305a47acb8b94b45fc72c70e4225
Author: Jason Tackaberry <tack at urandom.ca>
Date:   Fri Jan 13 19:41:13 2012 -0500

    Import of 2.0.3 release into git
---
 src/content/browser.js    | 14 ++++----------
 src/content/dlg-site.js   |  6 ++++--
 src/content/interfaces.js |  4 ++--
 src/content/lib.js        |  1 +
 src/install.rdf           |  2 +-
 5 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/src/content/browser.js b/src/content/browser.js
index e94688b..a1a52fc 100644
--- a/src/content/browser.js
+++ b/src/content/browser.js
@@ -78,8 +78,7 @@ NoSquint.browser = NoSquint.ns(function() { with (NoSquint) {
             var browser = gBrowser.selectedBrowser;
             var text = full = false;
             var increment = NSQ.prefs.zoomIncrement * (event.detail < 0 ? 1 : -1);
-            //var img = isImage(browser);
-            var img = false;
+            var img = isImage(browser);
                 
             if (NSQ.prefs.wheelZoomInvert)
                 increment *= -1;
@@ -89,11 +88,8 @@ NoSquint.browser = NoSquint.ns(function() { with (NoSquint) {
             else
                 text = Math.round((browser.markupDocumentViewer.textZoom * 100) + increment);
 
-            //if (!img || !browser.getUserData('nosquint').site) {
-            if (!img) {
-                NSQ.browser.zoom(browser, text, full);
-                NSQ.browser.saveCurrentZoom();
-            }
+            NSQ.browser.zoom(browser, text, full);
+            NSQ.browser.saveCurrentZoom();
         }
         event.stopPropagation();
         event.preventDefault();
@@ -270,10 +266,8 @@ NoSquint.browser = NoSquint.ns(function() { with (NoSquint) {
      * site name user data attached to the browser.
      */
     this.getSiteFromBrowser = function(browser) {
-        if (isChrome(browser)) {
-            debug('getSiteFromBrowser(): isChrome=true, url=' + browser.docShell.document.URL);
+        if (isChrome(browser))
             return null;
-        }
         return NSQ.prefs.getSiteFromURI(browser.currentURI);
     };
 
diff --git a/src/content/dlg-site.js b/src/content/dlg-site.js
index b314cc1..59796c0 100644
--- a/src/content/dlg-site.js
+++ b/src/content/dlg-site.js
@@ -69,9 +69,11 @@ NoSquint.dialogs.site = NoSquint.ns(function() { with (NoSquint) {
 
         for (let [id, defcolor] in items(NSQ.prefs.defaultColors)) {
             $(id).parentNode.childNodes[1].color = (!style || style[id] == '0' ? defcolor : style[id]);
-            $(id).checked = (!style || style[id] == '0' ? false : true);
+            $(id).checked = Boolean(style && style[id] && style[id] != '0');
             this.colorChecked.apply($(id));
         }
+        for (let attr in iter(['colorBackgroundImages', 'linksUnderline']))
+            $(attr).checked = Boolean(style && style[attr] && style[attr] != '0');
         window.focus();
         window.sizeToContent();
     };
@@ -160,7 +162,7 @@ NoSquint.dialogs.site = NoSquint.ns(function() { with (NoSquint) {
                 style.enabled = style.enabled || Boolean(style[attr]);
             }
             for (let attr in iter(['colorBackgroundImages', 'linksUnderline'])) {
-                style[attr] = $(attr).checked;
+                style[attr] = Boolean($(attr).checked);
                 style.enabled = style.enabled || Boolean(style[attr]);
             }
         }
diff --git a/src/content/interfaces.js b/src/content/interfaces.js
index 3e93c57..d958674 100644
--- a/src/content/interfaces.js
+++ b/src/content/interfaces.js
@@ -77,8 +77,8 @@ NoSquint.interfaces = NoSquint.ns(function() { with (NoSquint) {
         },
 
         onStateChange: function(progress, request, state, astatus) {
-            //debug("LISTENER: request=" + request + ", state=" + state + ", status=" + 
-            //      astatus + ", type=" + this.browser.docShell.document.contentType);
+            debug("LISTENER: request=" + request + ", state=" + state + ", status=" + 
+                  astatus + ", type=" + this.browser.docShell.document.contentType);
 
             /* Check the current content type against the content type we initially got.
              * This changes in the case when there's an error page (e.g. dns failure),
diff --git a/src/content/lib.js b/src/content/lib.js
index 0b2e448..d577b02 100644
--- a/src/content/lib.js
+++ b/src/content/lib.js
@@ -130,6 +130,7 @@
 
         // Less common cases that we'll cover with the more expensive regexp.
         return document.contentType.search(/^text\/(plain|css|xml|javascript)/) != 0;
+        //return document.contentType.search(/^text\/(plain|css|xml|javascript)|image\//) != 0;
     };
 
     this.isImage = function(browser) {
diff --git a/src/install.rdf b/src/install.rdf
index 833d27d..ff75159 100644
--- a/src/install.rdf
+++ b/src/install.rdf
@@ -6,7 +6,7 @@
     
         <em:id>nosquint at urandom.ca</em:id>
         <em:name>NoSquint</em:name>
-        <em:version>2.0.3b1</em:version>
+        <em:version>2.0.3</em:version>
         <em:description>Manage site-specific zoom levels and color settings</em:description>
         <em:creator>Jason Tackaberry</em:creator>
         <!-- optional items -->

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



More information about the Pkg-mozext-commits mailing list