Commit Graph

2037 Commits

Author SHA1 Message Date
YUKI Hiroshi
28ba3b54ad Fixup tree structure after tab move correctly.
Keyboard shortcuts Ctrl-Shift-PageUp/PageDown sometimes broke the tree.
This commit fixes following cases:

case 1:
  * [-] A
    * A-1 <= Ctrl-Shift-PageDown at here
  * [+] B

  then they should be:

  * A
  * [+] B
  * A-1

  but actually:

  * [-] A
  * [+] B
  *   A-1 <= still a child of A!

case 2:

  * A
  * [-] B
    * [+] B-1 <= Ctrl-Shift-PageUp at here

  then they should be:

  * A
  * [+] B-1
  * B

  but actually:

  * A
  *  [+] B-1 <= still a child of B!
  * [-] B
2016-01-18 18:43:36 +09:00
YUKI Hiroshi
b214268d69 Activate/deactivate auto hide feature for fullscreen mode correctly 2015-12-25 16:21:28 +09:00
YUKI Hiroshi
ca63c220f9 Don't show thin glay bar for pinned tabs on fullscreen HTML5 video 2015-12-25 16:06:34 +09:00
YUKI Hiroshi
17526f7940 Don't use deprecated catch-if.
See also: https://bugzilla.mozilla.org/show_bug.cgi?id=1228841
2015-12-01 11:27:50 +09:00
YUKI Hiroshi
b5e217b359 Fix mismatched entity name 2015-11-27 19:20:04 +09:00
YUKI Hiroshi
9b856616f7 Use preferred label for "Auto hide tab bar" in the context menu for auto hide or auto shrink 2015-11-27 19:17:47 +09:00
YUKI Hiroshi
a780716043 Hide arrowscrollbox spacers for vertical tab bar.
See also #863
2015-11-27 18:21:56 +09:00
YUKI Hiroshi
92e03c52a9 Control "muted" status of descendant tabs if the tab has a subtree and they are collapsed 2015-11-19 20:20:15 +09:00
YUKI Hiroshi
03fb19d810 Hide virtual sound indicator for a parent tab when the subtree is expanded 2015-11-19 18:31:16 +09:00
YUKI Hiroshi
47876f780e Call original methods more safely 2015-11-19 15:01:02 +09:00
YUKI Hiroshi
e06d99d6ce Call original methods more safely.
Because "this" can be changed by other addons, like Speed Dial. See #994
2015-11-19 14:49:15 +09:00
YUKI "Piro" Hiroshi
0ed972459b Update library 2015-11-12 13:11:57 +09:00
xeonx1
eec2a051de Fix for piroor/treestyletab#982 and piroor/multipletab#101 where New Folder and Bookmark Properties dialogs appearing empty only both Tree Style Tabs and Multiple Tab Handler (and other extensions withbookmarkMultipleTabs_bookmarkPropertiesOverlay.xul) are enabled at the same time. 2015-11-11 19:40:08 -08:00
Piro / YUKI Hiroshi
3fa5aec658 Add reference counter implementation to detect memory leak 2015-11-10 03:00:43 +09:00
Piro / YUKI Hiroshi
89afb6f08d Update library: detect URI of pending tabs correctly on Firefox 35 and later 2015-11-09 23:10:44 +09:00
Piro / YUKI Hiroshi
d295128e4a Update library: Override function without eval() to avoid errors from mismatched variable scopes.
See also https://bugzilla.mozilla.org/show_bug.cgi?id=1202902
2015-11-09 22:43:04 +09:00
Piro / YUKI Hiroshi
45767e473a Indicate target platforms 2015-11-08 22:51:02 +09:00
Piro / YUKI Hiroshi
6f90b666ee Apply "insertion position of new child tab" preference for tabs opened via GM_openInTab() #978 2015-11-08 21:57:00 +09:00
Piro / YUKI Hiroshi
732822175a Fix mismatched arguments for the original function #979 2015-11-08 17:31:11 +09:00
YUKI Hiroshi
b83a92bdb0 Open source tab as a child of the current 2015-11-06 15:13:45 +09:00
YUKI Hiroshi
2a8f980de5 Fix mismatched argumenit for overridden method 2015-11-06 15:07:51 +09:00
YUKI Hiroshi
51e473c777 Remove event listener correctly 2015-11-06 13:38:22 +09:00
YUKI Hiroshi
9f14f594de Fix indent 2015-11-06 13:37:36 +09:00
YUKI Hiroshi
7f82809997 Simplify 2015-11-06 13:37:22 +09:00
YUKI Hiroshi
e2dd6a2799 Fix indent 2015-11-06 13:34:19 +09:00
YUKI Hiroshi
c1a9cefa4b Don't override tabbar method again and again 2015-11-06 13:33:30 +09:00
Piro / YUKI Hiroshi
7da7a47db7 Read preferences correctly 2015-11-06 01:14:00 +09:00
Piro / YUKI Hiroshi
9516999af4 Read preferences correctly 2015-11-06 01:11:46 +09:00
Piro / YUKI Hiroshi
764cf0c8e1 Fix typo 2015-11-05 23:39:45 +09:00
YUKI Hiroshi
d3a5bd106b Fix indent 2015-11-05 19:45:59 +09:00
YUKI Hiroshi
2f1b3f3aed Remove needless comment 2015-11-05 19:45:47 +09:00
YUKI Hiroshi
daddf249e0 Reduce use of eval() 2015-11-05 19:44:59 +09:00
YUKI Hiroshi
66e2b5f5b1 Remove needless wrapper 2015-11-05 19:44:52 +09:00
YUKI Hiroshi
fad308b234 Reduce use of eval() 2015-11-05 19:40:35 +09:00
YUKI Hiroshi
4fc08ca1f4 Fix typo 2015-11-05 19:30:31 +09:00
YUKI Hiroshi
00f52714aa Reduce use of eval() 2015-11-05 19:28:24 +09:00
YUKI Hiroshi
4213f5cf39 Refere "this" always 2015-11-05 19:24:18 +09:00
YUKI Hiroshi
be899d1b52 Reduce use of eval() 2015-11-05 19:24:10 +09:00
YUKI Hiroshi
330e7503aa Reduce useing of eval() 2015-11-05 19:21:45 +09:00
YUKI Hiroshi
c8e364a505 Fix missing "this" for Function#call() 2015-11-05 19:12:32 +09:00
YUKI Hiroshi
59fa80adf1 Reduce using of eval() 2015-11-05 19:12:21 +09:00
YUKI Hiroshi
a029d82f18 Reduce use of eval() 2015-11-05 19:01:01 +09:00
YUKI Hiroshi
1d341ab3a0 Reduce use of eval() 2015-11-05 18:48:25 +09:00
YUKI Hiroshi
3bfa87f0e0 Remove obsolete hack for TabsOnTop 2015-11-05 18:44:03 +09:00
YUKI Hiroshi
d4dcefc75a Reduce use of eval() hack 2015-11-05 18:37:31 +09:00
YUKI Hiroshi
2afd90c96a Remove obsolete hack for XULBrowserWindow.hideChromeForLocation.
The method became obsolete by https://bugzilla.mozilla.org/show_bug.cgi?id=752434
2015-11-05 18:29:44 +09:00
YUKI Hiroshi
c01e26cfa7 Fix indent 2015-11-05 18:20:51 +09:00
YUKI Hiroshi
f6cf37c90c Remove obsolete code for too old Firefox.
SidebarUI is already available at Firefox 38.
2015-11-05 18:19:47 +09:00
YUKI Hiroshi
8fb3ce884e Update floating tab bar if the sidebar width is changed 2015-11-05 18:14:17 +09:00
YUKI Hiroshi
1f4458cb3a Fix indent 2015-11-05 18:11:56 +09:00
YUKI Hiroshi
8bfe8dfc2e Reposition the floating tab bar only when the sidebar is actually opened or closed 2015-11-05 18:11:28 +09:00
YUKI Hiroshi
b417c45425 Detect tab from drag events more correctly 2015-11-04 11:58:44 +09:00
YUKI Hiroshi
e8941963d4 Update library 2015-11-04 11:45:08 +09:00
YUKI Hiroshi
0fbea3cfbf Fix indent 2015-11-04 11:44:53 +09:00
YUKI Hiroshi
1029b40e09 Follow to changes introduced by the bug 1207594.
The method "_setEffectAllowedForDataTransfer" was renamed to "_getDropEffectForTabDrag".
2015-11-04 11:43:54 +09:00
Piro / YUKI Hiroshi
b11a175cbf Suppress error like TypeError: aEvent.target.getSelection is not a function 2015-10-31 00:11:16 +09:00
YUKI Hiroshi
d911e243c6 Open new search result tab as a child of the current tab, when a selection text is dragged and dropped to the searchbar.
This should fix the issue #884
2015-10-30 17:47:14 +09:00
YUKI Hiroshi
baf96c545b Remove garbage 2015-10-29 11:01:55 +09:00
Piro / YUKI Hiroshi
036ca2a5d5 Hide toolbar related elements completely in the DOM fullscreen mode.
The "inDOMFullscreen" attribute is introduced at Firefox 36 by http://hg.mozilla.org/mozilla-central/rev/3aef39ca3919 and now TST supports only Firefox 38 and newer. So we should use it instead of my custom attribute.
2015-10-27 00:42:52 +09:00
Piro / YUKI Hiroshi
cfca590bc3 Fix wrong attribute name 2015-10-27 00:11:37 +09:00
YUKI Hiroshi
f0f3076629 Attach tabs from GM_openInTab after all tabs are opened.
Because Greasemonkey moves opened tabs to the bottom of the tab bar always, TST detaches the new child tab unexpectedly.
2015-10-26 19:05:49 +09:00
YUKI Hiroshi
4509c76e90 Rewrite hack for Greasemonkey (based on GM 3.5) 2015-10-26 17:47:05 +09:00
YUKI Hiroshi
75f761d291 Fix path to Greasemonkey's internal modules (for GM 3.5) 2015-10-26 16:53:03 +09:00
YUKI Hiroshi
5a17a36773 Fix path to Greasemonkey's internal modules (tested on GM 3.5) 2015-10-26 16:50:28 +09:00
Piro / YUKI Hiroshi
ff2d3caed5 Don't redefine gBrowserInit._delayedStartup() with eval() to avoid errors from mismatched variable scopes.
I don't know why but redefined function with eval() has a variable scope different from its original one, and fails to access gSessionHistoryObserver defined in Firefox's script with "const" statement. So I gave up to use eval() hack.
2015-10-10 19:19:11 +09:00
YUKI Hiroshi
4a6901d499 Hide needless gray box for hidden pinned tabs 2015-10-05 16:27:18 +09:00
YUKI Hiroshi
f30652bef7 Hide pinned tabs in collapsed tab bar 2015-10-05 16:23:44 +09:00
YUKI Hiroshi
20ada7e5d8 Don't show gray rect of pinned tabs on full screen videos
See also: #950
2015-10-02 16:26:00 +09:00
Piro / YUKI Hiroshi
dd6a01532d Add credit 2015-09-29 06:18:14 +09:00
Piro / YUKI Hiroshi
2018b2063e Apply new size of the tab bar specified at the configuration dialog, for all windows 2015-09-29 04:50:16 +09:00
Piro / YUKI Hiroshi
b1b886d27d Suppress error on window closing 2015-09-29 03:47:29 +09:00
YUKI Hiroshi
3a9e922175 Re-introduce configuration UI to change fixed/unfixed and the size of the tab bar #940 2015-09-28 21:32:06 +09:00
YUKI Hiroshi
064578b3e0 Open child tab correctly with middle click on "view image" in the context menu 2015-09-03 16:24:28 +09:00
YUKI Hiroshi
84d73d7471 Fix indent 2015-08-28 18:27:03 +09:00
YUKI Hiroshi
7831a6b6cc Remove codes for old Firefox 2015-08-28 18:26:30 +09:00
YUKI Hiroshi
e1198f1ef3 Remove debug print 2015-08-28 18:23:08 +09:00
YUKI Hiroshi
e2b143b372 Fix indent 2015-08-28 18:22:44 +09:00
YUKI Hiroshi
01dab35627 Open new tabs from the about:sync-tabs page as children correctly on lately Firefox 2015-08-28 18:22:19 +09:00
YUKI Hiroshi
bea74f32ba Call renamed methods correctly 2015-08-28 17:39:58 +09:00
YUKI Hiroshi
15666abfcb Call renamed methods correctly 2015-08-28 17:39:04 +09:00
Piro / YUKI Hiroshi
5380304aa8 Simplify #887 2015-08-19 01:24:54 +09:00
Piro / YUKI Hiroshi
dd2f17dd53 Show/hide UI to manage parent tab correctly on Firefox 40 and later #887 2015-08-19 01:12:07 +09:00
Piro / YUKI Hiroshi
289057ce55 Fix indent #887 2015-08-19 01:03:01 +09:00
Piro / YUKI Hiroshi
4abc4413e9 Initialize "edit" UI of a bookmark correctly for Firefox 40 and later #887 2015-08-19 00:59:16 +09:00
Piro / YUKI Hiroshi
c3adaabacf Fix mismatched method call on quitEditMode #887 2015-08-19 00:27:45 +09:00
Piro / YUKI Hiroshi
80938e8858 Replace functions entirely instead of partial patching.
This should fix #887 partially. However, when I click the star button twice, there still be another error like:

