[Pkg-mozext-commits] [tabmixplus] 26/47: Clean TMP_extensionsCompatibility.treeStyleTab to prevent errors in Tabmix.changeCode SyntaxError: 'use strict' statement won't be enforced as a directive because it isn't in directive prologue position
David Prévot
taffit at moszumanska.debian.org
Fri Sep 26 20:57:01 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch upstream
in repository tabmixplus.
commit 813790e1b2030ff56c578e9ca4f297397f8896c6
Author: onemen <tabmix.onemen at gmail.com>
Date: Sat Sep 20 17:12:36 2014 +0300
Clean TMP_extensionsCompatibility.treeStyleTab to prevent errors in Tabmix.changeCode
SyntaxError: 'use strict' statement won't be enforced as a directive because it isn't in directive prologue position
---
chrome/content/extensions/extensions.js | 30 +++++++++++++-----------------
1 file changed, 13 insertions(+), 17 deletions(-)
diff --git a/chrome/content/extensions/extensions.js b/chrome/content/extensions/extensions.js
index 7ce56bd..9b4519c 100644
--- a/chrome/content/extensions/extensions.js
+++ b/chrome/content/extensions/extensions.js
@@ -549,18 +549,15 @@ TMP_extensionsCompatibility.treeStyleTab = {
preInit: function () {
if (typeof TreeStyleTabWindowHelper.overrideExtensionsPreInit == "function") {
- Tabmix.changeCode(TreeStyleTabWindowHelper, "TreeStyleTabWindowHelper.overrideExtensionsPreInit")._replace(
- // fix typo in TST - this typo fixed on TST 0.13.2011121501
- 'SessionData.tabTSTProperties',
- 'sessionData.tabTSTProperties', {silent: true}
- )._replace(
- // TST look for DEPRECATED gBrowser.restoreTab in tablib.init
- 'source[1].replace',
- '" ".replace'
- )._replace(
- /eval\(["|']tablib\.init/,
- 'if (false) $&'
- ).toCode();
+ // overrideExtensionsPreInit look for 'gBrowser.restoreTab' in tablib.init
+ tablib._init = tablib.init;
+ tablib.init = function() {
+ this._init();
+ /*
+ var newTab = null
+ gBrowser.restoreTab = return newTab;
+ */
+ }
}
},
@@ -612,11 +609,10 @@ TMP_extensionsCompatibility.treeStyleTab = {
* other places windows
*/
Tabmix.changeCode(TMP_Places, "TMP_Places.openGroup")._replace(
- /(function[^\(]*\([^\)]+)(\))/,
- '$1, TSTOpenGroupBookmarkBehavior$2'
- )._replace(
- /"use strict";|{/,
- '$&\nif (TSTOpenGroupBookmarkBehavior == null) TSTOpenGroupBookmarkBehavior = TreeStyleTabService.openGroupBookmarkBehavior();'
+ 'var tabBar = gBrowser.tabContainer;',
+ 'let TSTOpenGroupBookmarkBehavior = arguments.length > 3 && arguments[3] ||\n' +
+ ' TreeStyleTabService.openGroupBookmarkBehavior();\n' +
+ ' $&'
)._replace(
'index = prevTab._tPos + 1;',
' index = gBrowser.treeStyleTab.getNextSiblingTab(gBrowser.treeStyleTab.getRootTab(prevTab));' +
--
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