[Pkg-mozext-commits] [itsalltext] 98/459: Load the Color.js stuff straight into my namespace.

David Prévot taffit at moszumanska.debian.org
Tue Feb 24 23:26:10 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 c039ab7bb7e640b2626450c7e2c127e016d214a6
Author: docwhat at gerf.org <docwhat at gerf.org>
Date:   Thu Feb 1 10:09:58 2007 -0500

    Load the Color.js stuff straight into my namespace.
---
 chrome/content/itsalltext.js  | 8 ++++++--
 chrome/content/itsalltext.xul | 1 -
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/chrome/content/itsalltext.js b/chrome/content/itsalltext.js
index f120bb7..95349ba 100644
--- a/chrome/content/itsalltext.js
+++ b/chrome/content/itsalltext.js
@@ -167,6 +167,10 @@ function ItsAllText() {
   /* Clean the edit directory right now, on startup. */
   that.cleanEditDir();
 
+  /* Load the Color.js file used for the Fade Anything Technique into this object */
+  objScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader);
+  objScriptLoader.loadSubScript('chrome://itsalltext/content/Color.js', that);
+
   /**
    * Dictionary for storing the preferences in.
    * @type Hash
@@ -505,8 +509,8 @@ function ItsAllText() {
      * @param {int} delay  How long to wait between delay (microseconds).
      */
     self.fade = function(steps, delay) {
-      var colEnd = new Color(self.initial_color);
-      var colStart = new Color('yellow');//colEnd.invert();
+      var colEnd = new that.Color(self.initial_color);
+      var colStart = new that.Color('yellow');//colEnd.invert();
       var pallet = colStart.blend(colEnd, steps);
       setTimeout(self.fadeStep(pallet, 0, delay), delay);
     };
diff --git a/chrome/content/itsalltext.xul b/chrome/content/itsalltext.xul
index 80f3dfb..aa4ae90 100644
--- a/chrome/content/itsalltext.xul
+++ b/chrome/content/itsalltext.xul
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/x-javascript" src="Color.js"/>
   <script type="application/x-javascript" src="itsalltext.js"/>
   <!-- The merge point is contentAreaContextMenu -->
   <popup id="contentAreaContextMenu">

-- 
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