~~~
treestyletab: doPatching: gEditItemOverlay._showHideRows is missing! utils.js:319:0
treestyletab: Failed to patch to gEditItemOverlay.initPanel: function initPanel(aInfo) {
    if (typeof(aInfo) != "object" || aInfo === null)
      throw new Error("aInfo must be an object.");

    // For sanity ensure that the implementer has uninited the panel before
    // trying to init it again, or we could end up leaking due to observers.
    if (this.initialized)
      this.uninitPanel(false);

    let { itemId, itemGuid, isItem,
          isURI, uri, title,
          isBookmark, bulkTagging, uris,
          visibleRows } = this._setPaneInfo(aInfo);

    let showOrCollapse =
      (rowId, isAppropriateForInput, nameInHiddenRows = null) => {
        let visible = isAppropriateForInput;
        if (visible && "hiddenRows" in aInfo && nameInHiddenRows)
          visible &= aInfo.hiddenRows.indexOf(nameInHiddenRows) == -1;
        if (visible)
          visibleRows.add(rowId);
        return !(this._element(rowId).collapsed = !visible);
      };

    if (showOrCollapse("nameRow", !bulkTagging, "name")) {
      this._initNamePicker();
      this._namePicker.readOnly = this.readOnly;
    }

    // In some cases we want to hide the location field, since it's not
    // human-readable, but we still want to initialize it.
    showOrCollapse("locationRow", isURI, "location");
    if (isURI) {
      this._initLocationField();
      this._locationField.readOnly = this.readOnly;
    }

    // hide the description field for
    if (showOrCollapse("descriptionRow", isItem && !this.readOnly,
                       "description")) {
      this._initDescriptionField();
      this._descriptionField.readOnly = this.readOnly;
    }

    if (showOrCollapse("keywordRow", isBookmark, "keyword")) {
      this._initKeywordField();
      this._keywordField.readOnly = this.readOnly;
    }

    // Collapse the tag selector if the item does not accept tags.
    if (showOrCollapse("tagsRow", isURI || bulkTagging, "tags"))
      this._initTagsField().catch(Components.utils.reportError);
    else if (!this._element("tagsSelectorRow").collapsed)
      this.toggleTagsSelector().catch(Components.utils.reportError);

    // Load in sidebar.
    if (showOrCollapse("loadInSidebarCheckbox", isBookmark, "loadInSidebar")) {
      this._initLoadInSidebar();
    }

    // Folder picker.
    // Technically we should check that the item is not moveable, but that's
    // not cheap (we don't always have the parent), and there's no use case for
    // this (it's only the Star UI that shows the folderPicker)
    if (showOrCollapse("folderRow", isItem, "folderPicker")) {
      let containerId = PlacesUtils.bookmarks.getFolderIdForItem(itemId);
      this._initFolderMenuList(containerId);
    }

    // Selection count.
    if (showOrCollapse("selectionCount", bulkTagging)) {
      this._element("itemsCountText").value =
        PlacesUIUtils.getPluralString("detailsPane.itemsCountLabel",
                                      uris.length,
                                      [uris.length]);
    }

    // Observe changes.
    if (!this._observersAdded) {
      PlacesUtils.bookmarks.addObserver(this, false);
      window.addEventListener("unload", this, false);
      this._observersAdded = true;
    }
  }
