[Pkg-mozext-commits] [tabmixplus] 02/22: Hinting chrome/content folder
David Prévot
taffit at moszumanska.debian.org
Sun Jan 4 16:46:34 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit d3bc9a62d8a53756a28ca7f54ba072b6e146b11a
Author: onemen <tabmix.onemen at gmail.com>
Date: Thu Dec 4 02:07:08 2014 +0200
Hinting chrome/content folder
---
chrome/content/about.js | 2 +-
chrome/content/changecode.js | 30 +++++++++--------
chrome/content/content.js | 10 +++---
chrome/content/minit/tabView.js | 2 +-
chrome/content/minit/tablib.js | 2 +-
chrome/content/tabmix.js | 73 +++++++++++++++++++++--------------------
chrome/content/utils.js | 42 +++++++++++++-----------
7 files changed, 85 insertions(+), 76 deletions(-)
diff --git a/chrome/content/about.js b/chrome/content/about.js
index 54a9672..1196fb8 100644
--- a/chrome/content/about.js
+++ b/chrome/content/about.js
@@ -1,6 +1,6 @@
"use strict";
-function init() {
+function init() { // jshint ignore:line
var addon = window.arguments[0];
var extensionsStrings = document.getElementById("extensionsStrings");
document.title = extensionsStrings.getFormattedString("aboutWindowTitle", ["Tab Mix Plus"]);
diff --git a/chrome/content/changecode.js b/chrome/content/changecode.js
index 946d0d0..6960549 100644
--- a/chrome/content/changecode.js
+++ b/chrome/content/changecode.js
@@ -1,6 +1,8 @@
-Tabmix._eval = function(name, code) name ? eval(name + " = " + code) : eval("(" + code + ")");
+Tabmix._eval = function(name, code) name ? eval(name + " = " + code) : eval("(" + code + ")"); // jshint ignore:line
// Tabmix._eval is on the first line to help us get the right line number
+/* jshint strict: false */
+
// don't use strict for this file
// so we don't evaluat all code as strict mode code
@@ -38,7 +40,7 @@ Tabmix.changeCode = function(aParent, aName, aOptions) {
if (typeof aParams == "object") {
doReplace = "check" in aParams ? aParams.check : true;
flags = aParams.flags;
- silent = aParams.silent
+ silent = aParams.silent;
}
else if (typeof aParams == "boolean") {
doReplace = aParams;
@@ -85,7 +87,9 @@ Tabmix.changeCode = function(aParent, aName, aOptions) {
if (aShow)
this.show(obj, fnName);
} catch (ex) {
- Components.utils.reportError("Tabmix " + console.callerName() + " failed to change " + this.fullName + "\nError: " + ex.message);
+ Components.utils.reportError("Tabmix " + console.callerName() +
+ " failed to change " + this.fullName +
+ "\nError: " + ex.message);
}
},
@@ -94,7 +98,7 @@ Tabmix.changeCode = function(aParent, aName, aOptions) {
throw "Tabmix:\n" + this.fullName + " don't have setter or getter";
let [obj, fnName] = [aObj || this.obj, aName || this.fnName];
- let descriptor = {enumerable: true, configurable: true}
+ let descriptor = {enumerable: true, configurable: true};
let setDescriptor = function(type) {
let fnType = "__lookup#ter__".replace("#", type);
@@ -130,10 +134,10 @@ Tabmix.changeCode = function(aParent, aName, aOptions) {
var caller = console.getCallerNameByIndex(2);
if (notFoundCount && !this.silent) {
let str = (notFoundCount > 1 ? "s" : "") + "\n ";
- console.clog(caller + " was unable to change " + aName + "."
- + (this.errMsg || "\ncan't find string" + str + this.notFound.join("\n "))
- + "\n\nTry Tabmix latest development version from tmp.garyr.net/tab_mix_plus-dev-build.xpi,"
- + "\nReport about this to Tabmix developer at http://tmp.garyr.net/forum/");
+ console.clog(caller + " was unable to change " + aName + "." +
+ (this.errMsg || "\ncan't find string" + str + this.notFound.join("\n ")) +
+ "\n\nTry Tabmix latest development version from tmp.garyr.net/tab_mix_plus-dev-build.xpi," +
+ "\nReport about this to Tabmix developer at http://tmp.garyr.net/forum/");
if (debugMode)
console.clog(caller + "\nfunction " + aName + " = " + this.value);
}
@@ -141,7 +145,7 @@ Tabmix.changeCode = function(aParent, aName, aOptions) {
console.clog(caller + " no update needed to " + aName);
return false;
}
- }
+ };
let fnName = aName.split(".").pop();
try {
@@ -150,10 +154,10 @@ Tabmix.changeCode = function(aParent, aName, aOptions) {
} catch (ex) {
console.clog(console.callerName() + " failed to change " + aName + "\nError: " + ex.message);
if (debugMode)
- console.obj(aObject, "aObject");
+ console.obj(aParent, "aParent");
}
return null;
-}
+};
Tabmix.setNewFunction = function(aObj, aName, aCode) {
if (!Object.getOwnPropertyDescriptor(aObj, aName)) {
@@ -162,8 +166,8 @@ Tabmix.setNewFunction = function(aObj, aName, aCode) {
}
else
aObj[aName] = aCode;
-}
+};
Tabmix.nonStrictMode = function(aObj, aFn, aArg) {
aObj[aFn].apply(aObj, aArg || []);
-}
+};
diff --git a/chrome/content/content.js b/chrome/content/content.js
index 1615483..77b2b9f 100644
--- a/chrome/content/content.js
+++ b/chrome/content/content.js
@@ -1,6 +1,6 @@
"use strict";
-let {classes: Cc, interfaces: Ci, utils: Cu} = Components;
+let {classes: Cc, interfaces: Ci, utils: Cu} = Components; // jshint ignore:line
Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
@@ -68,7 +68,7 @@ let TabmixContentHandler = {
}
};
-let TabmixClickEventHandler = {
+var TabmixClickEventHandler = {
init: function init() {
global.addEventListener("click", this, true);
},
@@ -109,7 +109,7 @@ let TabmixClickEventHandler = {
let linkNode = href ? node : LinkNodeUtils.getNodeWithOnClick(event.target);
if (linkNode)
linkNode = LinkNodeUtils.wrap(linkNode, this._focusedWindow,
- href && event.button == 0);
+ href && event.button === 0);
let result = sendSyncMessage("TabmixContent:Click",
{json: json, href: href, node: linkNode});
@@ -131,7 +131,7 @@ let TabmixClickEventHandler = {
json.href = href;
if (node) {
json.title = node.getAttribute("title");
- if (event.button == 0 && !event.ctrlKey && !event.shiftKey &&
+ if (event.button === 0 && !event.ctrlKey && !event.shiftKey &&
!event.altKey && !event.metaKey) {
json.bookmark = node.getAttribute("rel") == "sidebar";
if (json.bookmark) {
@@ -198,7 +198,7 @@ let TabmixClickEventHandler = {
let fm = Cc["@mozilla.org/focus-manager;1"].getService(Ci.nsIFocusManager);
let focusedWindow = {};
- let elt = fm.getFocusedElementForWindow(content, true, focusedWindow);
+ fm.getFocusedElementForWindow(content, true, focusedWindow);
return focusedWindow.value;
}
};
diff --git a/chrome/content/minit/tabView.js b/chrome/content/minit/tabView.js
index 2ff650b..e237e8e 100644
--- a/chrome/content/minit/tabView.js
+++ b/chrome/content/minit/tabView.js
@@ -26,7 +26,7 @@
gBrowser.tabContainer._onDelayTabHide = window.setTimeout(function (aEvent) {
gBrowser.tabContainer._onDelayTabHide = null;
let tab = aEvent.target;
- TMP_eventListener.onTabClose_updateTabBar(tab, true);
+ TMP_eventListener.onTabClose_updateTabBar(tab);
}, 0, aEvent);
}
break;
diff --git a/chrome/content/minit/tablib.js b/chrome/content/minit/tablib.js
index 3556b2a..a5d3d10 100644
--- a/chrome/content/minit/tablib.js
+++ b/chrome/content/minit/tablib.js
@@ -193,7 +193,7 @@ var tablib = {
'this._blurTab(aTab);',
'tablib.onRemoveTab(aTab); \
if (Services.prefs.getBoolPref("browser.tabs.animate")) { \
- TMP_eventListener.onTabClose_updateTabBar(aTab, true);\
+ TMP_eventListener.onTabClose_updateTabBar(aTab);\
} \
$&'
)._replace(
diff --git a/chrome/content/tabmix.js b/chrome/content/tabmix.js
index 86df7a5..8058982 100644
--- a/chrome/content/tabmix.js
+++ b/chrome/content/tabmix.js
@@ -23,14 +23,15 @@ Tabmix.startup = function TMP_startup() {
}
}
return true;
- }
+ };
let command = document.getElementById("Tools:PrivateBrowsing");
let originalCode = command.getAttribute("oncommand");
command.setAttribute("oncommand","if (Tabmix._openNewTab(true)) {" + originalCode + "}");
cmdNewWindow.setAttribute("oncommand","if (Tabmix._openNewTab(false)) {" + originalNewNavigator + "}");
}
else
- cmdNewWindow.setAttribute("oncommand","if (Tabmix.singleWindowMode) BrowserOpenTab(); else {" + originalNewNavigator + "}");
+ cmdNewWindow.setAttribute("oncommand","if (Tabmix.singleWindowMode) BrowserOpenTab(); " +
+ "else {" + originalNewNavigator + "}");
TabmixContext.toggleEventListener(true);
@@ -38,7 +39,7 @@ Tabmix.startup = function TMP_startup() {
window.undoCloseTab = function ct_window_undoCloseTab(aIndex, aWhere) {
return TMP_ClosedTabs.undoCloseTab(aIndex, aWhere);
};
-}
+};
// we call this function from gBrowserInit._delayedStartup, see setup.js
Tabmix.beforeSessionStoreInit = function TMP_beforeSessionStoreInit(aPromise) {
@@ -63,7 +64,7 @@ Tabmix.beforeSessionStoreInit = function TMP_beforeSessionStoreInit(aPromise) {
// with Australis build the button is not ready yet at this time
if (!this.isVersion(280))
this.getAfterTabsButtonsWidth();
-}
+};
// after TabmixSessionManager and SessionStore initialized
Tabmix.sessionInitialized = function() {
@@ -72,7 +73,7 @@ Tabmix.sessionInitialized = function() {
if (SM.enableManager) {
window.restoreLastSession = function restoreLastSession() {
TabmixSessionManager.restoreLastSession();
- }
+ };
if (this.isVersion(200)) {
this.setItem("Browser:RestoreLastSession", "disabled",
!SM.canRestoreLastSession || SM.isPrivateWindow);
@@ -117,14 +118,14 @@ Tabmix.sessionInitialized = function() {
// convert session.rdf to SessionManager extension format
TabmixConvertSession.startup();
-}
+};
// we call gTMPprefObserver.miscellaneousRules to add some dynamic rules
// from Tabmix.delayedStartup
Tabmix.getButtonsHeight = function() {
if (gBrowser.tabContainer.orient == "horizontal") {
let tabBar = gBrowser.tabContainer;
- let stripIsHidden = TabmixTabbar.hideMode != 0 && !tabBar.visible;
+ let stripIsHidden = TabmixTabbar.hideMode !== 0 && !tabBar.visible;
if (stripIsHidden)
tabBar.visible = true;
this._buttonsHeight =
@@ -134,15 +135,14 @@ Tabmix.getButtonsHeight = function() {
}
else
this._buttonsHeight = 24;
-}
+};
Tabmix.getAfterTabsButtonsWidth = function TMP_getAfterTabsButtonsWidth() {
if (gBrowser.tabContainer.orient == "horizontal") {
let tabBar = gBrowser.tabContainer;
- let stripIsHidden = TabmixTabbar.hideMode != 0 && !tabBar.visible;
+ let stripIsHidden = TabmixTabbar.hideMode !== 0 && !tabBar.visible;
if (stripIsHidden)
tabBar.visible = true;
- let tabsToolbar = document.getElementById("TabsToolbar");
// save tabsNewtabButton width
let lwtheme = !this.isVersion(280) && document.getElementById("main-window").getAttribute("lwtheme");
this.tabsNewtabButton =
@@ -174,7 +174,7 @@ Tabmix.getAfterTabsButtonsWidth = function TMP_getAfterTabsButtonsWidth() {
if (stripIsHidden)
tabBar.visible = false;
}
-}
+};
Tabmix.delayedStartup = function TMP_delayedStartup() {
TabmixTabbar._enablePositionCheck = true;
@@ -253,12 +253,12 @@ Tabmix.delayedStartup = function TMP_delayedStartup() {
let msg = "Tab Mix is in debug mode!\n " +
"In case it's activated accidentally, click the button to disalbe it " +
"or set 'extensions.tabmix.enableDebug' in about:config to false. " +
- "Once you disable 'Debug Mode' restart your browser."
+ "Once you disable 'Debug Mode' restart your browser.";
const errorimage = "chrome://tabmixplus/skin/tmpsmall.png";
gnb.appendNotification(msg, "tabmix-debugmode-enabled",
errorimage, gnb.PRIORITY_CRITICAL_HIGH, buttons);
}
-}
+};
var TMP_eventListener = {
init: function TMP_EL_init() {
@@ -343,7 +343,7 @@ var TMP_eventListener = {
onContentLoaded: function TMP_EL_onContentLoaded() {
if (!Tabmix.isVersion(280)) {
let newRule = '.tabbrowser-tab > .tab-stack > .tab-content > .tab-label[tabmix="true"] {' +
- '-moz-binding: url("chrome://tabmixplus/content/tab/tabbrowser_4.xml#tabmix-tab-label") !important;}'
+ '-moz-binding: url("chrome://tabmixplus/content/tab/tabbrowser_4.xml#tabmix-tab-label") !important;}';
gTMPprefObserver.insertRule(newRule);
}
@@ -377,9 +377,9 @@ var TMP_eventListener = {
// make sure AVG Security Toolbar initialized
// before we change gURLBar.handleCommand to prevent too much recursion from gURLBar.handleCommand
- if (window.InitializeOverlay_avg && typeof InitializeOverlay_avg.Init == "function") {
+ if (window.InitializeOverlay_avg && typeof window.InitializeOverlay_avg.Init == "function") {
// avg.Init uses arguments.callee, so i can't call it from strict mode
- Tabmix.nonStrictMode(InitializeOverlay_avg, "Init");
+ Tabmix.nonStrictMode(window.InitializeOverlay_avg, "Init");
}
// initialize our gURLBar.handleCommand function early before other extensions change
@@ -440,14 +440,14 @@ var TMP_eventListener = {
// prevent faviconize use its own adjustTabstrip
// in Firefox 4.0 we check for faviconized tabs in TMP_TabView.firstTab
- if ("faviconize" in window && "override" in faviconize) {
+ if ("faviconize" in window && "override" in window.faviconize) {
Tabmix.changeCode(TMP_TabView, "TMP_TabView.checkTabs")._replace(
'!tab.pinned',
'$& && !tab.hasAttribute("faviconized")'
).toCode();
// change adjustTabstrip
- faviconize.override.adjustTabstrip = function() { };
+ window.faviconize.override.adjustTabstrip = function() { };
}
},
@@ -494,7 +494,7 @@ var TMP_eventListener = {
if (TabmixSvc.isMac) {
tabBar.setAttribute("Mac", "true");
// get Mac drop indicator marginBottom , Mac default theme have marginBottom: -24px
- let ind = gBrowser.tabContainer._tabDropIndicator
+ let ind = gBrowser.tabContainer._tabDropIndicator;
if (ind) {
TMP_tabDNDObserver.marginBottom = Tabmix.getStyle(ind, "marginBottom");
}
@@ -585,10 +585,11 @@ var TMP_eventListener = {
/*
* In the first time TMP is running we need to match extensions.tabmix.hideTabbar to browser.tabs.autoHide.
* extensions.tabmix.hideTabbar default is 0 "Never Hide tabbar"
- * if browser.tabs.autoHide is true we need to make sure extensions.tabmix.hideTabbar is set to 1 "Hide tabbar when i have only one tab":
+ * if browser.tabs.autoHide is true we need to make sure extensions.tabmix.hideTabbar
+ * is set to 1 "Hide tabbar when i have only one tab":
*/
if (!Tabmix.isVersion(230) &&
- Services.prefs.getBoolPref("browser.tabs.autoHide") && TabmixTabbar.hideMode == 0) {
+ Services.prefs.getBoolPref("browser.tabs.autoHide") && TabmixTabbar.hideMode === 0) {
TabmixTabbar.hideMode = 1;
Tabmix.prefs.setIntPref("hideTabbar", TabmixTabbar.hideMode);
}
@@ -717,7 +718,7 @@ var TMP_eventListener = {
},
_expandCallback: function TMP_EL__expandCallback() {
- if (TabmixTabbar.hideMode == 0 || TabmixTabbar.hideMode == 1 && gBrowser.tabs.length > 1)
+ if (TabmixTabbar.hideMode === 0 || TabmixTabbar.hideMode == 1 && gBrowser.tabs.length > 1)
FullScreen.mouseoverToggle(true);
},
@@ -859,7 +860,7 @@ var TMP_eventListener = {
},
// TGM extension use it
- onTabClose_updateTabBar: function TMP_EL_onTabClose_updateTabBar(aTab, aDelay) {
+ onTabClose_updateTabBar: function TMP_EL_onTabClose_updateTabBar(aTab) {
// if the tab is not in the curent group we don't have to do anything here.
if (typeof aTab._tPosInGroup == "number" && aTab._tPosInGroup == -1)
return;
@@ -873,7 +874,8 @@ var TMP_eventListener = {
}
// workaround when we remove last visible tab
- if (tabBar.firstChild.pinned && TabmixTabbar.isMultiRow && tabBar.overflow && aTab._tPos >= tabBar.visibleTabsLastChild._tPos)
+ if (tabBar.firstChild.pinned && TabmixTabbar.isMultiRow && tabBar.overflow &&
+ aTab._tPos >= tabBar.visibleTabsLastChild._tPos)
tabBar.mTabstrip.ensureElementIsVisible(gBrowser.selectedTab, false);
if (tabBar.disAllowNewtabbutton)
@@ -893,7 +895,7 @@ var TMP_eventListener = {
// we need to set standout class before we check for getTabRowNumber
// and mTabstrip.ensureElementIsVisible
// this class change tab height (by changing the borders)
- if (typeof colorfulTabs == "object" && colorfulTabs.standout &&
+ if (typeof window.colorfulTabs == "object" && window.colorfulTabs.standout &&
!tab.classList.contains("standout")) {
for (let i = 0; i < gBrowser.tabs.length; i++) {
let _tab = gBrowser.tabs[i];
@@ -988,7 +990,7 @@ var TMP_eventListener = {
aEvent.stopPropagation();
aEvent.preventDefault();
}
- else if (direction != 0 && !Tabmix.extensions.treeStyleTab) {
+ else if (direction !== 0 && !Tabmix.extensions.treeStyleTab) {
// this code is based on scrollbox.xml DOMMouseScroll event handler
let tabsSrip = tabBar.mTabstrip;
let orient = tabsSrip.orient;
@@ -1004,8 +1006,7 @@ var TMP_eventListener = {
}
else {
let isVertical = aEvent.axis == aEvent.VERTICAL_AXIS;
-
- if (tabsSrip._prevMouseScrolls.every(function(prev) prev == isVertical))
+ if (tabsSrip._prevMouseScrolls.every(function(prev) {return prev == isVertical}))
tabsSrip.scrollByIndex(isVertical && tabsSrip._isRTLScrollbox ? -direction : direction);
if (tabsSrip._prevMouseScrolls.length > 1)
@@ -1021,7 +1022,7 @@ var TMP_eventListener = {
window.removeEventListener("unload", this, false);
// notice that windows enumerator don't count this window
- var isLastWindow = Tabmix.numberOfWindows() == 0;
+ var isLastWindow = Tabmix.numberOfWindows() === 0;
// we close tabmix dialog windows on exit
if (isLastWindow) {
Array.forEach(["tabmixopt-filetype", "tabmixopt-appearance", "tabmixopt"], function(aID) {
@@ -1106,7 +1107,7 @@ var TMP_eventListener = {
updateAttrib("class", "tab-text", "role", "presentation");
}
-}
+};
/**
* other extensions can cause delay to some of the events Tabmix uses for
@@ -1141,7 +1142,7 @@ Tabmix.initialization = {
}
if (stopInitialization) {
- this.run = function() {}
+ this.run = function() {};
window.removeEventListener("DOMContentLoaded", TMP_eventListener, false);
window.removeEventListener("load", TMP_eventListener, false);
}
@@ -1157,22 +1158,22 @@ Tabmix.initialization = {
if (!this.isValidWindow)
return null;
let result, currentPhase = this[aPhase].id;
- for (let name of Object.keys(this)) {
- let phase = this[name];
+ for (let key of Object.keys(this)) {
+ let phase = this[key];
if (phase.id > currentPhase)
break;
if (!phase.initialized) {
phase.initialized = true;
try {
let obj = window[phase.obj];
- result = obj[name].apply(obj, Array.slice(arguments, 1));
+ result = obj[key].apply(obj, Array.slice(arguments, 1));
} catch (ex) {
- Tabmix.assert(ex, phase.obj + "." + name + " failed");
+ Tabmix.assert(ex, phase.obj + "." + key + " failed");
}
}
}
return result;
}
-}
+};
TMP_eventListener.init();
diff --git a/chrome/content/utils.js b/chrome/content/utils.js
index 2d6f59d..f78d90d 100644
--- a/chrome/content/utils.js
+++ b/chrome/content/utils.js
@@ -1,14 +1,14 @@
"use strict";
-var Tabmix = {
+var Tabmix = { // jshint ignore:line
get prefs() {
delete this.prefs;
- return this.prefs = Services.prefs.getBranch("extensions.tabmix.");
+ return (this.prefs = Services.prefs.getBranch("extensions.tabmix."));
},
get defaultPrefs() {
delete this.defaultPrefs;
- return this.defaultPrefs = Services.prefs.getDefaultBranch("extensions.tabmix.");
+ return (this.defaultPrefs = Services.prefs.getDefaultBranch("extensions.tabmix."));
},
isVersion: function() {
@@ -84,12 +84,14 @@ var Tabmix = {
XPCOMUtils.defineLazyGetter(aObject, aName, function() {
let tmp = { };
Components.utils.import("resource://tabmixplus/"+aModule+".jsm", tmp);
- let obj = "prototype" in tmp[aSymbol] ? new tmp[aSymbol] : tmp[aSymbol];
- if ("init" in obj)
- obj.init.apply(obj, aArg);
+ let Obj = tmp[aSymbol];
+ if ("prototype" in tmp[aSymbol])
+ Obj = new Obj();
+ else if ("init" in Obj)
+ Obj.init.apply(Obj, aArg);
if (aFlag)
self[aModule + "Initialized"] = true;
- return obj;
+ return Obj;
});
},
@@ -102,7 +104,7 @@ var Tabmix = {
get: function () {
self.informAboutChangeInTabmix(aOldName, aNewName);
delete aObject[aOldName];
- return aObject[aOldName] = self.getObject(window, aNewName);
+ return (aObject[aOldName] = self.getObject(window, aNewName));
},
configurable: true
});
@@ -114,14 +116,14 @@ var Tabmix = {
let stack = Error().stack.split("\n").slice(3);
let file = stack[0] ? stack[0].split(":") : null;
if (file) {
- let [chrome, path, line] = file;
+ let [path, line] = file;
let index = path.indexOf("/", 2) - 3;
let extensionName = index > -1 ?
path.charAt(2).toUpperCase() + path.substr(3, index) + " " : "";
this.clog(err.message + "\n\n" + extensionName + "extension call " + aOldName +
- " from:\n" + "file: " + "chrome:" + path + "\nline: " + line
- + "\n\nPlease inform Tabmix Plus developer"
- + (extensionName ? ( " and " + extensionName + "developer.") : "."));
+ " from:\n" + "file: " + "chrome:" + path + "\nline: " + line +
+ "\n\nPlease inform Tabmix Plus developer" +
+ (extensionName ? ( " and " + extensionName + "developer.") : "."));
}
else
this.clog(err.message + "\n\n" + stack);
@@ -158,7 +160,8 @@ var Tabmix = {
// we add dependent to features to make this dialog float over the window on start
var dialog = Services.ww.openWindow(aWindow,
- "chrome://tabmixplus/content/session/promptservice.xul","","centerscreen" +(modal ? ",modal" : ",dependent") ,dpb);
+ "chrome://tabmixplus/content/session/promptservice.xul","","centerscreen" +
+ (modal ? ",modal" : ",dependent") ,dpb);
if (!modal)
dialog._callBackFunction = aCallBack;
@@ -199,7 +202,9 @@ var Tabmix = {
},
compare: function TMP_utils_compare(a, b, lessThan) {return lessThan ? a < b : a > b;},
- itemEnd: function TMP_utils_itemEnd(item, end) {return item.boxObject.screenX + (end ? item.getBoundingClientRect().width : 0);},
+ itemEnd: function TMP_utils_itemEnd(item, end) {
+ return item.boxObject.screenX + (end ? item.getBoundingClientRect().width : 0);
+ },
show: function(aMethod, aDelay, aWindow) {
TabmixSvc.console.show(aMethod, aDelay, aWindow || window);
@@ -209,7 +214,7 @@ var Tabmix = {
// caller list
__noSuchMethod__: function TMP_console_wrapper(id, args) {
if (["changeCode", "setNewFunction", "nonStrictMode"].indexOf(id) > -1) {
- this.installeChangecode;
+ this.installeChangecode();
return this[id].apply(this, args);
}
if (typeof TabmixSvc.console[id] == "function") {
@@ -219,10 +224,9 @@ var Tabmix = {
return null;
},
- get installeChangecode() {
- delete this.installeChangecode;
+ installeChangecode: function() {
Services.scriptloader.loadSubScript("chrome://tabmixplus/content/changecode.js", window);
- return this.installeChangecode = true;
+ this.installeChangecode = function() {};
},
_init: function() {
@@ -247,6 +251,6 @@ var Tabmix = {
this.originalFunctions = null;
delete this.window;
}
-}
+};
Tabmix._init();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list