]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
Fix various leaks to the global scope.
authorChris Porter <redacted>
Thu, 12 Feb 2009 22:02:54 +0000 (22:02 +0000)
committerChris Porter <redacted>
Thu, 12 Feb 2009 22:02:54 +0000 (22:02 +0000)
js/irc/baseircclient.js
js/jslib.js
js/ui/baseui.js
js/ui/colour.js
js/ui/frontends/qui.js

index c20110ee4402b728d86493ece080d868d181dbcc..38461d633c7eeacc44b95b1de07c1428af5bd7fe 100644 (file)
@@ -262,6 +262,7 @@ qwebirc.irc.BaseIRCClient = new Class({
           return;
         }
 
+        var d;
         if(this.pmodes[mode]) { 
           d = [cmode, mode, xargs[carg++]]
         } else {
index 7a4695e60696527a3f6da8436be5ad7d466a1e3a..63b6c4382409a67341d1754f5d4bcdf5847cf464 100644 (file)
@@ -266,7 +266,7 @@ qwebirc.util.b64Table = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012
 qwebirc.util.b64Encode = function(data) {
   var output = [];
   var table = qwebirc.util.b64Table;
-  for(i=0;i<data.length;) {
+  for(var i=0;i<data.length;) {
     var chr1 = data.charCodeAt(i++);
     var chr2 = data.charCodeAt(i++);
     var chr3 = data.charCodeAt(i++);
index bf896989dda454893ca3d15e02f0cfe3dc572395..7577e35fcc1924d6a5a020fc1cb9786bcc3e7ba8 100644 (file)
@@ -156,6 +156,7 @@ qwebirc.ui.StandardUI = new Class({
     this.uiOptions = new qwebirc.ui.DefaultOptionsClass(this);
     this.customWindows = {};
     
+    var ev;
     if(Browser.Engine.trident) {
       ev = "keydown";
     } else {
index c448e3ad8ded47d567a9f636d0e8681d3aba953a..0dd718984289f977b1cda232c48b01259ec0233a 100644 (file)
@@ -51,7 +51,7 @@ qwebirc.ui.Colourise = function(line, entity, execfn, cmdfn, window) {
     element = document.createElement("span");
   }  
   function emitStartToken() {
-    classes = []
+    var classes = []
     if(fg != undefined)
       classes.push("Xc" + fg);
     if(bg != undefined)
index 9653ea623da1846bcbf54fd9c13fcddf90199758..31f8b2e1e56af3617c04fe51226a79a91255557f 100644 (file)
@@ -553,7 +553,7 @@ qwebirc.ui.QUI.Window = new Class({
     this.parent(type, line, colourClass, e);
   },
   setHilighted: function(state) {
-    laststate = this.hilighted;
+    var laststate = this.hilighted;
     
     this.parent(state);