diff --git a/CHANGELOG.md b/CHANGELOG.md index f753b1d05..6e1a9e88c 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,3 @@ - **MayhemYDG**: - Thread and post hiding changes: - The posts' menu now has a label entry listing the reasons why a post got hidden or highlighted. @@ -39,21 +38,27 @@
  • Filter (hiding, highlighting)
  • Thread Hiding
  • Linkify -
  • Auto-GIF +
  • Thumbnail Replacemenu
  • Image Hover - Support for the official catalog will be removed in the future, once the catalog mode for the index is deemed satisfactory. - Added `Original filename` variable to Sauce panel. - Fixed a bug which prevented QR cooldowns from being pruned from storage. - On Chrome, the storage could reach the quota and prevent 4chan X from saving data like QR name/mail or auto-watch for example. +- Clicking on the border of the Header will not toggle `Header auto-hide` anymore. + You can still change the setting in the Header menu → Header. +- Bugfixes **Vampiricwulf** - Flash embedding and other Flash features. -**Zixaphir** +**Zixaphir** +- Update Custom Navigation legend to reflect index mode changes. +- JSON Navigation now works for backlinks (when Quote Inlining is disabled) and backlink hashlinks. +- JSON Navigation (Index, Catalog) performance improvements. - Added a nifty bread-crumb for the JSON Navigation. - Many spiffy performance, state awareness, and sanity improvements to JSON Navigation. - +- Added a return button to the JSON Navigation that will switch you back to non-catalog view (requires NavLinks not to be hidden). ### v1.4.1 *2014-03-01* diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 4eccf46de..b71f97587 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -135,7 +135,6 @@ 'Catalog Links': [true, 'Add toggle link in header menu to turn Navigation links into links to each board\'s catalog.'], 'External Catalog': [false, 'Link to external catalog instead of the internal one.'], 'QR Shortcut': [false, 'Adds a small [QR] link in the header.'], - 'Announcement Hiding': [true, 'Add button to hide 4chan announcements.'], 'Desktop Notifications': [false, 'Enables desktop notifications across various 4chan X features.'], '404 Redirect': [true, 'Redirect dead threads and images.'], 'Keybinds': [true, 'Bind actions to keyboard shortcuts.'], @@ -2295,18 +2294,14 @@ }, setBarVisibility: function(hide) { Header.headerToggler.checked = hide; - $.event('CloseMenu'); - (hide ? $.addClass : $.rmClass)(Header.bar, 'autohide'); - return (hide ? $.addClass : $.rmClass)(doc, 'autohide'); + return (hide ? $.addClass : $.rmClass)(Header.bar, 'autohide'); }, - toggleBarVisibility: function() { - var hide, message; - hide = this.nodeName === 'INPUT' ? this.checked : !$.hasClass(Header.bar, 'autohide'); - this.checked = hide; - $.set('Header auto-hide', Conf['Header auto-hide'] = hide); - Header.setBarVisibility(hide); - message = "The header bar will " + (hide ? 'automatically hide itself.' : 'remain visible.'); - return new Notice('info', message, 2); + toggleBarVisibility: function(e) { + var hide; + hide = this.checked; + Conf['Header auto-hide'] = hide; + $.set('Header auto-hide', hide); + return Header.setBarVisibility(hide); }, setHideBarOnScroll: function(hide) { Header.scrollHeaderToggler.checked = hide; @@ -5098,6 +5093,9 @@ }), order: 20, open: function(post) { + if (post.isReply) { + return false; + } this.el.textContent = post.isHidden ? 'Unhide thread' : 'Hide thread'; if (this.cb) { $.off(this.el, 'click', this.cb); @@ -9282,7 +9280,9 @@ }; })(), toggle: function(e) { - return Menu.menu.toggle(e, this, Get.postFromNode(this)); + var fullID; + fullID = $.x('ancestor::*[@data-full-i-d]', this).dataset.fullID; + return Menu.menu.toggle(e, this, g.posts[fullID]); } }; @@ -10909,9 +10909,6 @@ PSAHiding = { init: function() { - if (!Conf['Announcement Hiding']) { - return; - } $.addClass(doc, 'hide-announcement'); return $.on(d, '4chanXInitFinished', this.setup); }, diff --git a/builds/crx/script.js b/builds/crx/script.js index f36219a85..0f9f91260 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -111,7 +111,6 @@ 'Catalog Links': [true, 'Add toggle link in header menu to turn Navigation links into links to each board\'s catalog.'], 'External Catalog': [false, 'Link to external catalog instead of the internal one.'], 'QR Shortcut': [false, 'Adds a small [QR] link in the header.'], - 'Announcement Hiding': [true, 'Add button to hide 4chan announcements.'], 'Desktop Notifications': [false, 'Enables desktop notifications across various 4chan X features.'], '404 Redirect': [true, 'Redirect dead threads and images.'], 'Keybinds': [true, 'Bind actions to keyboard shortcuts.'], @@ -2354,18 +2353,14 @@ }, setBarVisibility: function(hide) { Header.headerToggler.checked = hide; - $.event('CloseMenu'); - (hide ? $.addClass : $.rmClass)(Header.bar, 'autohide'); - return (hide ? $.addClass : $.rmClass)(doc, 'autohide'); + return (hide ? $.addClass : $.rmClass)(Header.bar, 'autohide'); }, - toggleBarVisibility: function() { - var hide, message; - hide = this.nodeName === 'INPUT' ? this.checked : !$.hasClass(Header.bar, 'autohide'); - this.checked = hide; - $.set('Header auto-hide', Conf['Header auto-hide'] = hide); - Header.setBarVisibility(hide); - message = "The header bar will " + (hide ? 'automatically hide itself.' : 'remain visible.'); - return new Notice('info', message, 2); + toggleBarVisibility: function(e) { + var hide; + hide = this.checked; + Conf['Header auto-hide'] = hide; + $.set('Header auto-hide', hide); + return Header.setBarVisibility(hide); }, setHideBarOnScroll: function(hide) { Header.scrollHeaderToggler.checked = hide; @@ -5150,6 +5145,9 @@ }), order: 20, open: function(post) { + if (post.isReply) { + return false; + } this.el.textContent = post.isHidden ? 'Unhide thread' : 'Hide thread'; if (this.cb) { $.off(this.el, 'click', this.cb); @@ -9297,7 +9295,9 @@ }; })(), toggle: function(e) { - return Menu.menu.toggle(e, this, Get.postFromNode(this)); + var fullID; + fullID = $.x('ancestor::*[@data-full-i-d]', this).dataset.fullID; + return Menu.menu.toggle(e, this, g.posts[fullID]); } }; @@ -10923,9 +10923,6 @@ PSAHiding = { init: function() { - if (!Conf['Announcement Hiding']) { - return; - } $.addClass(doc, 'hide-announcement'); return $.on(d, '4chanXInitFinished', this.setup); }, diff --git a/html/General/Index-navlinks.html b/html/General/Index-navlinks.html deleted file mode 100644 index fe613b761..000000000 --- a/html/General/Index-navlinks.html +++ /dev/null @@ -1,26 +0,0 @@ - - -  - - - - - - diff --git a/html/General/Settings-section-Main.html b/html/General/Settings-section-Main.html deleted file mode 100644 index c2d7f086c..000000000 --- a/html/General/Settings-section-Main.html +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/html/General/Settings.html b/html/General/Settings.html deleted file mode 100644 index f2f2ae111..000000000 --- a/html/General/Settings.html +++ /dev/null @@ -1,15 +0,0 @@ -
    - -
    -
    diff --git a/html/Posting/QR.html b/html/Posting/QR.html deleted file mode 100644 index 3b683ef2c..000000000 --- a/html/Posting/QR.html +++ /dev/null @@ -1,35 +0,0 @@ -
    - - - - -
    -
    -
    - - - - -
    -
    - -
    - - -
    -
    - - - - No selected file - - - - -
    -
    - - - diff --git a/json/archives.json b/json/archives.json index 5cf5c06dd..5afc45287 100644 --- a/json/archives.json +++ b/json/archives.json @@ -114,6 +114,6 @@ "https": true, "withCredentials": true, "software": "foolfuuka", - "boards": ["a", "biz", "co", "d", "diy", "gd", "jp", "m", "mlp", "s4s", "sci", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"], + "boards": ["a", "biz", "co", "d", "diy", "gd", "jp", "m", "s4s", "sci", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"], "files": ["a", "biz", "d", "diy", "gd", "jp", "m", "s4s", "sci", "tg", "u", "vg", "vp", "vr", "wsg"] }] diff --git a/package.json b/package.json index 3e5f4c45d..e3291d38f 100755 --- a/package.json +++ b/package.json @@ -28,13 +28,13 @@ "font-awesome": "~4.0.3", "grunt": "~0.4.2", "grunt-bump": "~0.0.13", - "grunt-concurrent": "~0.4.3", + "grunt-concurrent": "~0.5.0", "grunt-contrib-clean": "~0.5.0", "grunt-contrib-coffee": "~0.10.0", "grunt-contrib-compress": "~0.7.0", "grunt-contrib-concat": "~0.3.0", "grunt-contrib-copy": "~0.5.0", - "grunt-contrib-watch": "~0.5.3", + "grunt-contrib-watch": "~0.6.0", "grunt-shell": "~0.6.4", "load-grunt-tasks": "~0.4.0" }, diff --git a/src/Filtering/PostHiding.coffee b/src/Filtering/PostHiding.coffee index db358cf98..d227a2f07 100755 --- a/src/Filtering/PostHiding.coffee +++ b/src/Filtering/PostHiding.coffee @@ -146,6 +146,7 @@ PostHiding = el: $.el 'a', href: 'javascript:;' order: 20 open: (post) -> + return false if post.isReply @el.textContent = if post.isHidden 'Unhide thread' else diff --git a/src/General/Config.coffee b/src/General/Config.coffee index 6d5945324..3e4f2db18 100755 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -17,10 +17,6 @@ Config = false, 'Adds a small [QR] link in the header.' ] - 'Announcement Hiding': [ - true - 'Add button to hide 4chan announcements.' - ] 'Desktop Notifications': [ false 'Enables desktop notifications across various <%= meta.name %> features.' diff --git a/src/General/Header.coffee b/src/General/Header.coffee index 7b6440e33..77849b589 100755 --- a/src/General/Header.coffee +++ b/src/General/Header.coffee @@ -1,5 +1,6 @@ Header = init: -> + @menu = new UI.Menu 'header' menuButton = $.el 'span', @@ -296,25 +297,13 @@ Header = setBarVisibility: (hide) -> Header.headerToggler.checked = hide - $.event 'CloseMenu' (if hide then $.addClass else $.rmClass) Header.bar, 'autohide' - (if hide then $.addClass else $.rmClass) doc, 'autohide' - toggleBarVisibility: -> - hide = if @nodeName is 'INPUT' - @checked - else - !$.hasClass Header.bar, 'autohide' - # set checked status if called from keybind - @checked = hide - - $.set 'Header auto-hide', Conf['Header auto-hide'] = hide + toggleBarVisibility: (e) -> + hide = @checked + Conf['Header auto-hide'] = hide + $.set 'Header auto-hide', hide Header.setBarVisibility hide - message = "The header bar will #{if hide - 'automatically hide itself.' - else - 'remain visible.'}" - new Notice 'info', message, 2 setHideBarOnScroll: (hide) -> Header.scrollHeaderToggler.checked = hide diff --git a/src/Menu/Menu.coffee b/src/Menu/Menu.coffee index 25eed8c83..8f8b14152 100755 --- a/src/Menu/Menu.coffee +++ b/src/Menu/Menu.coffee @@ -35,4 +35,5 @@ Menu = button toggle: (e) -> - Menu.menu.toggle e, @, Get.postFromNode @ + fullID = $.x('ancestor::*[@data-full-i-d]', @).dataset.fullID + Menu.menu.toggle e, @, g.posts[fullID] diff --git a/src/Miscellaneous/AnnouncementHiding.coffee b/src/Miscellaneous/AnnouncementHiding.coffee index 44f676da6..bda6bf64a 100755 --- a/src/Miscellaneous/AnnouncementHiding.coffee +++ b/src/Miscellaneous/AnnouncementHiding.coffee @@ -1,6 +1,5 @@ PSAHiding = init: -> - return if !Conf['Announcement Hiding'] $.addClass doc, 'hide-announcement' $.on d, '4chanXInitFinished', @setup