Permalink
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also .
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
4
contributors
Commits on Sep 04, 2016
The page https://addons.mozilla.org/en-US/firefox/addon/print-all-tabs-5142/ says: "This add-on has been disabled by an administrator."
Commits on Sep 06, 2016
Commits on Sep 07, 2016
Commits on Sep 09, 2016
Commits on Sep 13, 2016
Commits on Oct 16, 2016
Closes #118 fix Move to group menu
Commits on Nov 04, 2016
…Shift key or middle-click
Commits on Dec 11, 2016
Commits on Mar 09, 2017
Commits on Mar 16, 2017
The previous value had the same explanation as config.useEffectiveTLD.disabled , which is the opposite.
Fix German label for config.useEffectiveTLD.enabled .
Commits on Apr 21, 2017
Follow to changes introduced by https://bugzilla.mozilla.org/show_bug.cgi?id=1321705
Commits on Apr 29, 2017
Commits on May 08, 2017
… tab bar, on Firefox 52 and later after https://bugzilla.mozilla.org/show_bug.cgi?id=92737
Commits on May 12, 2017
Something non-element node can break the feature to close tabs by dragging on closeboxes.
Unified
Split
Showing
with
1,648 additions
and 2,140 deletions.
- +2 −3 chrome.manifest
- +4 −0 content/multipletab/bookmarkPropertiesOverlay.xul
- +38 −70 content/multipletab/config.js
- +0 −26 content/multipletab/config.xul
- +3 −18 content/multipletab/content-utils.js
- +34 −63 content/multipletab/hacks.js
- +0 −167 content/multipletab/lib/UninstallationListener.js
- +173 −0 content/multipletab/lib/bookmarkMultipleTabs.js
- +0 −146 content/multipletab/lib/bookmarkMultipleTabs.xul
- +0 −59 content/multipletab/lib/bookmarkMultipleTabs_bookmarkPropertiesOverlay.xul
- +977 −1,028 content/multipletab/lib/tabsDragUtils.js
- +1 −1 content/multipletab/license.txt
- +71 −109 content/multipletab/multipletab.js
- +5 −3 content/multipletab/multipletab.xul
- +18 −0 history.en.md
- +19 −1 history.ja.md
- +4 −3 install.rdf
- +1 −4 locale/de-DE/multipletab/multipletab.dtd
- +0 −3 locale/en-US/multipletab/multipletab.dtd
- +0 −3 locale/es-ES/multipletab/multipletab.dtd
- +0 −3 locale/fr/multipletab/multipletab.dtd
- +0 −3 locale/hu-HU/multipletab/multipletab.dtd
- +0 −3 locale/it-IT/multipletab/multipletab.dtd
- +0 −3 locale/ja/multipletab/multipletab.dtd
- +0 −3 locale/pl-PL/multipletab/multipletab.dtd
- +0 −3 locale/ru/multipletab/multipletab.dtd
- +0 −3 locale/zh-CN/multipletab/multipletab.dtd
- +0 −3 locale/zh-TW/multipletab/multipletab.dtd
- +1 −1 makexpi
- +111 −0 modules/UninstallationListener.js
- +0 −2 modules/constants.js
- +10 −1 modules/documentToCopyText.js
- +0 −345 modules/extensions.js
- +7 −19 modules/inherit.jsm
- +49 −17 modules/prefs.js
- +45 −7 modules/saveDocument.js
- +58 −0 modules/updateInternalSave.js
- +5 −5 tests/unit/basic.test.js
- +1 −1 tests/unit/common.inc.js
- +11 −11 tests/unit/publicApi.test.js
| @@ -1,9 +1,8 @@ | ||
| content multipletab content/multipletab/ | ||
|
|
||
| overlay chrome://browser/content/browser.xul chrome://multipletab/content/multipletab.xul | ||
| overlay chrome://browser/content/browser.xul chrome://multipletab/content/lib/bookmarkMultipleTabs.xul | ||
| overlay chrome://browser/content/places/bookmarkProperties.xul chrome://multipletab/content/lib/bookmarkMultipleTabs_bookmarkPropertiesOverlay.xul | ||
| overlay chrome://browser/content/places/bookmarkProperties2.xul chrome://multipletab/content/lib/bookmarkMultipleTabs_bookmarkPropertiesOverlay.xul | ||
| overlay chrome://browser/content/places/bookmarkProperties.xul chrome://multipletab/content/bookmarkPropertiesOverlay.xul | ||
| overlay chrome://browser/content/places/bookmarkProperties2.xul chrome://multipletab/content/bookmarkPropertiesOverlay.xul | ||
|
|
||
| overlay chrome://browser/content/bookmarks/bookmarksPanel.xul chrome://multipletab/content/bookmarksOverlay.xul | ||
| overlay chrome://browser/content/places/places.xul chrome://multipletab/content/bookmarksOverlay.xul | ||
| @@ -0,0 +1,4 @@ | ||
| <?xml version="1.0"?> | ||
| <overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> | ||
| <script src="lib/bookmarkMultipleTabs.js" type="application/javascript"/> | ||
| </overlay> |
| @@ -1,82 +1,55 @@ | ||
| Components.utils.import('resource://multipletab-modules/extensions.js', {}); | ||
| Components.utils.import('resource://multipletab-modules/namespace.jsm'); | ||
| var extensions = getNamespaceFor('piro.sakura.ne.jp')['piro.sakura.ne.jp'].extensions; | ||
|
|
||
| Components.utils.import('resource://gre/modules/Services.jsm'); | ||
|
|
||
| const MENU_EDITOR_ID = '{EDA7B1D7-F793-4e03-B074-E6F303317FB0}'; | ||
|
|
||
| var gAutoPopupItems = []; | ||
| var gDelayItems = []; | ||
| var gDragModeRadio; | ||
|
|
||
| function init() | ||
| { | ||
| [ | ||
| 'menuEditorLink-selection', | ||
| 'menuEditorLink-context' | ||
| ].forEach(function(aItem) { | ||
| aItem = document.getElementById(aItem); | ||
| aItem.setAttribute('collapsed', true); | ||
| extensions.isInstalled(MENU_EDITOR_ID, { ng : function() { | ||
| aItem.removeAttribute('collapsed'); | ||
| }}); | ||
| }); | ||
| var { AddonManager } = Components.utils.import('resource://gre/modules/AddonManager.jsm', {}); | ||
|
|
||
| const TAB_MIX_PLUS_ID = '{dc572301-7619-498c-a57d-39143191b318}'; | ||
| const TAB_UTILITIES_ID = 'tabutils@ithinc.cn'; | ||
| const SUPER_TAB_MODE_ID = '{752a85d4-68d6-48ae-ab7d-6640f5f75d85}'; | ||
| const PRINT_ALL_TABS_ID = 'printalltabs@peculier.com'; | ||
|
|
||
| AddonManager.getAddonsByIDs([ | ||
| TAB_MIX_PLUS_ID, | ||
| TAB_UTILITIES_ID, | ||
| SUPER_TAB_MODE_ID, | ||
| PRINT_ALL_TABS_ID | ||
| ], function(aAddons) { | ||
| var tabMixPlus = aAddons[0]; | ||
| var tabUtilities = aAddons[1]; | ||
| var superTabMode = aAddons[2]; | ||
| var printAllTabs = aAddons[3]; | ||
|
|
||
| [ | ||
| 'menuEditorConfig-selection', | ||
| 'menuEditorConfig-context' | ||
| ].forEach(function(aItem) { | ||
| aItem = document.getElementById(aItem); | ||
| aItem.setAttribute('collapsed', true); | ||
| aItem.setAttribute('disabled', true); | ||
| extensions.isInstalled(MENU_EDITOR_ID, { ok : function() { | ||
| aItem.removeAttribute('collapsed'); | ||
| }}); | ||
| extensions.isEnabled(MENU_EDITOR_ID, { ok : function() { | ||
| aItem.removeAttribute('disabled'); | ||
| }}); | ||
| }); | ||
|
|
||
| [ | ||
| { | ||
| ids : ['printalltabs@peculier.com'], | ||
| items : ['extensions.multipletab.show.multipletab-selection-printTabs-check'] | ||
| }, | ||
| { | ||
| ids : [ | ||
| '{dc572301-7619-498c-a57d-39143191b318}', // Tab Mix Plus | ||
| 'tabutils@ithinc.cn' // Tab Utilities | ||
| ], | ||
| items : [ | ||
| 'extensions.multipletab.show.multipletab-selection-freezeTabs-check', | ||
| 'extensions.multipletab.show.multipletab-selection-protectTabs-check' | ||
| ] | ||
| }, | ||
| let printAllTabsCheck = document.getElementById('extensions.multipletab.show.multipletab-selection-printTabs-check'); | ||
| if (printAllTabs) | ||
| printAllTabsCheck.removeAttribute('disabled'); | ||
| else | ||
| printAllTabsCheck.setAttribute('disabled', true); | ||
| } | ||
|
|
||
| { | ||
| ids : [ | ||
| '{dc572301-7619-498c-a57d-39143191b318}', // Tab Mix Plus | ||
| 'tabutils@ithinc.cn', // Tab Utilities | ||
|
|
||
| '{752a85d4-68d6-48ae-ab7d-6640f5f75d85}' // Super Tab Mode | ||
| ], | ||
| items : [ | ||
| 'extensions.multipletab.show.multipletab-selection-lockTabs-check' | ||
| ] | ||
| let protectItems = [ | ||
| 'extensions.multipletab.show.multipletab-selection-freezeTabs-check', | ||
| 'extensions.multipletab.show.multipletab-selection-protectTabs-check' | ||
| ].map(document.getElementById, document); | ||
| if (tabMixPlus || tabUtilities) | ||
| protectItems.forEach((aItem) => aItem.removeAttribute('disabled')); | ||
| else | ||
| protectItems.forEach((aItem) => aItem.setAttribute('disabled', true)); | ||
| } | ||
| ].forEach(function(aDefinition) { | ||
| if (!aDefinition) | ||
| return; | ||
| var items = aDefinition.items.map(document.getElementById, document); | ||
| for (let i = 0, maxi = items.length; i < maxi; i++) | ||
|
|
||
| { | ||
| items[i].setAttribute('disabled', true); | ||
| let lockItem = document.getElementById('extensions.multipletab.show.multipletab-selection-lockTabs-check'); | ||
| if (tabMixPlus || tabUtilities || superTabMode) | ||
| lockItem.removeAttribute('disabled'); | ||
| else | ||
| lockItem.setAttribute('disabled', true); | ||
| } | ||
| aDefinition.ids.forEach(function(aId) { | ||
| extensions.isAvailable(aId, { ok : function() { | ||
| aItem.removeAttribute('disabled'); | ||
| }}); | ||
| }); | ||
| }); | ||
|
|
||
| new window['piro.sakura.ne.jp'].arrowScrollBoxScrollHelper('formatTypeBox', 'radio'); | ||
| @@ -120,11 +93,6 @@ function onDragModeChange() | ||
| } | ||
| } | ||
|
|
||
| function openMenuEditorConfig() | ||
| { | ||
| extensions.goToOptions(MENU_EDITOR_ID, window); | ||
| } | ||
|
|
||
|
|
||
|
|
||
| const kROW_ID_PREFIX = 'format-'; | ||
| @@ -391,19 +391,6 @@ | ||
| </vbox> | ||
| </arrowscrollbox> | ||
| </groupbox> | ||
| <vbox> | ||
| <description flex="1">&config.menuEditor.description;</description> | ||
| <hbox> | ||
| <label id="menuEditorLink-selection" | ||
| class="text-link" | ||
| value="&config.menuEditor.link;" | ||
| uri="https://addons.mozilla.org/firefox/addon/710" | ||
| onclick="openURL(this.getAttribute('uri'))"/> | ||
| <button id="menuEditorConfig-selection" | ||
| label="&config.menuEditor.config;" | ||
| oncommand="openMenuEditorConfig()"/> | ||
| </hbox> | ||
| </vbox> | ||
| </prefpane> | ||
|
|
||
| <prefpane id="prefpane-context-menu" label="&config.tabs.contextMenu;"> | ||
| @@ -487,19 +474,6 @@ | ||
| </vbox> | ||
| </arrowscrollbox> | ||
| </groupbox> | ||
| <vbox> | ||
| <description flex="1">&config.menuEditor.description;</description> | ||
| <hbox> | ||
| <label id="menuEditorLink-context" | ||
| class="text-link" | ||
| value="&config.menuEditor.link;" | ||
| uri="https://addons.mozilla.org/firefox/addon/710" | ||
| onclick="openURL(this.getAttribute('uri'))"/> | ||
| <button id="menuEditorConfig-context" | ||
| label="&config.menuEditor.config;" | ||
| oncommand="openMenuEditorConfig()"/> | ||
| </hbox> | ||
| </vbox> | ||
| </prefpane> | ||
|
|
||
| <prefpane id="prefpane-advanced" label="&config.tabs.advanced;"> | ||
| @@ -12,7 +12,6 @@ | ||
| var Cr = Components.results; | ||
|
|
||
| var { MultipleTabHandlerConstants } = Cu.import('resource://multipletab-modules/constants.js', {}); | ||
| var { saveDocumentAs, saveDocumentInto } = Components.utils.import('resource://multipletab-modules/saveDocument.js', {}); | ||
| var { documentToCopyText } = Components.utils.import('resource://multipletab-modules/documentToCopyText.js', {}); | ||
|
|
||
| function free() { | ||
| @@ -39,22 +38,6 @@ | ||
| content.location.replace('about:blank'); | ||
| return; | ||
|
|
||
| case MultipleTabHandlerConstants.COMMAND_REQUEST_SAVE_DOCUMENT_AS_FILE: | ||
| saveDocumentAs(content.document, null, { | ||
| referrerURI : aMessage.json.params.referrerURI, | ||
| saveType : aMessage.json.params.saveType | ||
| }); | ||
| return; | ||
|
|
||
| case MultipleTabHandlerConstants.COMMAND_REQUEST_SAVE_DOCUMENT_INTO_DIRECTORY: | ||
| saveDocumentInto(content.document, aMessage.json.params.folder, { | ||
| name : aMessage.json.params.name, | ||
| referrerURI : aMessage.json.params.referrerURI, | ||
| saveType : aMessage.json.params.saveType, | ||
| delay : aMessage.json.params.delay | ||
| }); | ||
| return; | ||
|
|
||
| case MultipleTabHandlerConstants.COMMAND_REQUEST_COPY_TEXT: | ||
| var id = aMessage.json.params.id; | ||
| try { | ||
| @@ -65,17 +48,19 @@ | ||
| title : aMessage.json.params.title, | ||
| lineFeed : aMessage.json.params.lineFeed | ||
| }); | ||
| mydump('text = '+text); | ||
| global.sendAsyncMessage(MultipleTabHandlerConstants.MESSAGE_TYPE, { | ||
| command : MultipleTabHandlerConstants.COMMAND_REPORT_COPY_TEXT, | ||
| id : id, | ||
| text : text | ||
| }); | ||
| } | ||
| catch(e) { | ||
| mydump('error = '+e); | ||
| global.sendAsyncMessage(MultipleTabHandlerConstants.MESSAGE_TYPE, { | ||
| command : MultipleTabHandlerConstants.COMMAND_REPORT_COPY_TEXT, | ||
| id : id, | ||
| text : '' | ||
| text : (DEBUG ? String(e) : '' ) | ||
| }); | ||
| } | ||
| return; | ||
| @@ -2,13 +2,12 @@ MultipleTabService.overrideExtensionsOnPreInit = function MTS_overrideExtensions | ||
|
|
||
| // Tab Groups | ||
| if ('TG_Tab_SSTabRestoring_Event' in window) { | ||
| eval('window.TG_Tab_SSTabRestoring_Event = '+ | ||
| window.TG_Tab_SSTabRestoring_Event.toSource().replace( | ||
| '{', | ||
| '{' + | ||
| ' if (MultipleTabService.duplicatingTabs) return;' | ||
| ) | ||
| ); | ||
| window.__multipletab__TG_Tab_SSTabRestoring_Event = window.TG_Tab_SSTabRestoring_Event; | ||
| window.TG_Tab_SSTabRestoring_Event = function(...aArgs) { | ||
| if (MultipleTabService.duplicatingTabs) | ||
| return; | ||
| return window.__multipletab__TG_Tab_SSTabRestoring_Event(...aArgs); | ||
| }; | ||
| this.registerDuplicatedTabPostProcess(function(aTab, aIndex) { | ||
| var groups = document.getElementById('TG-GroupList'); | ||
| TG_Add_To_Group(aTab, groups.selectedItem); | ||
| @@ -17,14 +16,16 @@ MultipleTabService.overrideExtensionsOnPreInit = function MTS_overrideExtensions | ||
| } | ||
|
|
||
| // Menu Editor | ||
| // https://addons.mozilla.org/firefox/addon/menu-editor-ii/ | ||
| if ('MenuEdit' in window && | ||
| 'getEditableMenus' in MenuEdit) { | ||
| eval('MenuEdit.getEditableMenus = '+ | ||
| MenuEdit.getEditableMenus.toSource().replace( | ||
| /return menus;/g, | ||
| 'menus["multipletab-selection-menu"] = MultipleTabService.tabSelectionPopup.getAttribute("label"); $&' | ||
| ) | ||
| ); | ||
| 'getEditableMenus' in MenuEdit && | ||
| !MenuEdit.__multipletab__getEditableMenus) { | ||
| MenuEdit.__multipletab__getEditableMenus = MenuEdit.getEditableMenus; | ||
| MenuEdit.getEditableMenus = function(...aArgs) { | ||
| var menus = MenuEdit.__multipletab__getEditableMenus(...aArgs); | ||
| menus['multipletab-selection-menu'] = MultipleTabService.tabSelectionPopup.getAttribute('label'); | ||
| return menus; | ||
| }; | ||
| } | ||
|
|
||
| // DragNDrop Toolbars | ||
| @@ -66,55 +67,23 @@ MultipleTabService.overrideExtensionsOnPreInit = function MTS_overrideExtensions | ||
|
|
||
| MultipleTabService.overrideExtensionsOnInit = function MTS_overrideExtensionsOnInit() { | ||
|
|
||
| // Tab Groups | ||
| if ('TG_Group_DnD_Observer' in window) { | ||
| eval('TG_Group_DnD_Observer.onDrop = '+ | ||
| TG_Group_DnD_Observer.onDrop.toSource().replace( | ||
| /(TG_Move_To_Group\([^\)]+\))/, | ||
| 'var info = {};' + | ||
| 'var tabs = MultipleTabService.getBundledTabsOf(tab, info);' + | ||
| 'if (tabs.length) {' + | ||
| ' tabs.forEach(function(tab) {' + | ||
| ' $1;' + | ||
| ' });' + | ||
| ' return;' + | ||
| '}' | ||
| ) | ||
| ); | ||
| this.registerClearTabValueKey('tg_gname'); | ||
| this.registerClearTabValueKey('tg_gid'); | ||
| this.registerClearTabValueKey('tg_gselected'); | ||
| this.registerClearTabValueKey('tg_tselected'); | ||
| } | ||
|
|
||
| // Linkwad | ||
| if (document.getElementById('linkwad_toolbar')) { | ||
| if ('sessionObserver' in window) | ||
| eval('sessionObserver.onDrop = '+ | ||
| sessionObserver.onDrop.toSource().replace( | ||
| '{', | ||
| '{' + | ||
| ' var info = {};' + | ||
| ' var tabs = MultipleTabService.getBundledTabsOf(arguments[2].sourceNode, info);' + | ||
| ' if (tabs.length) {' + | ||
| ' var wadid = arguments[0].target.getAttribute("wad_id");' + | ||
| ' tabs.forEach(function(aTab) {' + | ||
| ' addURLtoSession(aTab.linkedBrowser.currentURI.spec, wadid);' + | ||
| ' });' + | ||
| ' return;' + | ||
| ' }' | ||
| ) | ||
| ); | ||
| } | ||
|
|
||
| // Print All Tabs | ||
| if ('PrintAllTabs' in window) { | ||
| eval('PrintAllTabs.onMenuItemCommand = '+ | ||
| PrintAllTabs.onMenuItemCommand.toSource().replace( | ||
| 'this.getTabsToPrint(printAll)', | ||
| 'this.__multipletab__printNodes || $&' | ||
| ) | ||
| ); | ||
| if ('sessionObserver' in window) { | ||
| sessionObserver.__multipletab__onDrop = sessionObserver.onDrop; | ||
| sessionObserver.onDrop = function(...aArgs) { | ||
| var info = {}; | ||
| var tabs = MultipleTabService.getBundledTabsOf(aArgs[2].sourceNode, info); | ||
| if (tabs.length) { | ||
| var wadid = aArgs[0].target.getAttribute('wad_id'); | ||
| tabs.forEach(function(aTab) { | ||
| addURLtoSession(aTab.linkedBrowser.currentURI.spec, wadid); | ||
| }); | ||
| return; | ||
| } | ||
| return sessionObserver.onDrop(...aArgs); | ||
| }; | ||
| } | ||
| } | ||
|
|
||
| // Tab Mix Plus | ||
| @@ -234,12 +203,14 @@ MultipleTabService.overrideExtensionsOnInit = function MTS_overrideExtensionsOnI | ||
| if (backupShiftPref !== null) prefs.setPref(SelfShiftClick, backupShiftPref); | ||
| } | ||
| }; | ||
| new window['piro.sakura.ne.jp'].UninstallationListener({ | ||
|
|
||
| let { UninstallationListener } = Components.utils.import('resource://multipletab-modules/UninstallationListener.js', {}); | ||
| new UninstallationListener({ | ||
| id : 'multipletab@piro.sakura.ne.jp', | ||
| onuninstalled : restoreTMPPrefs, | ||
| ondisabled : restoreTMPPrefs | ||
| }); | ||
| new window['piro.sakura.ne.jp'].UninstallationListener({ | ||
| new UninstallationListener({ | ||
| id : '{dc572301-7619-498c-a57d-39143191b318}', // Tab Mix Plus | ||
| onuninstalled : restoreMTHPrefs, | ||
| ondisabled : restoreMTHPrefs | ||
Oops, something went wrong.
Showing you all comments on commits in this comparison.
This comment has been minimized.
This comment has been minimized.
|
Hello, this commit introduces a regression: |
This comment has been minimized.
This comment has been minimized.
|
Thanks. The commit edee6a0 seems to fix this regression for me. |
This comment has been minimized.
This comment has been minimized.
|
Thanks for the fix, works for me too. However, I see small flicker in the animation when tabs are passing between others, not sure it was there before. |