[Pkg-mozext-commits] [itsalltext] 82/459: refresher refactorization.
David Prévot
taffit at moszumanska.debian.org
Tue Feb 24 23:26:08 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository itsalltext.
commit 82bd13322488f1dcea0e8f91d4233ed1f0314108
Author: Christian Höltje <docwhat at gerf.org>
Date: Thu Jan 25 22:13:07 2007 -0500
refresher refactorization.
---
chrome/content/itsalltext.js | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/chrome/content/itsalltext.js b/chrome/content/itsalltext.js
index fd47b4c..4598d85 100644
--- a/chrome/content/itsalltext.js
+++ b/chrome/content/itsalltext.js
@@ -666,18 +666,20 @@ function ItsAllTextOverlay() {
return; // Ignore these URLs
}
- var id = null;
- that.refreshDocument(doc);
- id = setInterval(function() {
+ // @todo the referesher needs to be one single function for all windows.
+ var refresher;
+ refresher = function() {
if (doc.location) {
- that.debug('document %s %o "%s"', id, doc, doc.URL);
+ that.debug('document %s %o "%s"', refresher.id, doc, doc.URL);
that.refreshDocument(doc);
} else {
- that.debug('document %s (cancelled)', id);
+ that.debug('document %s (cancelled)', refresher.id);
that.cleanCacheObjs();
- clearInterval(id);
+ clearInterval(refresher.id);
}
- }, that.getRefresh());
+ };
+ that.refreshDocument(doc);
+ refresher.id = setInterval(refresher, that.getRefresh());
return;
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/itsalltext.git
More information about the Pkg-mozext-commits
mailing list