diff --git a/builds/appchan-x.js b/builds/appchan-x.js index 7f99208c1..788d931a3 100644 --- a/builds/appchan-x.js +++ b/builds/appchan-x.js @@ -10887,27 +10887,61 @@ init: function() { $.asap((function() { return d.body; - }), MascotTools.init); - $.ready(function() { - if (!$.id('navtopright')) { - return; - } - return setTimeout((function() { - var exLink; + }), this.asapInit); + $.ready(this.readyInit); + return this.setup(); + }, + asapInit: function() { + MascotTools.init(); + if (g.VIEW === 'index') { + return $.asap((function() { + return $('.mPagelist'); + }), function() { + var next, nextA, nextAction, prev, prevA, prevAction; - Style.padding.nav = Header.bar; - Style.padding.pages = $(".pagelist", d.body); - Style.padding(); - $.on(window, "resize", Style.padding); - Style.iconPositions(); - if (exLink = $("#navtopright .exlinksOptionsLink", d.body)) { - return $.on(exLink, "click", function() { - return setTimeout(Rice.nodes, 100); + prev = $(".pagelist > .prev"); + prevA = $.el('a', { + textContent: '<' + }); + next = $(".pagelist > .next"); + nextA = $.el('a', { + textContent: '>' + }); + if ((prevAction = prev.firstElementChild).nodeName === 'FORM') { + prevA.href = 'javascript:;'; + $.on(prevA, 'click', function() { + return prevAction.firstElementChild.click(); }); } - }), 500); - }); - return this.setup(); + if ((nextAction = next.firstElementChild).nodeName === 'FORM') { + nextA.href = 'javascript:;'; + $.on(nextA, 'click', function() { + return nextAction.firstElementChild.click(); + }); + } + $.add(prev, prevA); + return $.add(next, nextA); + }); + } + }, + readyInit: function() { + if (!$.id('navtopright')) { + return; + } + return setTimeout((function() { + var exLink; + + Style.padding.nav = Header.bar; + Style.padding.pages = $(".pagelist", d.body); + Style.padding(); + $.on(window, "resize", Style.padding); + Style.iconPositions(); + if (exLink = $("#navtopright .exlinksOptionsLink", d.body)) { + return $.on(exLink, "click", function() { + return setTimeout(Rice.nodes, 100); + }); + } + }), 500); }, agent: "-o-", sizing: "box-sizing", @@ -11056,7 +11090,7 @@ hide: 2 }[_conf['Sidebar']] || (252 + Style.sidebarOffset.W); Style.replyMargin = _conf["Post Spacing"]; - return css = "/* Cleanup */\n#absbot,\n#boardNavDesktop,\n#delPassword,\n#delform > hr:last-of-type,\n#navbotright,\n#postForm,\n#search-label,\n#search-label-bottom,\n#styleSwitcher,\n#togglePostForm,\n.boardBanner > div,\n.mobile,\n.postingMode,\n.riced,\n.sideArrows,\n.stylechanger,\nbody > br,\nbody > div[style^=\"text-align\"],\nbody > hr {\n display: none;\n}\n/* Empties */\n#qr .warning:empty,\n#qr-thread-select:empty {\n display: none;\n}\n/* File Name Trunctuate */\n.fileText:hover .fntrunc,\n.fileText:not(:hover) .fnfull {\n display: none;\n}\n/* Unnecessary */\n#qp input,\n#qp .rice,\n.inline .rice {\n display: none !important;\n}\n/* Hidden Content */\n.forwarded,\n.hidden,\n.hidden_thread ~ div,\n.hidden_thread ~ a,\n.replyContainer .stub ~ div,\n.replyContainer .stub ~ a,\n.stub + div,\n[hidden] {\n display: none !important;\n}\n/* Hidden UI */\n#catalog,\n#navlinks,\n#navtopright,\n.cataloglink,\n.navLinks,\na[style=\"cursor: pointer; float: right;\"] {\n position: fixed;\n top: 100%;\n left: 100%;\n}\n/* Hide last horizontal rule, keep clear functionality. */\n.board > hr:last-of-type {\n visibility: hidden;\n}\n/* Fappe Tyme */\n.fappeTyme .thread > .noFile {\n display: none;\n}\n/* Defaults */\na {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n outline: none;\n}\nbody,\nhtml {\n min-height: 100%;\n " + Style.sizing + ": border-box;\n}\nbody {\n outline: none;\n font-size: " + (parseInt(_conf["Font Size"], 10)) + "px;\n font-family: " + _conf["Font"] + ";\n min-height: 100%;\n margin-top: 0;\n margin-bottom: 0;\n margin-" + Style.sidebarLocation[0] + ": " + (/^boards\.4chan\.org$/.test(location.hostname) ? Style.sidebar : '2') + "px;\n margin-" + Style.sidebarLocation[1] + ": 2px;\n padding: 0 " + (parseInt(_conf["Right Thread Padding"], 10) + editSpace["right"]) + "px 0 " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["left"]) + "px;\n}\nbody.unscroll {\n overflow: hidden;\n}\n" + (_conf["4chan SS Sidebar"] && /^boards\.4chan\.org$/.test(location.hostname) ? "body::before { content: ''; position: fixed; top: 0; bottom: 0; " + Style.sidebarLocation[0] + ": 0; width: " + (_conf['Sidebar'] === 'large' ? 305 : _conf['Sidebar'] === 'normal' ? 254 : _conf['Sidebar'] === 'minimal' ? 27 : 0) + "px; z-index: 1; " + Style.sizing + ": border-box; display: block;}body { padding-" + Style.sidebarLocation[0] + ": 2px;}" : "") + "\nbutton,\ninput,\ntextarea {\n font-size: " + (parseInt(_conf["Font Size"], 10)) + "px;\n font-family: " + _conf["Font"] + ";\n}\nhr {\n clear: both;\n border: 0;\n padding: 0;\n margin: 0 0 1px;\n " + (_conf['Hide Horizontal Rules'] ? 'visibility: hidden;' : '') + "\n}\n.center {\n text-align: center;\n}\n.disabled {\n opacity: 0.5;\n}\n.pointer {\n cursor: pointer;\n}\n/* Symbols */\n.drop-marker {\n vertical-align: middle;\n display: inline-block;\n margin: 2px 2px 3px;\n border-top: .5em solid;\n border-right: .3em solid transparent;\n border-left: .3em solid transparent;\n}\n.brackets-wrap::before {\n content: \"\\00a0[\";\n}\n.brackets-wrap::after {\n content: \"]\\00a0\";\n}\n/* Thread / Reply Nav */\n#navlinks a {\n position: fixed;\n z-index: 12;\n opacity: 0.5;\n display: inline-block;\n border-right: 6px solid transparent;\n border-left: 6px solid transparent;\n margin: 1.5px;\n}\n/* Header */\n#header-bar {\n z-index: 6;\n border-width: 1px;\n position: absolute;\n" + (_conf['4chan SS Navigation'] ? " left: 0; right: 0; border-left: 0; border-right: 0; border-radius: 0 !important;" : " " + Style.sidebarLocation[0] + ": " + (Style.sidebar + parseInt(_conf["Right Thread Padding"], 10) + editSpace["right"]) + "px; " + Style.sidebarLocation[1] + ": " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["left"] + 2) + "px;") + "\n" + (_conf["Hide Navigation Decorations"] ? " font-size: 0; color: transparent; word-spacing: 2px;" : "") + "\n text-align: " + _conf["Navigation Alignment"] + ";\n}\n.fixed #header-bar.autohide {\n z-index: 24;\n}\n.fixed #header-bar {\n position: fixed;\n}\n.top #header-bar {\n top: 0;\n border-top-width: 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 0 0 3px 3px;" : "") + "\"\n}\n.fixed.bottom #header-bar {\n bottom: 0;\n border-bottom-width: 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px 3px 0 0;" : "") + "\"\n}\n.hide #header-bar {\n position: fixed;\n top: 110%;\n bottom: auto;\n}\n/* Header Autohide */\n.fixed #header-bar.autohide:not(:hover) {\n box-shadow: none;\n transition: all .8s .6s cubic-bezier(.55, .055, .675, .19);\n}\n.fixed.top #header-bar.autohide:not(:hover) {\n margin-bottom: -1em;\n " + agent + "transform: translateY(-100%);\n}\n.fixed.bottom #header-bar.autohide:not(:hover) {\n " + agent + "transform: translateY(100%);\n}\n#scroll-marker {\n left: 0;\n right: 0;\n height: 10px;\n position: absolute;\n}\n#header-bar #scroll-marker {\n display: none;\n}\n.fixed #header-bar #scroll-marker {\n display: block;\n}\n.fixed.top header-bar #scroll-marker {\n top: 100%;\n}\n.fixed.bottom #header-bar #scroll-marker {\n bottom: 100%;\n}\n/* Notifications */\n#notifications {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n}\n.fixed.top #notifications {\n position: absolute;\n top: 100%;\n}\n.notification {\n display: block;\n overflow: hidden;\n width: 300px;\n border: 1px solid;\n " + (_conf['Sidebar Location'] === 'left' ? 'margin-left: auto;' : '') + "\n}\n.notification:not(:first-of-type) {\n border-top: none;\n}\n.close {\n float: right;\n}\n/* Main Menu */\n#main-menu {\n margin: 0;\n border: 2px solid;\n border-radius: 10px;\n height: 14px;\n width: 14px;\n " + Style.sizing + ": border-box;\n border-color: rgb(130,130,130);\n color: rgb(130,130,130);\n}\n#main-menu::after {\n content: '';\n font-size: 10px;\n position: absolute;\n top: 50%;\n left: 50%;\n " + agent + "transform: translate(-60%, -50%);\n display: block;\n border-top: 5px solid rgb(130, 130, 130);\n border-left: 3px solid transparent;\n border-right: 3px solid transparent;\n width: 7px;\n " + Style.sizing + ": border-box;\n} \n/* Pagination */\n.pagelist {\n border-width: 1px;\n text-align: " + _conf["Pagination Alignment"] + ";\n" + (_conf['4chan SS Navigation'] ? " left: 0; right: 0; border-left: 0; border-right: 0; border-radius: 0 !important;" : " " + Style.sidebarLocation[0] + ": " + (Style.sidebar + parseInt(_conf["Right Thread Padding"], 10) + editSpace["right"]) + "px; " + Style.sidebarLocation[1] + ": " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["left"] + 2) + "px;") + "\n" + { + return css = "/* Cleanup */\n#absbot,\n#boardNavDesktop,\n#delPassword,\n#delform > hr:last-of-type,\n#navbotright,\n#postForm,\n#search-label,\n#search-label-bottom,\n#styleSwitcher,\n#togglePostForm,\n.boardBanner > div,\n.mobile,\n.next form,\n.next span,\n.postingMode,\n.prev form,\n.prev span,\n.riced,\n.sideArrows,\n.stylechanger,\nbody > br,\nbody > div[style^=\"text-align\"],\nbody > hr {\n display: none;\n}\n/* Empties */\n#qr .warning:empty,\n#qr-thread-select:empty {\n display: none;\n}\n/* File Name Trunctuate */\n.fileText:hover .fntrunc,\n.fileText:not(:hover) .fnfull {\n display: none;\n}\n/* Unnecessary */\n#qp input,\n#qp .rice,\n.inline .rice {\n display: none !important;\n}\n/* Hidden Content */\n.forwarded,\n.hidden,\n.hidden_thread ~ div,\n.hidden_thread ~ a,\n.replyContainer .stub ~ div,\n.replyContainer .stub ~ a,\n.stub + div,\n[hidden] {\n display: none !important;\n}\n/* Hidden UI */\n#catalog,\n#navlinks,\n#navtopright,\n.cataloglink,\n.navLinks,\na[style=\"cursor: pointer; float: right;\"] {\n position: fixed;\n top: 100%;\n left: 100%;\n}\n/* Hide last horizontal rule, keep clear functionality. */\n.board > hr:last-of-type {\n visibility: hidden;\n}\n/* Fappe Tyme */\n.fappeTyme .thread > .noFile {\n display: none;\n}\n/* Defaults */\na {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n outline: none;\n}\nbody,\nhtml {\n min-height: 100%;\n " + Style.sizing + ": border-box;\n}\nbody {\n outline: none;\n font-size: " + (parseInt(_conf["Font Size"], 10)) + "px;\n font-family: " + _conf["Font"] + ";\n min-height: 100%;\n margin-top: 0;\n margin-bottom: 0;\n margin-" + Style.sidebarLocation[0] + ": " + (/^boards\.4chan\.org$/.test(location.hostname) ? Style.sidebar : '2') + "px;\n margin-" + Style.sidebarLocation[1] + ": 2px;\n padding: 0 " + (parseInt(_conf["Right Thread Padding"], 10) + editSpace["right"]) + "px 0 " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["left"]) + "px;\n}\nbody.unscroll {\n overflow: hidden;\n}\n" + (_conf["4chan SS Sidebar"] && /^boards\.4chan\.org$/.test(location.hostname) ? "body::before { content: ''; position: fixed; top: 0; bottom: 0; " + Style.sidebarLocation[0] + ": 0; width: " + (_conf['Sidebar'] === 'large' ? 305 : _conf['Sidebar'] === 'normal' ? 254 : _conf['Sidebar'] === 'minimal' ? 27 : 0) + "px; z-index: 1; " + Style.sizing + ": border-box; display: block;}body { padding-" + Style.sidebarLocation[0] + ": 2px;}" : "") + "\nbutton,\ninput,\ntextarea {\n font-size: " + (parseInt(_conf["Font Size"], 10)) + "px;\n font-family: " + _conf["Font"] + ";\n}\nhr {\n clear: both;\n border: 0;\n padding: 0;\n margin: 0 0 1px;\n " + (_conf['Hide Horizontal Rules'] ? 'visibility: hidden;' : '') + "\n}\n.center {\n text-align: center;\n}\n.disabled {\n opacity: 0.5;\n}\n.pointer {\n cursor: pointer;\n}\n/* Symbols */\n.drop-marker {\n vertical-align: middle;\n display: inline-block;\n margin: 2px 2px 3px;\n border-top: .5em solid;\n border-right: .3em solid transparent;\n border-left: .3em solid transparent;\n}\n.brackets-wrap::before {\n content: \"\\00a0[\";\n}\n.brackets-wrap::after {\n content: \"]\\00a0\";\n}\n/* Thread / Reply Nav */\n#navlinks a {\n position: fixed;\n z-index: 12;\n opacity: 0.5;\n display: inline-block;\n border-right: 6px solid transparent;\n border-left: 6px solid transparent;\n margin: 1.5px;\n}\n/* Header */\n#header-bar {\n z-index: 6;\n border-width: 1px;\n position: absolute;\n" + (_conf['4chan SS Navigation'] ? " left: 0; right: 0; border-left: 0; border-right: 0; border-radius: 0 !important;" : " " + Style.sidebarLocation[0] + ": " + (Style.sidebar + parseInt(_conf["Right Thread Padding"], 10) + editSpace["right"]) + "px; " + Style.sidebarLocation[1] + ": " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["left"] + 2) + "px;") + "\n" + (_conf["Hide Navigation Decorations"] ? " font-size: 0; color: transparent; word-spacing: 2px;" : "") + "\n text-align: " + _conf["Navigation Alignment"] + ";\n}\n.fixed #header-bar.autohide {\n z-index: 24;\n}\n.fixed #header-bar {\n position: fixed;\n}\n.top #header-bar {\n top: 0;\n border-top-width: 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 0 0 3px 3px;" : "") + "\"\n}\n.fixed.bottom #header-bar {\n bottom: 0;\n border-bottom-width: 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px 3px 0 0;" : "") + "\"\n}\n.hide #header-bar {\n position: fixed;\n top: 110%;\n bottom: auto;\n}\n/* Header Autohide */\n.fixed #header-bar.autohide:not(:hover) {\n box-shadow: none;\n transition: all .8s .6s cubic-bezier(.55, .055, .675, .19);\n}\n.fixed.top #header-bar.autohide:not(:hover) {\n margin-bottom: -1em;\n " + agent + "transform: translateY(-100%);\n}\n.fixed.bottom #header-bar.autohide:not(:hover) {\n " + agent + "transform: translateY(100%);\n}\n#scroll-marker {\n left: 0;\n right: 0;\n height: 10px;\n position: absolute;\n}\n#header-bar #scroll-marker {\n display: none;\n}\n.fixed #header-bar #scroll-marker {\n display: block;\n}\n.fixed.top header-bar #scroll-marker {\n top: 100%;\n}\n.fixed.bottom #header-bar #scroll-marker {\n bottom: 100%;\n}\n/* Notifications */\n#notifications {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n}\n.fixed.top #notifications {\n position: absolute;\n top: 100%;\n}\n.notification {\n display: block;\n overflow: hidden;\n width: 300px;\n border: 1px solid;\n " + (_conf['Sidebar Location'] === 'left' ? 'margin-left: auto;' : '') + "\n}\n.notification:not(:first-of-type) {\n border-top: none;\n}\n.close {\n float: right;\n}\n/* Main Menu */\n#main-menu {\n margin: 0;\n border: 2px solid;\n border-radius: 10px;\n height: 14px;\n width: 14px;\n " + Style.sizing + ": border-box;\n border-color: rgb(130,130,130);\n color: rgb(130,130,130);\n}\n#main-menu::after {\n content: '';\n font-size: 10px;\n position: absolute;\n top: 50%;\n left: 50%;\n " + agent + "transform: translate(-60%, -50%);\n display: block;\n border-top: 5px solid rgb(130, 130, 130);\n border-left: 3px solid transparent;\n border-right: 3px solid transparent;\n width: 7px;\n " + Style.sizing + ": border-box;\n} \n/* Pagination */\n.pagelist {\n border-width: 1px;\n text-align: " + _conf["Pagination Alignment"] + ";\n" + (_conf['4chan SS Navigation'] ? " left: 0; right: 0; border-left: 0; border-right: 0; border-radius: 0 !important;" : " " + Style.sidebarLocation[0] + ": " + (Style.sidebar + parseInt(_conf["Right Thread Padding"], 10) + editSpace["right"]) + "px; " + Style.sidebarLocation[1] + ": " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["left"] + 2) + "px;") + "\n" + { "sticky top": " position: fixed; top: 0; border-top-width: 0; " + (_conf["Rounded Edges"] ? "border-radius: 0 0 3px 3px;" : ""), "sticky bottom": " position: fixed; bottom: 0; border-bottom-width: 0; " + (_conf["Rounded Edges"] ? "border-radius: 3px 3px 0 0;" : ""), "top": " position: absolute; top: 0; border-top-width: 0; " + (_conf["Rounded Edges"] ? "border-radius: 0 0 3px 3px;" : ""), @@ -11152,14 +11186,14 @@ return position; }; if (_conf["Icon Orientation"] === "horizontal") { - position = aligner(2, [true, _conf['Slideout Navigation'] !== 'hide', _conf['Announcements'] === 'slideout' && $('#globalMessage', d.body), notCatalog && _conf['Slideout Watcher'] && _conf['Thread Watcher'], $('#navtopright .exlinksOptionsLink', d.body), notCatalog && $('body > a[style="cursor: pointer; float: right;"]', d.body), notEither && _conf['Image Expansion'], true, notEither, g.VIEW === 'thread', notEither && _conf['Fappe Tyme'], navlinks = ((g.VIEW !== 'thread' && _conf['Index Navigation']) || (g.VIEW === 'thread' && _conf['Reply Navigation'])) && notCatalog, navlinks]); + position = aligner(2, [true, _conf['Slideout Navigation'] !== 'hide', _conf['Announcements'] === 'slideout' && $('#globalMessage', d.body), _conf['Thread Watcher'] && _conf['Slideout Watcher'], $('#navtopright .exlinksOptionsLink', d.body), notCatalog && $('body > a[style="cursor: pointer; float: right;"]', d.body), notEither && _conf['Image Expansion'], true, notEither, g.VIEW === 'thread', notEither && _conf['Fappe Tyme'], navlinks = ((g.VIEW !== 'thread' && _conf['Index Navigation']) || (g.VIEW === 'thread' && _conf['Reply Navigation'])) && notCatalog, navlinks]); iconOffset = position[position.length - 1] - (_conf['4chan SS Navigation'] ? 0 : Style.sidebar + parseInt(_conf["Right Thread Padding"], 10)); if (iconOffset < 0) { iconOffset = 0; } css += "/* 4chan X Options */\n#appchanOptions {\n " + align + ": " + position[i++] + "px;\n}\n/* Slideout Navigation */\n#boardNavDesktopFoot::after {\n " + align + ": " + position[i++] + "px;\n}\n/* Global Message */\n#globalMessage::after {\n " + align + ": " + position[i++] + "px;\n}\n/* Watcher */\n#watcher::after {\n " + align + ": " + position[i++] + "px;\n}\n/* ExLinks */\n#navtopright .exlinksOptionsLink::after {\n " + align + ": " + position[i++] + "px;\n}\n/* 4sight */\nbody > a[style=\"cursor: pointer; float: right;\"]::after {\n " + align + ": " + position[i++] + "px;\n}\n/* Expand Images */\n#img-controls {\n " + align + ": " + position[i++] + "px;\n}\n/* Main Menu */\n#main-menu {\n " + align + ": " + position[i++] + "px;\n}\n/* 4chan Catalog */\n#catalog::after {\n " + align + ": " + position[i++] + "px;\n}\n/* Back */\ndiv.navLinks > a:first-of-type::after {\n " + align + ": " + position[i++] + "px;\n}\n/* Fappe Tyme */\n#fappeTyme {\n " + align + ": " + position[i++] + "px;\n}\n/* Thread Navigation Links */\n#navlinks a {\n margin: 2px;\n top: 1px;\n}\n#navlinks a:last-of-type {\n " + align + ": " + position[i++] + "px;\n}\n#navlinks a:first-of-type {\n " + align + ": " + position[i++] + "px;\n}\n#prefetch {\n width: " + (248 + Style.sidebarOffset.W) + "px;\n " + align + ": 2px;\n top: 1.6em;\n text-align: " + Style.sidebarLocation[1] + ";\n}\n#boardNavDesktopFoot::after,\n#navtopright .exlinksOptionsLink::after,\n#appchanOptions,\n#watcher::after,\n#globalMessage::after,\n#img-controls,\n#main-menu,\n#fappeTyme,\ndiv.navLinks > a:first-of-type::after,\n#catalog::after,\nbody > a[style=\"cursor: pointer; float: right;\"]::after {\n top: 1px !important;\n}\n" + (_conf["Announcements"] === "slideout" ? "#globalMessage," : "") + "\n" + (_conf["Slideout Watcher"] ? "#watcher," : "") + "\n#boardNavDesktopFoot {\n top: 16px !important;\n}\n.fixed.top #header-bar" + (_conf['Pagination'] === 'top' || _conf['Pagination'] === 'sticky top' ? ',\n.pagelist' : '') + " {\n " + (_conf['4chan SS Navigation'] ? "padding-" + align + ": " + iconOffset + "px;" : "margin-" + align + ": " + iconOffset + "px;") + "\n}\n"; } else { - position = aligner(2 + (_conf["4chan Banner"] === "at sidebar top" ? Style.logoOffset + 19 : 0), [notEither && _conf['Image Expansion'], true, true, _conf['Slideout Navigation'] !== 'hide', _conf['Announcements'] === 'slideout' && $('#globalMessage', d.body), notCatalog && _conf['Slideout Watcher'] && _conf['Thread Watcher'], notCatalog && $('body > a[style="cursor: pointer; float: right;"]', d.body), $('#navtopright .exlinksOptionsLink', d.body), notEither, g.VIEW === 'thread', notEither && _conf['Fappe Tyme'], navlinks = ((g.VIEW !== 'thread' && _conf['Index Navigation']) || (g.VIEW === 'thread' && _conf['Reply Navigation'])) && notCatalog, navlinks]); + position = aligner(2 + (_conf["4chan Banner"] === "at sidebar top" ? Style.logoOffset + 19 : 0), [notEither && _conf['Image Expansion'], true, true, _conf['Slideout Navigation'] !== 'hide', _conf['Announcements'] === 'slideout' && $('#globalMessage', d.body), _conf['Thread Watcher'] && _conf['Slideout Watcher'], notCatalog && $('body > a[style="cursor: pointer; float: right;"]', d.body), $('#navtopright .exlinksOptionsLink', d.body), notEither, g.VIEW === 'thread', notEither && _conf['Fappe Tyme'], navlinks = ((g.VIEW !== 'thread' && _conf['Index Navigation']) || (g.VIEW === 'thread' && _conf['Reply Navigation'])) && notCatalog, navlinks]); iconOffset = (g.VIEW === 'thread' && _conf['Prefetch'] ? 250 + Style.sidebarOffset.W : 20 + (g.VIEW === 'thread' && _conf['Updater Position'] === 'top' ? 100 : 0)) - (_conf['4chan SS Navigation'] ? 0 : Style.sidebar + parseInt(_conf[align.capitalize() + " Thread Padding"], 10)); css += "/* Expand Images */\n#img-controls {\n top: " + position[i++] + "px;\n}\n/* Main Menu */\n#main-menu {\n top: " + position[i++] + "px;\n}\n/* 4chan X Options */\n#appchanOptions {\n top: " + position[i++] + "px;\n}\n/* Slideout Navigation */\n#boardNavDesktopFoot,\n#boardNavDesktopFoot::after {\n top: " + position[i++] + "px;\n}\n/* Global Message */\n#globalMessage,\n#globalMessage::after {\n top: " + position[i++] + "px;\n}\n/* Watcher */\n" + (_conf["Slideout Watcher"] ? "#watcher, #watcher::after" : "") + " {\n top: " + position[i++] + "px !important;\n}\n/* 4sight */\nbody > a[style=\"cursor: pointer; float: right;\"]::after {\n top: " + position[i++] + "px;\n}\n/* ExLinks */\n#navtopright .exlinksOptionsLink::after {\n top: " + position[i++] + "px;\n}\n/* 4chan Catalog */\n#catalog::after {\n top: " + position[i++] + "px;\n}\n/* Back */\ndiv.navLinks > a:first-of-type::after {\n top: " + position[i++] + "px;\n}\n/* Fappe Tyme */\n#fappeTyme {\n top: " + position[i++] + "px;\n}\n/* Thread Navigation Links */\n#navlinks a:first-of-type {\n top: " + position[i++] + "px !important;\n}\n#navlinks a:last-of-type {\n top: " + position[i++] + "px !important;\n}\n#prefetch {\n width: " + (248 + Style.sidebarOffset.W) + "px;\n " + align + ": 2px;\n top: 0;\n text-align: " + Style.sidebarLocation[1] + ";\n}\n#navlinks a,\n#navtopright .exlinksOptionsLink::after,\n#appchanOptions,\n#boardNavDesktopFoot::after,\n#globalMessage::after,\n#img-controls,\n#main-menu,\n#fappeTyme,\n" + (_conf["Slideout Watcher"] ? "#watcher::after," : "") + "\nbody > a[style=\"cursor: pointer; float: right;\"]::after,\n#catalog::after,\ndiv.navLinks > a:first-of-type::after {\n " + align + ": 3px !important;\n}\n#boardNavDesktopFoot,\n#globalMessage,\n#watcher {\n width: " + (233 + Style.sidebarOffset.W) + "px !important;\n " + align + ": 18px !important;\n}\n.fixed.top #header-bar" + (_conf['Pagination'] === 'top' || _conf['Pagination'] === 'sticky top' ? ',\n.pagelist' : '') + " {\n " + (_conf['4chan SS Navigation'] ? "padding-" + align + ": " + iconOffset + "px;" : "margin-" + align + ": " + iconOffset + "px;") + "\n}"; } diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 1f93b07b2..d38d71cb4 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -10908,27 +10908,61 @@ init: function() { $.asap((function() { return d.body; - }), MascotTools.init); - $.ready(function() { - if (!$.id('navtopright')) { - return; - } - return setTimeout((function() { - var exLink; + }), this.asapInit); + $.ready(this.readyInit); + return this.setup(); + }, + asapInit: function() { + MascotTools.init(); + if (g.VIEW === 'index') { + return $.asap((function() { + return $('.mPagelist'); + }), function() { + var next, nextA, nextAction, prev, prevA, prevAction; - Style.padding.nav = Header.bar; - Style.padding.pages = $(".pagelist", d.body); - Style.padding(); - $.on(window, "resize", Style.padding); - Style.iconPositions(); - if (exLink = $("#navtopright .exlinksOptionsLink", d.body)) { - return $.on(exLink, "click", function() { - return setTimeout(Rice.nodes, 100); + prev = $(".pagelist > .prev"); + prevA = $.el('a', { + textContent: '<' + }); + next = $(".pagelist > .next"); + nextA = $.el('a', { + textContent: '>' + }); + if ((prevAction = prev.firstElementChild).nodeName === 'FORM') { + prevA.href = 'javascript:;'; + $.on(prevA, 'click', function() { + return prevAction.firstElementChild.click(); }); } - }), 500); - }); - return this.setup(); + if ((nextAction = next.firstElementChild).nodeName === 'FORM') { + nextA.href = 'javascript:;'; + $.on(nextA, 'click', function() { + return nextAction.firstElementChild.click(); + }); + } + $.add(prev, prevA); + return $.add(next, nextA); + }); + } + }, + readyInit: function() { + if (!$.id('navtopright')) { + return; + } + return setTimeout((function() { + var exLink; + + Style.padding.nav = Header.bar; + Style.padding.pages = $(".pagelist", d.body); + Style.padding(); + $.on(window, "resize", Style.padding); + Style.iconPositions(); + if (exLink = $("#navtopright .exlinksOptionsLink", d.body)) { + return $.on(exLink, "click", function() { + return setTimeout(Rice.nodes, 100); + }); + } + }), 500); }, agent: "-moz-", sizing: "-moz-box-sizing", @@ -11077,7 +11111,7 @@ hide: 2 }[_conf['Sidebar']] || (252 + Style.sidebarOffset.W); Style.replyMargin = _conf["Post Spacing"]; - return css = "/* Cleanup */\n#absbot,\n#boardNavDesktop,\n#delPassword,\n#delform > hr:last-of-type,\n#navbotright,\n#postForm,\n#search-label,\n#search-label-bottom,\n#styleSwitcher,\n#togglePostForm,\n.boardBanner > div,\n.mobile,\n.postingMode,\n.riced,\n.sideArrows,\n.stylechanger,\nbody > br,\nbody > div[style^=\"text-align\"],\nbody > hr {\n display: none;\n}\n/* Empties */\n#qr .warning:empty,\n#qr-thread-select:empty {\n display: none;\n}\n/* File Name Trunctuate */\n.fileText:hover .fntrunc,\n.fileText:not(:hover) .fnfull {\n display: none;\n}\n/* Unnecessary */\n#qp input,\n#qp .rice,\n.inline .rice {\n display: none !important;\n}\n/* Hidden Content */\n.forwarded,\n.hidden,\n.hidden_thread ~ div,\n.hidden_thread ~ a,\n.replyContainer .stub ~ div,\n.replyContainer .stub ~ a,\n.stub + div,\n[hidden] {\n display: none !important;\n}\n/* Hidden UI */\n#catalog,\n#navlinks,\n#navtopright,\n.cataloglink,\n.navLinks,\na[style=\"cursor: pointer; float: right;\"] {\n position: fixed;\n top: 100%;\n left: 100%;\n}\n/* Hide last horizontal rule, keep clear functionality. */\n.board > hr:last-of-type {\n visibility: hidden;\n}\n/* Fappe Tyme */\n.fappeTyme .thread > .noFile {\n display: none;\n}\n/* Defaults */\na {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n outline: none;\n}\nbody,\nhtml {\n min-height: 100%;\n " + Style.sizing + ": border-box;\n}\nbody {\n outline: none;\n font-size: " + (parseInt(_conf["Font Size"], 10)) + "px;\n font-family: " + _conf["Font"] + ";\n min-height: 100%;\n margin-top: 0;\n margin-bottom: 0;\n margin-" + Style.sidebarLocation[0] + ": " + (/^boards\.4chan\.org$/.test(location.hostname) ? Style.sidebar : '2') + "px;\n margin-" + Style.sidebarLocation[1] + ": 2px;\n padding: 0 " + (parseInt(_conf["Right Thread Padding"], 10) + editSpace["right"]) + "px 0 " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["left"]) + "px;\n}\nbody.unscroll {\n overflow: hidden;\n}\n" + (_conf["4chan SS Sidebar"] && /^boards\.4chan\.org$/.test(location.hostname) ? "body::before { content: ''; position: fixed; top: 0; bottom: 0; " + Style.sidebarLocation[0] + ": 0; width: " + (_conf['Sidebar'] === 'large' ? 305 : _conf['Sidebar'] === 'normal' ? 254 : _conf['Sidebar'] === 'minimal' ? 27 : 0) + "px; z-index: 1; " + Style.sizing + ": border-box; display: block;}body { padding-" + Style.sidebarLocation[0] + ": 2px;}" : "") + "\nbutton,\ninput,\ntextarea {\n font-size: " + (parseInt(_conf["Font Size"], 10)) + "px;\n font-family: " + _conf["Font"] + ";\n}\nhr {\n clear: both;\n border: 0;\n padding: 0;\n margin: 0 0 1px;\n " + (_conf['Hide Horizontal Rules'] ? 'visibility: hidden;' : '') + "\n}\n.center {\n text-align: center;\n}\n.disabled {\n opacity: 0.5;\n}\n.pointer {\n cursor: pointer;\n}\n/* Symbols */\n.drop-marker {\n vertical-align: middle;\n display: inline-block;\n margin: 2px 2px 3px;\n border-top: .5em solid;\n border-right: .3em solid transparent;\n border-left: .3em solid transparent;\n}\n.brackets-wrap::before {\n content: \"\\00a0[\";\n}\n.brackets-wrap::after {\n content: \"]\\00a0\";\n}\n/* Thread / Reply Nav */\n#navlinks a {\n position: fixed;\n z-index: 12;\n opacity: 0.5;\n display: inline-block;\n border-right: 6px solid transparent;\n border-left: 6px solid transparent;\n margin: 1.5px;\n}\n/* Header */\n#header-bar {\n z-index: 6;\n border-width: 1px;\n position: absolute;\n" + (_conf['4chan SS Navigation'] ? " left: 0; right: 0; border-left: 0; border-right: 0; border-radius: 0 !important;" : " " + Style.sidebarLocation[0] + ": " + (Style.sidebar + parseInt(_conf["Right Thread Padding"], 10) + editSpace["right"]) + "px; " + Style.sidebarLocation[1] + ": " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["left"] + 2) + "px;") + "\n" + (_conf["Hide Navigation Decorations"] ? " font-size: 0; color: transparent; word-spacing: 2px;" : "") + "\n text-align: " + _conf["Navigation Alignment"] + ";\n}\n.fixed #header-bar.autohide {\n z-index: 24;\n}\n.fixed #header-bar {\n position: fixed;\n}\n.top #header-bar {\n top: 0;\n border-top-width: 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 0 0 3px 3px;" : "") + "\"\n}\n.fixed.bottom #header-bar {\n bottom: 0;\n border-bottom-width: 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px 3px 0 0;" : "") + "\"\n}\n.hide #header-bar {\n position: fixed;\n top: 110%;\n bottom: auto;\n}\n/* Header Autohide */\n.fixed #header-bar.autohide:not(:hover) {\n box-shadow: none;\n transition: all .8s .6s cubic-bezier(.55, .055, .675, .19);\n}\n.fixed.top #header-bar.autohide:not(:hover) {\n margin-bottom: -1em;\n " + agent + "transform: translateY(-100%);\n}\n.fixed.bottom #header-bar.autohide:not(:hover) {\n " + agent + "transform: translateY(100%);\n}\n#scroll-marker {\n left: 0;\n right: 0;\n height: 10px;\n position: absolute;\n}\n#header-bar #scroll-marker {\n display: none;\n}\n.fixed #header-bar #scroll-marker {\n display: block;\n}\n.fixed.top header-bar #scroll-marker {\n top: 100%;\n}\n.fixed.bottom #header-bar #scroll-marker {\n bottom: 100%;\n}\n/* Notifications */\n#notifications {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n}\n.fixed.top #notifications {\n position: absolute;\n top: 100%;\n}\n.notification {\n display: block;\n overflow: hidden;\n width: 300px;\n border: 1px solid;\n " + (_conf['Sidebar Location'] === 'left' ? 'margin-left: auto;' : '') + "\n}\n.notification:not(:first-of-type) {\n border-top: none;\n}\n.close {\n float: right;\n}\n/* Main Menu */\n#main-menu {\n margin: 0;\n border: 2px solid;\n border-radius: 10px;\n height: 14px;\n width: 14px;\n " + Style.sizing + ": border-box;\n border-color: rgb(130,130,130);\n color: rgb(130,130,130);\n}\n#main-menu::after {\n content: '';\n font-size: 10px;\n position: absolute;\n top: 50%;\n left: 50%;\n " + agent + "transform: translate(-60%, -50%);\n display: block;\n border-top: 5px solid rgb(130, 130, 130);\n border-left: 3px solid transparent;\n border-right: 3px solid transparent;\n width: 7px;\n " + Style.sizing + ": border-box;\n} \n/* Pagination */\n.pagelist {\n border-width: 1px;\n text-align: " + _conf["Pagination Alignment"] + ";\n" + (_conf['4chan SS Navigation'] ? " left: 0; right: 0; border-left: 0; border-right: 0; border-radius: 0 !important;" : " " + Style.sidebarLocation[0] + ": " + (Style.sidebar + parseInt(_conf["Right Thread Padding"], 10) + editSpace["right"]) + "px; " + Style.sidebarLocation[1] + ": " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["left"] + 2) + "px;") + "\n" + { + return css = "/* Cleanup */\n#absbot,\n#boardNavDesktop,\n#delPassword,\n#delform > hr:last-of-type,\n#navbotright,\n#postForm,\n#search-label,\n#search-label-bottom,\n#styleSwitcher,\n#togglePostForm,\n.boardBanner > div,\n.mobile,\n.next form,\n.next span,\n.postingMode,\n.prev form,\n.prev span,\n.riced,\n.sideArrows,\n.stylechanger,\nbody > br,\nbody > div[style^=\"text-align\"],\nbody > hr {\n display: none;\n}\n/* Empties */\n#qr .warning:empty,\n#qr-thread-select:empty {\n display: none;\n}\n/* File Name Trunctuate */\n.fileText:hover .fntrunc,\n.fileText:not(:hover) .fnfull {\n display: none;\n}\n/* Unnecessary */\n#qp input,\n#qp .rice,\n.inline .rice {\n display: none !important;\n}\n/* Hidden Content */\n.forwarded,\n.hidden,\n.hidden_thread ~ div,\n.hidden_thread ~ a,\n.replyContainer .stub ~ div,\n.replyContainer .stub ~ a,\n.stub + div,\n[hidden] {\n display: none !important;\n}\n/* Hidden UI */\n#catalog,\n#navlinks,\n#navtopright,\n.cataloglink,\n.navLinks,\na[style=\"cursor: pointer; float: right;\"] {\n position: fixed;\n top: 100%;\n left: 100%;\n}\n/* Hide last horizontal rule, keep clear functionality. */\n.board > hr:last-of-type {\n visibility: hidden;\n}\n/* Fappe Tyme */\n.fappeTyme .thread > .noFile {\n display: none;\n}\n/* Defaults */\na {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n outline: none;\n}\nbody,\nhtml {\n min-height: 100%;\n " + Style.sizing + ": border-box;\n}\nbody {\n outline: none;\n font-size: " + (parseInt(_conf["Font Size"], 10)) + "px;\n font-family: " + _conf["Font"] + ";\n min-height: 100%;\n margin-top: 0;\n margin-bottom: 0;\n margin-" + Style.sidebarLocation[0] + ": " + (/^boards\.4chan\.org$/.test(location.hostname) ? Style.sidebar : '2') + "px;\n margin-" + Style.sidebarLocation[1] + ": 2px;\n padding: 0 " + (parseInt(_conf["Right Thread Padding"], 10) + editSpace["right"]) + "px 0 " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["left"]) + "px;\n}\nbody.unscroll {\n overflow: hidden;\n}\n" + (_conf["4chan SS Sidebar"] && /^boards\.4chan\.org$/.test(location.hostname) ? "body::before { content: ''; position: fixed; top: 0; bottom: 0; " + Style.sidebarLocation[0] + ": 0; width: " + (_conf['Sidebar'] === 'large' ? 305 : _conf['Sidebar'] === 'normal' ? 254 : _conf['Sidebar'] === 'minimal' ? 27 : 0) + "px; z-index: 1; " + Style.sizing + ": border-box; display: block;}body { padding-" + Style.sidebarLocation[0] + ": 2px;}" : "") + "\nbutton,\ninput,\ntextarea {\n font-size: " + (parseInt(_conf["Font Size"], 10)) + "px;\n font-family: " + _conf["Font"] + ";\n}\nhr {\n clear: both;\n border: 0;\n padding: 0;\n margin: 0 0 1px;\n " + (_conf['Hide Horizontal Rules'] ? 'visibility: hidden;' : '') + "\n}\n.center {\n text-align: center;\n}\n.disabled {\n opacity: 0.5;\n}\n.pointer {\n cursor: pointer;\n}\n/* Symbols */\n.drop-marker {\n vertical-align: middle;\n display: inline-block;\n margin: 2px 2px 3px;\n border-top: .5em solid;\n border-right: .3em solid transparent;\n border-left: .3em solid transparent;\n}\n.brackets-wrap::before {\n content: \"\\00a0[\";\n}\n.brackets-wrap::after {\n content: \"]\\00a0\";\n}\n/* Thread / Reply Nav */\n#navlinks a {\n position: fixed;\n z-index: 12;\n opacity: 0.5;\n display: inline-block;\n border-right: 6px solid transparent;\n border-left: 6px solid transparent;\n margin: 1.5px;\n}\n/* Header */\n#header-bar {\n z-index: 6;\n border-width: 1px;\n position: absolute;\n" + (_conf['4chan SS Navigation'] ? " left: 0; right: 0; border-left: 0; border-right: 0; border-radius: 0 !important;" : " " + Style.sidebarLocation[0] + ": " + (Style.sidebar + parseInt(_conf["Right Thread Padding"], 10) + editSpace["right"]) + "px; " + Style.sidebarLocation[1] + ": " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["left"] + 2) + "px;") + "\n" + (_conf["Hide Navigation Decorations"] ? " font-size: 0; color: transparent; word-spacing: 2px;" : "") + "\n text-align: " + _conf["Navigation Alignment"] + ";\n}\n.fixed #header-bar.autohide {\n z-index: 24;\n}\n.fixed #header-bar {\n position: fixed;\n}\n.top #header-bar {\n top: 0;\n border-top-width: 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 0 0 3px 3px;" : "") + "\"\n}\n.fixed.bottom #header-bar {\n bottom: 0;\n border-bottom-width: 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px 3px 0 0;" : "") + "\"\n}\n.hide #header-bar {\n position: fixed;\n top: 110%;\n bottom: auto;\n}\n/* Header Autohide */\n.fixed #header-bar.autohide:not(:hover) {\n box-shadow: none;\n transition: all .8s .6s cubic-bezier(.55, .055, .675, .19);\n}\n.fixed.top #header-bar.autohide:not(:hover) {\n margin-bottom: -1em;\n " + agent + "transform: translateY(-100%);\n}\n.fixed.bottom #header-bar.autohide:not(:hover) {\n " + agent + "transform: translateY(100%);\n}\n#scroll-marker {\n left: 0;\n right: 0;\n height: 10px;\n position: absolute;\n}\n#header-bar #scroll-marker {\n display: none;\n}\n.fixed #header-bar #scroll-marker {\n display: block;\n}\n.fixed.top header-bar #scroll-marker {\n top: 100%;\n}\n.fixed.bottom #header-bar #scroll-marker {\n bottom: 100%;\n}\n/* Notifications */\n#notifications {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n}\n.fixed.top #notifications {\n position: absolute;\n top: 100%;\n}\n.notification {\n display: block;\n overflow: hidden;\n width: 300px;\n border: 1px solid;\n " + (_conf['Sidebar Location'] === 'left' ? 'margin-left: auto;' : '') + "\n}\n.notification:not(:first-of-type) {\n border-top: none;\n}\n.close {\n float: right;\n}\n/* Main Menu */\n#main-menu {\n margin: 0;\n border: 2px solid;\n border-radius: 10px;\n height: 14px;\n width: 14px;\n " + Style.sizing + ": border-box;\n border-color: rgb(130,130,130);\n color: rgb(130,130,130);\n}\n#main-menu::after {\n content: '';\n font-size: 10px;\n position: absolute;\n top: 50%;\n left: 50%;\n " + agent + "transform: translate(-60%, -50%);\n display: block;\n border-top: 5px solid rgb(130, 130, 130);\n border-left: 3px solid transparent;\n border-right: 3px solid transparent;\n width: 7px;\n " + Style.sizing + ": border-box;\n} \n/* Pagination */\n.pagelist {\n border-width: 1px;\n text-align: " + _conf["Pagination Alignment"] + ";\n" + (_conf['4chan SS Navigation'] ? " left: 0; right: 0; border-left: 0; border-right: 0; border-radius: 0 !important;" : " " + Style.sidebarLocation[0] + ": " + (Style.sidebar + parseInt(_conf["Right Thread Padding"], 10) + editSpace["right"]) + "px; " + Style.sidebarLocation[1] + ": " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["left"] + 2) + "px;") + "\n" + { "sticky top": " position: fixed; top: 0; border-top-width: 0; " + (_conf["Rounded Edges"] ? "border-radius: 0 0 3px 3px;" : ""), "sticky bottom": " position: fixed; bottom: 0; border-bottom-width: 0; " + (_conf["Rounded Edges"] ? "border-radius: 3px 3px 0 0;" : ""), "top": " position: absolute; top: 0; border-top-width: 0; " + (_conf["Rounded Edges"] ? "border-radius: 0 0 3px 3px;" : ""), @@ -11173,14 +11207,14 @@ return position; }; if (_conf["Icon Orientation"] === "horizontal") { - position = aligner(2, [true, _conf['Slideout Navigation'] !== 'hide', _conf['Announcements'] === 'slideout' && $('#globalMessage', d.body), notCatalog && _conf['Slideout Watcher'] && _conf['Thread Watcher'], $('#navtopright .exlinksOptionsLink', d.body), notCatalog && $('body > a[style="cursor: pointer; float: right;"]', d.body), notEither && _conf['Image Expansion'], true, notEither, g.VIEW === 'thread', notEither && _conf['Fappe Tyme'], navlinks = ((g.VIEW !== 'thread' && _conf['Index Navigation']) || (g.VIEW === 'thread' && _conf['Reply Navigation'])) && notCatalog, navlinks]); + position = aligner(2, [true, _conf['Slideout Navigation'] !== 'hide', _conf['Announcements'] === 'slideout' && $('#globalMessage', d.body), _conf['Thread Watcher'] && _conf['Slideout Watcher'], $('#navtopright .exlinksOptionsLink', d.body), notCatalog && $('body > a[style="cursor: pointer; float: right;"]', d.body), notEither && _conf['Image Expansion'], true, notEither, g.VIEW === 'thread', notEither && _conf['Fappe Tyme'], navlinks = ((g.VIEW !== 'thread' && _conf['Index Navigation']) || (g.VIEW === 'thread' && _conf['Reply Navigation'])) && notCatalog, navlinks]); iconOffset = position[position.length - 1] - (_conf['4chan SS Navigation'] ? 0 : Style.sidebar + parseInt(_conf["Right Thread Padding"], 10)); if (iconOffset < 0) { iconOffset = 0; } css += "/* 4chan X Options */\n#appchanOptions {\n " + align + ": " + position[i++] + "px;\n}\n/* Slideout Navigation */\n#boardNavDesktopFoot::after {\n " + align + ": " + position[i++] + "px;\n}\n/* Global Message */\n#globalMessage::after {\n " + align + ": " + position[i++] + "px;\n}\n/* Watcher */\n#watcher::after {\n " + align + ": " + position[i++] + "px;\n}\n/* ExLinks */\n#navtopright .exlinksOptionsLink::after {\n " + align + ": " + position[i++] + "px;\n}\n/* 4sight */\nbody > a[style=\"cursor: pointer; float: right;\"]::after {\n " + align + ": " + position[i++] + "px;\n}\n/* Expand Images */\n#img-controls {\n " + align + ": " + position[i++] + "px;\n}\n/* Main Menu */\n#main-menu {\n " + align + ": " + position[i++] + "px;\n}\n/* 4chan Catalog */\n#catalog::after {\n " + align + ": " + position[i++] + "px;\n}\n/* Back */\ndiv.navLinks > a:first-of-type::after {\n " + align + ": " + position[i++] + "px;\n}\n/* Fappe Tyme */\n#fappeTyme {\n " + align + ": " + position[i++] + "px;\n}\n/* Thread Navigation Links */\n#navlinks a {\n margin: 2px;\n top: 1px;\n}\n#navlinks a:last-of-type {\n " + align + ": " + position[i++] + "px;\n}\n#navlinks a:first-of-type {\n " + align + ": " + position[i++] + "px;\n}\n#prefetch {\n width: " + (248 + Style.sidebarOffset.W) + "px;\n " + align + ": 2px;\n top: 1.6em;\n text-align: " + Style.sidebarLocation[1] + ";\n}\n#boardNavDesktopFoot::after,\n#navtopright .exlinksOptionsLink::after,\n#appchanOptions,\n#watcher::after,\n#globalMessage::after,\n#img-controls,\n#main-menu,\n#fappeTyme,\ndiv.navLinks > a:first-of-type::after,\n#catalog::after,\nbody > a[style=\"cursor: pointer; float: right;\"]::after {\n top: 1px !important;\n}\n" + (_conf["Announcements"] === "slideout" ? "#globalMessage," : "") + "\n" + (_conf["Slideout Watcher"] ? "#watcher," : "") + "\n#boardNavDesktopFoot {\n top: 16px !important;\n}\n.fixed.top #header-bar" + (_conf['Pagination'] === 'top' || _conf['Pagination'] === 'sticky top' ? ',\n.pagelist' : '') + " {\n " + (_conf['4chan SS Navigation'] ? "padding-" + align + ": " + iconOffset + "px;" : "margin-" + align + ": " + iconOffset + "px;") + "\n}\n"; } else { - position = aligner(2 + (_conf["4chan Banner"] === "at sidebar top" ? Style.logoOffset + 19 : 0), [notEither && _conf['Image Expansion'], true, true, _conf['Slideout Navigation'] !== 'hide', _conf['Announcements'] === 'slideout' && $('#globalMessage', d.body), notCatalog && _conf['Slideout Watcher'] && _conf['Thread Watcher'], notCatalog && $('body > a[style="cursor: pointer; float: right;"]', d.body), $('#navtopright .exlinksOptionsLink', d.body), notEither, g.VIEW === 'thread', notEither && _conf['Fappe Tyme'], navlinks = ((g.VIEW !== 'thread' && _conf['Index Navigation']) || (g.VIEW === 'thread' && _conf['Reply Navigation'])) && notCatalog, navlinks]); + position = aligner(2 + (_conf["4chan Banner"] === "at sidebar top" ? Style.logoOffset + 19 : 0), [notEither && _conf['Image Expansion'], true, true, _conf['Slideout Navigation'] !== 'hide', _conf['Announcements'] === 'slideout' && $('#globalMessage', d.body), _conf['Thread Watcher'] && _conf['Slideout Watcher'], notCatalog && $('body > a[style="cursor: pointer; float: right;"]', d.body), $('#navtopright .exlinksOptionsLink', d.body), notEither, g.VIEW === 'thread', notEither && _conf['Fappe Tyme'], navlinks = ((g.VIEW !== 'thread' && _conf['Index Navigation']) || (g.VIEW === 'thread' && _conf['Reply Navigation'])) && notCatalog, navlinks]); iconOffset = (g.VIEW === 'thread' && _conf['Prefetch'] ? 250 + Style.sidebarOffset.W : 20 + (g.VIEW === 'thread' && _conf['Updater Position'] === 'top' ? 100 : 0)) - (_conf['4chan SS Navigation'] ? 0 : Style.sidebar + parseInt(_conf[align.capitalize() + " Thread Padding"], 10)); css += "/* Expand Images */\n#img-controls {\n top: " + position[i++] + "px;\n}\n/* Main Menu */\n#main-menu {\n top: " + position[i++] + "px;\n}\n/* 4chan X Options */\n#appchanOptions {\n top: " + position[i++] + "px;\n}\n/* Slideout Navigation */\n#boardNavDesktopFoot,\n#boardNavDesktopFoot::after {\n top: " + position[i++] + "px;\n}\n/* Global Message */\n#globalMessage,\n#globalMessage::after {\n top: " + position[i++] + "px;\n}\n/* Watcher */\n" + (_conf["Slideout Watcher"] ? "#watcher, #watcher::after" : "") + " {\n top: " + position[i++] + "px !important;\n}\n/* 4sight */\nbody > a[style=\"cursor: pointer; float: right;\"]::after {\n top: " + position[i++] + "px;\n}\n/* ExLinks */\n#navtopright .exlinksOptionsLink::after {\n top: " + position[i++] + "px;\n}\n/* 4chan Catalog */\n#catalog::after {\n top: " + position[i++] + "px;\n}\n/* Back */\ndiv.navLinks > a:first-of-type::after {\n top: " + position[i++] + "px;\n}\n/* Fappe Tyme */\n#fappeTyme {\n top: " + position[i++] + "px;\n}\n/* Thread Navigation Links */\n#navlinks a:first-of-type {\n top: " + position[i++] + "px !important;\n}\n#navlinks a:last-of-type {\n top: " + position[i++] + "px !important;\n}\n#prefetch {\n width: " + (248 + Style.sidebarOffset.W) + "px;\n " + align + ": 2px;\n top: 0;\n text-align: " + Style.sidebarLocation[1] + ";\n}\n#navlinks a,\n#navtopright .exlinksOptionsLink::after,\n#appchanOptions,\n#boardNavDesktopFoot::after,\n#globalMessage::after,\n#img-controls,\n#main-menu,\n#fappeTyme,\n" + (_conf["Slideout Watcher"] ? "#watcher::after," : "") + "\nbody > a[style=\"cursor: pointer; float: right;\"]::after,\n#catalog::after,\ndiv.navLinks > a:first-of-type::after {\n " + align + ": 3px !important;\n}\n#boardNavDesktopFoot,\n#globalMessage,\n#watcher {\n width: " + (233 + Style.sidebarOffset.W) + "px !important;\n " + align + ": 18px !important;\n}\n.fixed.top #header-bar" + (_conf['Pagination'] === 'top' || _conf['Pagination'] === 'sticky top' ? ',\n.pagelist' : '') + " {\n " + (_conf['4chan SS Navigation'] ? "padding-" + align + ": " + iconOffset + "px;" : "margin-" + align + ": " + iconOffset + "px;") + "\n}"; } diff --git a/builds/crx/script.js b/builds/crx/script.js index edb6a94ca..7e433015d 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -10890,27 +10890,61 @@ init: function() { $.asap((function() { return d.body; - }), MascotTools.init); - $.ready(function() { - if (!$.id('navtopright')) { - return; - } - return setTimeout((function() { - var exLink; + }), this.asapInit); + $.ready(this.readyInit); + return this.setup(); + }, + asapInit: function() { + MascotTools.init(); + if (g.VIEW === 'index') { + return $.asap((function() { + return $('.mPagelist'); + }), function() { + var next, nextA, nextAction, prev, prevA, prevAction; - Style.padding.nav = Header.bar; - Style.padding.pages = $(".pagelist", d.body); - Style.padding(); - $.on(window, "resize", Style.padding); - Style.iconPositions(); - if (exLink = $("#navtopright .exlinksOptionsLink", d.body)) { - return $.on(exLink, "click", function() { - return setTimeout(Rice.nodes, 100); + prev = $(".pagelist > .prev"); + prevA = $.el('a', { + textContent: '<' + }); + next = $(".pagelist > .next"); + nextA = $.el('a', { + textContent: '>' + }); + if ((prevAction = prev.firstElementChild).nodeName === 'FORM') { + prevA.href = 'javascript:;'; + $.on(prevA, 'click', function() { + return prevAction.firstElementChild.click(); }); } - }), 500); - }); - return this.setup(); + if ((nextAction = next.firstElementChild).nodeName === 'FORM') { + nextA.href = 'javascript:;'; + $.on(nextA, 'click', function() { + return nextAction.firstElementChild.click(); + }); + } + $.add(prev, prevA); + return $.add(next, nextA); + }); + } + }, + readyInit: function() { + if (!$.id('navtopright')) { + return; + } + return setTimeout((function() { + var exLink; + + Style.padding.nav = Header.bar; + Style.padding.pages = $(".pagelist", d.body); + Style.padding(); + $.on(window, "resize", Style.padding); + Style.iconPositions(); + if (exLink = $("#navtopright .exlinksOptionsLink", d.body)) { + return $.on(exLink, "click", function() { + return setTimeout(Rice.nodes, 100); + }); + } + }), 500); }, agent: "-webkit-", sizing: "box-sizing", @@ -11059,7 +11093,7 @@ hide: 2 }[_conf['Sidebar']] || (252 + Style.sidebarOffset.W); Style.replyMargin = _conf["Post Spacing"]; - return css = "/* Cleanup */\n#absbot,\n#boardNavDesktop,\n#delPassword,\n#delform > hr:last-of-type,\n#navbotright,\n#postForm,\n#search-label,\n#search-label-bottom,\n#styleSwitcher,\n#togglePostForm,\n.boardBanner > div,\n.mobile,\n.postingMode,\n.riced,\n.sideArrows,\n.stylechanger,\nbody > br,\nbody > div[style^=\"text-align\"],\nbody > hr {\n display: none;\n}\n/* Empties */\n#qr .warning:empty,\n#qr-thread-select:empty {\n display: none;\n}\n/* File Name Trunctuate */\n.fileText:hover .fntrunc,\n.fileText:not(:hover) .fnfull {\n display: none;\n}\n/* Unnecessary */\n#qp input,\n#qp .rice,\n.inline .rice {\n display: none !important;\n}\n/* Hidden Content */\n.forwarded,\n.hidden,\n.hidden_thread ~ div,\n.hidden_thread ~ a,\n.replyContainer .stub ~ div,\n.replyContainer .stub ~ a,\n.stub + div,\n[hidden] {\n display: none !important;\n}\n/* Hidden UI */\n#catalog,\n#navlinks,\n#navtopright,\n.cataloglink,\n.navLinks,\na[style=\"cursor: pointer; float: right;\"] {\n position: fixed;\n top: 100%;\n left: 100%;\n}\n/* Hide last horizontal rule, keep clear functionality. */\n.board > hr:last-of-type {\n visibility: hidden;\n}\n/* Fappe Tyme */\n.fappeTyme .thread > .noFile {\n display: none;\n}\n/* Defaults */\na {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n outline: none;\n}\nbody,\nhtml {\n min-height: 100%;\n " + Style.sizing + ": border-box;\n}\nbody {\n outline: none;\n font-size: " + (parseInt(_conf["Font Size"], 10)) + "px;\n font-family: " + _conf["Font"] + ";\n min-height: 100%;\n margin-top: 0;\n margin-bottom: 0;\n margin-" + Style.sidebarLocation[0] + ": " + (/^boards\.4chan\.org$/.test(location.hostname) ? Style.sidebar : '2') + "px;\n margin-" + Style.sidebarLocation[1] + ": 2px;\n padding: 0 " + (parseInt(_conf["Right Thread Padding"], 10) + editSpace["right"]) + "px 0 " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["left"]) + "px;\n}\nbody.unscroll {\n overflow: hidden;\n}\n" + (_conf["4chan SS Sidebar"] && /^boards\.4chan\.org$/.test(location.hostname) ? "body::before { content: ''; position: fixed; top: 0; bottom: 0; " + Style.sidebarLocation[0] + ": 0; width: " + (_conf['Sidebar'] === 'large' ? 305 : _conf['Sidebar'] === 'normal' ? 254 : _conf['Sidebar'] === 'minimal' ? 27 : 0) + "px; z-index: 1; " + Style.sizing + ": border-box; display: block;}body { padding-" + Style.sidebarLocation[0] + ": 2px;}" : "") + "\nbutton,\ninput,\ntextarea {\n font-size: " + (parseInt(_conf["Font Size"], 10)) + "px;\n font-family: " + _conf["Font"] + ";\n}\nhr {\n clear: both;\n border: 0;\n padding: 0;\n margin: 0 0 1px;\n " + (_conf['Hide Horizontal Rules'] ? 'visibility: hidden;' : '') + "\n}\n.center {\n text-align: center;\n}\n.disabled {\n opacity: 0.5;\n}\n.pointer {\n cursor: pointer;\n}\n/* Symbols */\n.drop-marker {\n vertical-align: middle;\n display: inline-block;\n margin: 2px 2px 3px;\n border-top: .5em solid;\n border-right: .3em solid transparent;\n border-left: .3em solid transparent;\n}\n.brackets-wrap::before {\n content: \"\\00a0[\";\n}\n.brackets-wrap::after {\n content: \"]\\00a0\";\n}\n/* Thread / Reply Nav */\n#navlinks a {\n position: fixed;\n z-index: 12;\n opacity: 0.5;\n display: inline-block;\n border-right: 6px solid transparent;\n border-left: 6px solid transparent;\n margin: 1.5px;\n}\n/* Header */\n#header-bar {\n z-index: 6;\n border-width: 1px;\n position: absolute;\n" + (_conf['4chan SS Navigation'] ? " left: 0; right: 0; border-left: 0; border-right: 0; border-radius: 0 !important;" : " " + Style.sidebarLocation[0] + ": " + (Style.sidebar + parseInt(_conf["Right Thread Padding"], 10) + editSpace["right"]) + "px; " + Style.sidebarLocation[1] + ": " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["left"] + 2) + "px;") + "\n" + (_conf["Hide Navigation Decorations"] ? " font-size: 0; color: transparent; word-spacing: 2px;" : "") + "\n text-align: " + _conf["Navigation Alignment"] + ";\n}\n.fixed #header-bar.autohide {\n z-index: 24;\n}\n.fixed #header-bar {\n position: fixed;\n}\n.top #header-bar {\n top: 0;\n border-top-width: 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 0 0 3px 3px;" : "") + "\"\n}\n.fixed.bottom #header-bar {\n bottom: 0;\n border-bottom-width: 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px 3px 0 0;" : "") + "\"\n}\n.hide #header-bar {\n position: fixed;\n top: 110%;\n bottom: auto;\n}\n/* Header Autohide */\n.fixed #header-bar.autohide:not(:hover) {\n box-shadow: none;\n transition: all .8s .6s cubic-bezier(.55, .055, .675, .19);\n}\n.fixed.top #header-bar.autohide:not(:hover) {\n margin-bottom: -1em;\n " + agent + "transform: translateY(-100%);\n}\n.fixed.bottom #header-bar.autohide:not(:hover) {\n " + agent + "transform: translateY(100%);\n}\n#scroll-marker {\n left: 0;\n right: 0;\n height: 10px;\n position: absolute;\n}\n#header-bar #scroll-marker {\n display: none;\n}\n.fixed #header-bar #scroll-marker {\n display: block;\n}\n.fixed.top header-bar #scroll-marker {\n top: 100%;\n}\n.fixed.bottom #header-bar #scroll-marker {\n bottom: 100%;\n}\n/* Notifications */\n#notifications {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n}\n.fixed.top #notifications {\n position: absolute;\n top: 100%;\n}\n.notification {\n display: block;\n overflow: hidden;\n width: 300px;\n border: 1px solid;\n " + (_conf['Sidebar Location'] === 'left' ? 'margin-left: auto;' : '') + "\n}\n.notification:not(:first-of-type) {\n border-top: none;\n}\n.close {\n float: right;\n}\n/* Main Menu */\n#main-menu {\n margin: 0;\n border: 2px solid;\n border-radius: 10px;\n height: 14px;\n width: 14px;\n " + Style.sizing + ": border-box;\n border-color: rgb(130,130,130);\n color: rgb(130,130,130);\n}\n#main-menu::after {\n content: '';\n font-size: 10px;\n position: absolute;\n top: 50%;\n left: 50%;\n " + agent + "transform: translate(-60%, -50%);\n display: block;\n border-top: 5px solid rgb(130, 130, 130);\n border-left: 3px solid transparent;\n border-right: 3px solid transparent;\n width: 7px;\n " + Style.sizing + ": border-box;\n} \n/* Pagination */\n.pagelist {\n border-width: 1px;\n text-align: " + _conf["Pagination Alignment"] + ";\n" + (_conf['4chan SS Navigation'] ? " left: 0; right: 0; border-left: 0; border-right: 0; border-radius: 0 !important;" : " " + Style.sidebarLocation[0] + ": " + (Style.sidebar + parseInt(_conf["Right Thread Padding"], 10) + editSpace["right"]) + "px; " + Style.sidebarLocation[1] + ": " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["left"] + 2) + "px;") + "\n" + { + return css = "/* Cleanup */\n#absbot,\n#boardNavDesktop,\n#delPassword,\n#delform > hr:last-of-type,\n#navbotright,\n#postForm,\n#search-label,\n#search-label-bottom,\n#styleSwitcher,\n#togglePostForm,\n.boardBanner > div,\n.mobile,\n.next form,\n.next span,\n.postingMode,\n.prev form,\n.prev span,\n.riced,\n.sideArrows,\n.stylechanger,\nbody > br,\nbody > div[style^=\"text-align\"],\nbody > hr {\n display: none;\n}\n/* Empties */\n#qr .warning:empty,\n#qr-thread-select:empty {\n display: none;\n}\n/* File Name Trunctuate */\n.fileText:hover .fntrunc,\n.fileText:not(:hover) .fnfull {\n display: none;\n}\n/* Unnecessary */\n#qp input,\n#qp .rice,\n.inline .rice {\n display: none !important;\n}\n/* Hidden Content */\n.forwarded,\n.hidden,\n.hidden_thread ~ div,\n.hidden_thread ~ a,\n.replyContainer .stub ~ div,\n.replyContainer .stub ~ a,\n.stub + div,\n[hidden] {\n display: none !important;\n}\n/* Hidden UI */\n#catalog,\n#navlinks,\n#navtopright,\n.cataloglink,\n.navLinks,\na[style=\"cursor: pointer; float: right;\"] {\n position: fixed;\n top: 100%;\n left: 100%;\n}\n/* Hide last horizontal rule, keep clear functionality. */\n.board > hr:last-of-type {\n visibility: hidden;\n}\n/* Fappe Tyme */\n.fappeTyme .thread > .noFile {\n display: none;\n}\n/* Defaults */\na {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n outline: none;\n}\nbody,\nhtml {\n min-height: 100%;\n " + Style.sizing + ": border-box;\n}\nbody {\n outline: none;\n font-size: " + (parseInt(_conf["Font Size"], 10)) + "px;\n font-family: " + _conf["Font"] + ";\n min-height: 100%;\n margin-top: 0;\n margin-bottom: 0;\n margin-" + Style.sidebarLocation[0] + ": " + (/^boards\.4chan\.org$/.test(location.hostname) ? Style.sidebar : '2') + "px;\n margin-" + Style.sidebarLocation[1] + ": 2px;\n padding: 0 " + (parseInt(_conf["Right Thread Padding"], 10) + editSpace["right"]) + "px 0 " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["left"]) + "px;\n}\nbody.unscroll {\n overflow: hidden;\n}\n" + (_conf["4chan SS Sidebar"] && /^boards\.4chan\.org$/.test(location.hostname) ? "body::before { content: ''; position: fixed; top: 0; bottom: 0; " + Style.sidebarLocation[0] + ": 0; width: " + (_conf['Sidebar'] === 'large' ? 305 : _conf['Sidebar'] === 'normal' ? 254 : _conf['Sidebar'] === 'minimal' ? 27 : 0) + "px; z-index: 1; " + Style.sizing + ": border-box; display: block;}body { padding-" + Style.sidebarLocation[0] + ": 2px;}" : "") + "\nbutton,\ninput,\ntextarea {\n font-size: " + (parseInt(_conf["Font Size"], 10)) + "px;\n font-family: " + _conf["Font"] + ";\n}\nhr {\n clear: both;\n border: 0;\n padding: 0;\n margin: 0 0 1px;\n " + (_conf['Hide Horizontal Rules'] ? 'visibility: hidden;' : '') + "\n}\n.center {\n text-align: center;\n}\n.disabled {\n opacity: 0.5;\n}\n.pointer {\n cursor: pointer;\n}\n/* Symbols */\n.drop-marker {\n vertical-align: middle;\n display: inline-block;\n margin: 2px 2px 3px;\n border-top: .5em solid;\n border-right: .3em solid transparent;\n border-left: .3em solid transparent;\n}\n.brackets-wrap::before {\n content: \"\\00a0[\";\n}\n.brackets-wrap::after {\n content: \"]\\00a0\";\n}\n/* Thread / Reply Nav */\n#navlinks a {\n position: fixed;\n z-index: 12;\n opacity: 0.5;\n display: inline-block;\n border-right: 6px solid transparent;\n border-left: 6px solid transparent;\n margin: 1.5px;\n}\n/* Header */\n#header-bar {\n z-index: 6;\n border-width: 1px;\n position: absolute;\n" + (_conf['4chan SS Navigation'] ? " left: 0; right: 0; border-left: 0; border-right: 0; border-radius: 0 !important;" : " " + Style.sidebarLocation[0] + ": " + (Style.sidebar + parseInt(_conf["Right Thread Padding"], 10) + editSpace["right"]) + "px; " + Style.sidebarLocation[1] + ": " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["left"] + 2) + "px;") + "\n" + (_conf["Hide Navigation Decorations"] ? " font-size: 0; color: transparent; word-spacing: 2px;" : "") + "\n text-align: " + _conf["Navigation Alignment"] + ";\n}\n.fixed #header-bar.autohide {\n z-index: 24;\n}\n.fixed #header-bar {\n position: fixed;\n}\n.top #header-bar {\n top: 0;\n border-top-width: 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 0 0 3px 3px;" : "") + "\"\n}\n.fixed.bottom #header-bar {\n bottom: 0;\n border-bottom-width: 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px 3px 0 0;" : "") + "\"\n}\n.hide #header-bar {\n position: fixed;\n top: 110%;\n bottom: auto;\n}\n/* Header Autohide */\n.fixed #header-bar.autohide:not(:hover) {\n box-shadow: none;\n transition: all .8s .6s cubic-bezier(.55, .055, .675, .19);\n}\n.fixed.top #header-bar.autohide:not(:hover) {\n margin-bottom: -1em;\n " + agent + "transform: translateY(-100%);\n}\n.fixed.bottom #header-bar.autohide:not(:hover) {\n " + agent + "transform: translateY(100%);\n}\n#scroll-marker {\n left: 0;\n right: 0;\n height: 10px;\n position: absolute;\n}\n#header-bar #scroll-marker {\n display: none;\n}\n.fixed #header-bar #scroll-marker {\n display: block;\n}\n.fixed.top header-bar #scroll-marker {\n top: 100%;\n}\n.fixed.bottom #header-bar #scroll-marker {\n bottom: 100%;\n}\n/* Notifications */\n#notifications {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n}\n.fixed.top #notifications {\n position: absolute;\n top: 100%;\n}\n.notification {\n display: block;\n overflow: hidden;\n width: 300px;\n border: 1px solid;\n " + (_conf['Sidebar Location'] === 'left' ? 'margin-left: auto;' : '') + "\n}\n.notification:not(:first-of-type) {\n border-top: none;\n}\n.close {\n float: right;\n}\n/* Main Menu */\n#main-menu {\n margin: 0;\n border: 2px solid;\n border-radius: 10px;\n height: 14px;\n width: 14px;\n " + Style.sizing + ": border-box;\n border-color: rgb(130,130,130);\n color: rgb(130,130,130);\n}\n#main-menu::after {\n content: '';\n font-size: 10px;\n position: absolute;\n top: 50%;\n left: 50%;\n " + agent + "transform: translate(-60%, -50%);\n display: block;\n border-top: 5px solid rgb(130, 130, 130);\n border-left: 3px solid transparent;\n border-right: 3px solid transparent;\n width: 7px;\n " + Style.sizing + ": border-box;\n} \n/* Pagination */\n.pagelist {\n border-width: 1px;\n text-align: " + _conf["Pagination Alignment"] + ";\n" + (_conf['4chan SS Navigation'] ? " left: 0; right: 0; border-left: 0; border-right: 0; border-radius: 0 !important;" : " " + Style.sidebarLocation[0] + ": " + (Style.sidebar + parseInt(_conf["Right Thread Padding"], 10) + editSpace["right"]) + "px; " + Style.sidebarLocation[1] + ": " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["left"] + 2) + "px;") + "\n" + { "sticky top": " position: fixed; top: 0; border-top-width: 0; " + (_conf["Rounded Edges"] ? "border-radius: 0 0 3px 3px;" : ""), "sticky bottom": " position: fixed; bottom: 0; border-bottom-width: 0; " + (_conf["Rounded Edges"] ? "border-radius: 3px 3px 0 0;" : ""), "top": " position: absolute; top: 0; border-top-width: 0; " + (_conf["Rounded Edges"] ? "border-radius: 0 0 3px 3px;" : ""), @@ -11155,14 +11189,14 @@ return position; }; if (_conf["Icon Orientation"] === "horizontal") { - position = aligner(2, [true, _conf['Slideout Navigation'] !== 'hide', _conf['Announcements'] === 'slideout' && $('#globalMessage', d.body), notCatalog && _conf['Slideout Watcher'] && _conf['Thread Watcher'], $('#navtopright .exlinksOptionsLink', d.body), notCatalog && $('body > a[style="cursor: pointer; float: right;"]', d.body), notEither && _conf['Image Expansion'], true, notEither, g.VIEW === 'thread', notEither && _conf['Fappe Tyme'], navlinks = ((g.VIEW !== 'thread' && _conf['Index Navigation']) || (g.VIEW === 'thread' && _conf['Reply Navigation'])) && notCatalog, navlinks]); + position = aligner(2, [true, _conf['Slideout Navigation'] !== 'hide', _conf['Announcements'] === 'slideout' && $('#globalMessage', d.body), _conf['Thread Watcher'] && _conf['Slideout Watcher'], $('#navtopright .exlinksOptionsLink', d.body), notCatalog && $('body > a[style="cursor: pointer; float: right;"]', d.body), notEither && _conf['Image Expansion'], true, notEither, g.VIEW === 'thread', notEither && _conf['Fappe Tyme'], navlinks = ((g.VIEW !== 'thread' && _conf['Index Navigation']) || (g.VIEW === 'thread' && _conf['Reply Navigation'])) && notCatalog, navlinks]); iconOffset = position[position.length - 1] - (_conf['4chan SS Navigation'] ? 0 : Style.sidebar + parseInt(_conf["Right Thread Padding"], 10)); if (iconOffset < 0) { iconOffset = 0; } css += "/* 4chan X Options */\n#appchanOptions {\n " + align + ": " + position[i++] + "px;\n}\n/* Slideout Navigation */\n#boardNavDesktopFoot::after {\n " + align + ": " + position[i++] + "px;\n}\n/* Global Message */\n#globalMessage::after {\n " + align + ": " + position[i++] + "px;\n}\n/* Watcher */\n#watcher::after {\n " + align + ": " + position[i++] + "px;\n}\n/* ExLinks */\n#navtopright .exlinksOptionsLink::after {\n " + align + ": " + position[i++] + "px;\n}\n/* 4sight */\nbody > a[style=\"cursor: pointer; float: right;\"]::after {\n " + align + ": " + position[i++] + "px;\n}\n/* Expand Images */\n#img-controls {\n " + align + ": " + position[i++] + "px;\n}\n/* Main Menu */\n#main-menu {\n " + align + ": " + position[i++] + "px;\n}\n/* 4chan Catalog */\n#catalog::after {\n " + align + ": " + position[i++] + "px;\n}\n/* Back */\ndiv.navLinks > a:first-of-type::after {\n " + align + ": " + position[i++] + "px;\n}\n/* Fappe Tyme */\n#fappeTyme {\n " + align + ": " + position[i++] + "px;\n}\n/* Thread Navigation Links */\n#navlinks a {\n margin: 2px;\n top: 1px;\n}\n#navlinks a:last-of-type {\n " + align + ": " + position[i++] + "px;\n}\n#navlinks a:first-of-type {\n " + align + ": " + position[i++] + "px;\n}\n#prefetch {\n width: " + (248 + Style.sidebarOffset.W) + "px;\n " + align + ": 2px;\n top: 1.6em;\n text-align: " + Style.sidebarLocation[1] + ";\n}\n#boardNavDesktopFoot::after,\n#navtopright .exlinksOptionsLink::after,\n#appchanOptions,\n#watcher::after,\n#globalMessage::after,\n#img-controls,\n#main-menu,\n#fappeTyme,\ndiv.navLinks > a:first-of-type::after,\n#catalog::after,\nbody > a[style=\"cursor: pointer; float: right;\"]::after {\n top: 1px !important;\n}\n" + (_conf["Announcements"] === "slideout" ? "#globalMessage," : "") + "\n" + (_conf["Slideout Watcher"] ? "#watcher," : "") + "\n#boardNavDesktopFoot {\n top: 16px !important;\n}\n.fixed.top #header-bar" + (_conf['Pagination'] === 'top' || _conf['Pagination'] === 'sticky top' ? ',\n.pagelist' : '') + " {\n " + (_conf['4chan SS Navigation'] ? "padding-" + align + ": " + iconOffset + "px;" : "margin-" + align + ": " + iconOffset + "px;") + "\n}\n"; } else { - position = aligner(2 + (_conf["4chan Banner"] === "at sidebar top" ? Style.logoOffset + 19 : 0), [notEither && _conf['Image Expansion'], true, true, _conf['Slideout Navigation'] !== 'hide', _conf['Announcements'] === 'slideout' && $('#globalMessage', d.body), notCatalog && _conf['Slideout Watcher'] && _conf['Thread Watcher'], notCatalog && $('body > a[style="cursor: pointer; float: right;"]', d.body), $('#navtopright .exlinksOptionsLink', d.body), notEither, g.VIEW === 'thread', notEither && _conf['Fappe Tyme'], navlinks = ((g.VIEW !== 'thread' && _conf['Index Navigation']) || (g.VIEW === 'thread' && _conf['Reply Navigation'])) && notCatalog, navlinks]); + position = aligner(2 + (_conf["4chan Banner"] === "at sidebar top" ? Style.logoOffset + 19 : 0), [notEither && _conf['Image Expansion'], true, true, _conf['Slideout Navigation'] !== 'hide', _conf['Announcements'] === 'slideout' && $('#globalMessage', d.body), _conf['Thread Watcher'] && _conf['Slideout Watcher'], notCatalog && $('body > a[style="cursor: pointer; float: right;"]', d.body), $('#navtopright .exlinksOptionsLink', d.body), notEither, g.VIEW === 'thread', notEither && _conf['Fappe Tyme'], navlinks = ((g.VIEW !== 'thread' && _conf['Index Navigation']) || (g.VIEW === 'thread' && _conf['Reply Navigation'])) && notCatalog, navlinks]); iconOffset = (g.VIEW === 'thread' && _conf['Prefetch'] ? 250 + Style.sidebarOffset.W : 20 + (g.VIEW === 'thread' && _conf['Updater Position'] === 'top' ? 100 : 0)) - (_conf['4chan SS Navigation'] ? 0 : Style.sidebar + parseInt(_conf[align.capitalize() + " Thread Padding"], 10)); css += "/* Expand Images */\n#img-controls {\n top: " + position[i++] + "px;\n}\n/* Main Menu */\n#main-menu {\n top: " + position[i++] + "px;\n}\n/* 4chan X Options */\n#appchanOptions {\n top: " + position[i++] + "px;\n}\n/* Slideout Navigation */\n#boardNavDesktopFoot,\n#boardNavDesktopFoot::after {\n top: " + position[i++] + "px;\n}\n/* Global Message */\n#globalMessage,\n#globalMessage::after {\n top: " + position[i++] + "px;\n}\n/* Watcher */\n" + (_conf["Slideout Watcher"] ? "#watcher, #watcher::after" : "") + " {\n top: " + position[i++] + "px !important;\n}\n/* 4sight */\nbody > a[style=\"cursor: pointer; float: right;\"]::after {\n top: " + position[i++] + "px;\n}\n/* ExLinks */\n#navtopright .exlinksOptionsLink::after {\n top: " + position[i++] + "px;\n}\n/* 4chan Catalog */\n#catalog::after {\n top: " + position[i++] + "px;\n}\n/* Back */\ndiv.navLinks > a:first-of-type::after {\n top: " + position[i++] + "px;\n}\n/* Fappe Tyme */\n#fappeTyme {\n top: " + position[i++] + "px;\n}\n/* Thread Navigation Links */\n#navlinks a:first-of-type {\n top: " + position[i++] + "px !important;\n}\n#navlinks a:last-of-type {\n top: " + position[i++] + "px !important;\n}\n#prefetch {\n width: " + (248 + Style.sidebarOffset.W) + "px;\n " + align + ": 2px;\n top: 0;\n text-align: " + Style.sidebarLocation[1] + ";\n}\n#navlinks a,\n#navtopright .exlinksOptionsLink::after,\n#appchanOptions,\n#boardNavDesktopFoot::after,\n#globalMessage::after,\n#img-controls,\n#main-menu,\n#fappeTyme,\n" + (_conf["Slideout Watcher"] ? "#watcher::after," : "") + "\nbody > a[style=\"cursor: pointer; float: right;\"]::after,\n#catalog::after,\ndiv.navLinks > a:first-of-type::after {\n " + align + ": 3px !important;\n}\n#boardNavDesktopFoot,\n#globalMessage,\n#watcher {\n width: " + (233 + Style.sidebarOffset.W) + "px !important;\n " + align + ": 18px !important;\n}\n.fixed.top #header-bar" + (_conf['Pagination'] === 'top' || _conf['Pagination'] === 'sticky top' ? ',\n.pagelist' : '') + " {\n " + (_conf['4chan SS Navigation'] ? "padding-" + align + ": " + iconOffset + "px;" : "margin-" + align + ": " + iconOffset + "px;") + "\n}"; } diff --git a/src/General/css/layout.css b/src/General/css/layout.css index ecbeb7561..a8121d9d0 100644 --- a/src/General/css/layout.css +++ b/src/General/css/layout.css @@ -11,7 +11,11 @@ #togglePostForm, .boardBanner > div, .mobile, +.next form, +.next span, .postingMode, +.prev form, +.prev span, .riced, .sideArrows, .stylechanger, diff --git a/src/Theming/Style.coffee b/src/Theming/Style.coffee index 70e7197cb..37f6d94c7 100644 --- a/src/Theming/Style.coffee +++ b/src/Theming/Style.coffee @@ -1,25 +1,49 @@ Style = init: -> - - $.asap (-> d.body), MascotTools.init - - $.ready -> - return unless $.id 'navtopright' - - # Give ExLinks and 4sight a little time to append their dialog links - setTimeout (-> - Style.padding.nav = Header.bar - Style.padding.pages = $(".pagelist", d.body) - Style.padding() - $.on window, "resize", Style.padding - Style.iconPositions() - if exLink = $ "#navtopright .exlinksOptionsLink", d.body - $.on exLink, "click", -> - setTimeout Rice.nodes, 100 - ), 500 - + $.asap (-> d.body), @asapInit + $.ready @readyInit @setup() + asapInit: -> + MascotTools.init() + + if g.VIEW is 'index' + $.asap (-> $ '.mPagelist'), -> + + prev = $ ".pagelist > .prev" + prevA = $.el 'a', + textContent: '<' + next = $ ".pagelist > .next" + nextA = $.el 'a', + textContent: '>' + + if (prevAction = prev.firstElementChild).nodeName is 'FORM' + prevA.href = 'javascript:;' + $.on prevA, 'click', -> + prevAction.firstElementChild.click() + if (nextAction = next.firstElementChild).nodeName is 'FORM' + nextA.href = 'javascript:;' + $.on nextA, 'click', -> + nextAction.firstElementChild.click() + + $.add prev, prevA + $.add next, nextA + + readyInit: -> + return unless $.id 'navtopright' + + # Give ExLinks and 4sight a little time to append their dialog links + setTimeout (-> + Style.padding.nav = Header.bar + Style.padding.pages = $(".pagelist", d.body) + Style.padding() + $.on window, "resize", Style.padding + Style.iconPositions() + if exLink = $ "#navtopright .exlinksOptionsLink", d.body + $.on exLink, "click", -> + setTimeout Rice.nodes, 100 + ), 500 + agent: "<% if (type === 'crx') { %>-webkit-<% } else if (type === 'userscript') { %>-moz-<% } else { %>-o-<% } %>" sizing: "<% if (type === 'userscript') { %>-moz-<% } else { %><% } %>box-sizing" @@ -236,7 +260,7 @@ Style = true _conf['Slideout Navigation'] isnt 'hide' _conf['Announcements'] is 'slideout' and $ '#globalMessage', d.body - notCatalog and _conf['Slideout Watcher'] and _conf['Thread Watcher'] + _conf['Thread Watcher'] and _conf['Slideout Watcher'] $ '#navtopright .exlinksOptionsLink', d.body notCatalog and $ 'body > a[style="cursor: pointer; float: right;"]', d.body notEither and _conf['Image Expansion'] @@ -268,7 +292,7 @@ Style = true _conf['Slideout Navigation'] isnt 'hide' _conf['Announcements'] is 'slideout' and $ '#globalMessage', d.body - notCatalog and _conf['Slideout Watcher'] and _conf['Thread Watcher'] + _conf['Thread Watcher'] and _conf['Slideout Watcher'] notCatalog and $ 'body > a[style="cursor: pointer; float: right;"]', d.body $ '#navtopright .exlinksOptionsLink', d.body notEither