~~~
2015-08-19 00:25:47 +09:00
Xidorn Quan
1e8a1bc324 Fix Fullscreen API issue for Firefox 41+.
This is a change from bug 1161802 which makes the "fullscreen" event be
triggered after window.fullScreen value flips.
2015-08-18 12:11:23 +10:00
Xidorn Quan
075487b836 Fix sidebar in fullscreen mode for Firefox 40+.
This is a change from bug 947854 where FullScreen.mouseoverToggle is
replaced with FullScreen.{show,hide}NavToolbox. This fix detects this
and do patching accordingly.
2015-08-18 12:10:08 +10:00
Piro / YUKI Hiroshi
3eaae4cbcf Unregister event listener for SSWindowStateBusy correctly 2015-06-11 03:08:54 +09:00
YUKI Hiroshi
94428a1b2d Fix typo: handle DOMContentLoaded events correctly 2015-05-11 18:48:27 +09:00
YUKI Hiroshi
a22337abde Scroll to opened tab group after expanding animation is finished 2015-03-19 11:46:48 +09:00
YUKI Hiroshi
a8d490f468 Scroll to pened tab group with delay to avoid canceling by other triggers 2015-03-19 11:24:41 +09:00
YUKI Hiroshi
2e484f9026 Don't scroll to group tabs opened in the background 2015-03-19 10:55:06 +09:00
YUKI Hiroshi
609400e19a Scroll to opened tab group even if TMP is not installed 2015-03-19 10:47:49 +09:00
YUKI Hiroshi
65007f64e6 Scroll to tabs opened from a bookmark folder 2015-03-19 10:25:25 +09:00
Piro / YUKI Hiroshi
9f59a6ebe7 Don't do smooth scroll if it is expressly forbidden 2015-03-18 02:33:41 +09:00
YUKI Hiroshi
283a79e56c Always override ensureElementIsVisible() if animation effect is active 2015-03-17 17:59:20 +09:00
YUKI Hiroshi
784f3d875a Fix indent 2015-03-17 17:52:26 +09:00
YUKI Hiroshi
f639cf2145 Don't update ensureElementIsVisible() twice 2015-03-17 17:52:08 +09:00
YUKI Hiroshi
0d1973ced9 Update Firefox's ensureElementIsVisible() of the tab bar without eval() 2015-03-17 17:48:36 +09:00