[Pkg-mozext-commits] [nosquint] 24/47: Import of 2.0b6 release into git
David Prévot
taffit at moszumanska.debian.org
Tue Apr 28 01:41:18 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 41b344ab796412ff9f265899f5c98084d3fc7807
Author: Jason Tackaberry <tack at urandom.ca>
Date: Fri Jan 13 19:41:14 2012 -0500
Import of 2.0b6 release into git
---
src/content/nosquint.js | 42 ++++++++++++++++++++++++++----------------
src/install.rdf | 2 +-
2 files changed, 27 insertions(+), 17 deletions(-)
diff --git a/src/content/nosquint.js b/src/content/nosquint.js
index 4bcd0a4..314778e 100644
--- a/src/content/nosquint.js
+++ b/src/content/nosquint.js
@@ -207,15 +207,9 @@ var NoSquint = {
/* Handlers for toolar buttons */
buttonEnlarge: function(event) {
- var browser = getBrowser().mCurrentBrowser;
- if (is_image(browser))
- return browser._noSquintFit ? true : NoSquint.enlargeFullZoom();
event.shiftKey ? NoSquint.cmdEnlargeSecondary() : NoSquint.cmdEnlargePrimary();
},
buttonReduce: function(event) {
- var browser = getBrowser().mCurrentBrowser;
- if (is_image(browser))
- return browser._noSquintFit ? true : NoSquint.reduceFullZoom();
event.shiftKey ? NoSquint.cmdReduceSecondary() : NoSquint.cmdReducePrimary();
},
buttonReset: function(event) {
@@ -253,25 +247,37 @@ var NoSquint = {
},
enlargeTextZoom: function() {
- var mdv = getBrowser().mCurrentBrowser.markupDocumentViewer;
+ var browser = getBrowser().mCurrentBrowser;
+ if (is_image(browser))
+ return NoSquint.enlargeFullZoom();
+ var mdv = browser.markupDocumentViewer;
mdv.textZoom = Math.round(mdv.textZoom * 100.0 + NoSquint.zoomIncrement) / 100.0;
NoSquint.saveCurrentZoom();
NoSquint.updateStatus();
},
reduceTextZoom: function() {
- var mdv = getBrowser().mCurrentBrowser.markupDocumentViewer;
+ var browser = getBrowser().mCurrentBrowser;
+ if (is_image(browser))
+ return NoSquint.reduceFullZoom();
+ var mdv = browser.markupDocumentViewer;
mdv.textZoom = Math.round(mdv.textZoom * 100.0 - NoSquint.zoomIncrement) / 100.0;
NoSquint.saveCurrentZoom();
NoSquint.updateStatus();
},
enlargeFullZoom: function() {
- var mdv = getBrowser().mCurrentBrowser.markupDocumentViewer;
+ var browser = getBrowser().mCurrentBrowser;
+ if (is_image(browser) && browser._noSquintFit)
+ return;
+ var mdv = browser.markupDocumentViewer;
mdv.fullZoom = Math.round(mdv.fullZoom * 100.0 + NoSquint.zoomIncrement) / 100.0;
NoSquint.saveCurrentZoom();
NoSquint.updateStatus();
},
reduceFullZoom: function() {
- var mdv = getBrowser().mCurrentBrowser.markupDocumentViewer;
+ var browser = getBrowser().mCurrentBrowser;
+ if (is_image(browser) && browser._noSquintFit)
+ return;
+ var mdv = browser.markupDocumentViewer;
mdv.fullZoom = Math.round(mdv.fullZoom * 100.0 - NoSquint.zoomIncrement) / 100.0;
NoSquint.saveCurrentZoom();
NoSquint.updateStatus();
@@ -885,13 +891,16 @@ var NoSquint = {
if (is_image(browser)) {
if (doc.body.firstChild) {
- browser._noSquintFit = false;
- NoSquint.adjustImage(null, browser, NoSquint.zoomImages ? undefined : -1);
var img = doc.body.firstChild;
- img.addEventListener("click", function(event) {
- if (event.button == 0)
- return NoSquint.adjustImage(event, browser);
- }, true);
+ if (img._noSquintAttached == undefined) {
+ browser._noSquintFit = false;
+ NoSquint.adjustImage(null, browser, NoSquint.zoomImages ? undefined : -1);
+ img.addEventListener("click", function(event) {
+ if (event.button == 0)
+ return NoSquint.adjustImage(event, browser);
+ }, true);
+ img._noSquintAttached = true;
+ }
}
return;
}
@@ -1426,6 +1435,7 @@ ProgressListener.prototype.onLocationChange = function(progress, request, uri) {
ProgressListener.prototype.onStateChange = function(progress, request, state, astatus) {
//debug("LISTENER: request=" + request + ", state=" + state + ", status=" + astatus);
//debug("STATE CHANGE: " + this.browser.docShell.document.contentType);
+ //test for bf: state & Components.interfaces.nsIWebProgressListener.STATE_RESTORING
/* 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/install.rdf b/src/install.rdf
index e145f46..58c7258 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.0b5</em:version>
+ <em:version>2.0b6</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