From 8b3dbc82fd0b75fa79e8d5fe2a93f9311cdd4d31 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Fri, 3 May 2013 10:43:14 -0700 Subject: [PATCH] Getting somewhere... --- builds/appchan-x.js | 30 ++++++++++-------------------- builds/appchan-x.user.js | 30 ++++++++++-------------------- builds/crx/script.js | 30 ++++++++++-------------------- src/General/Config.coffee | 12 ------------ src/General/css/layout.css | 8 ++++---- src/Posting/QuickReply.coffee | 5 +---- src/Theming/Mascots.coffee | 4 ++-- src/Theming/Style.coffee | 16 +++++++++++----- 8 files changed, 48 insertions(+), 87 deletions(-) diff --git a/builds/appchan-x.js b/builds/appchan-x.js index 788d931a3..0fc91d207 100644 --- a/builds/appchan-x.js +++ b/builds/appchan-x.js @@ -124,7 +124,6 @@ 'Miscellaneous': { '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.'], '404 Redirect': [true, 'Redirect dead threads and images.'], 'Keybinds': [true, 'Bind actions to keyboard shortcuts.'], @@ -196,7 +195,6 @@ 'Remember Subject': [false, 'Remember the subject field, instead of resetting after posting.'], 'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.'], 'Remember QR Size': [false, 'Remember the size of the quick reply\'s comment field.'], - 'Hide Original Post Form': [true, 'Hide the normal post form.'], 'Cooldown': [true, 'Indicate the remaining time before posting again.'], 'Cooldown Prediction': [true, 'Decrease the cooldown time by taking into account upload speed. Disable it if it\'s inaccurate for you.'], 'Posting Success Notifications': [true, 'Show notifications on successful post creation or file uploading.'] @@ -300,7 +298,6 @@ }, 'Post Form': { 'Compact Post Form Inputs': [true, 'Use compact inputs on the post form.'], - 'Hide Show Post Form': [false, 'Hides the "Show Post Form" button when Persistent QR is disabled.'], 'Show Post Form Header': [false, 'Force the Post Form to have a header.'], 'Post Form Style': ['tabbed slideout', 'How the post form will sit on the page.', ['fixed', 'slideout', 'tabbed slideout', 'transparent fade', 'float']], 'Post Form Slideout Transitions': [true, 'Animate slideouts for the post form.'], @@ -6671,13 +6668,6 @@ return $.toggleClass(this, 'disabled'); }); Header.addShortcut(sc); - if (Conf['Hide Original Post Form']) { - $.asap((function() { - return doc; - }), function() { - return $.addClass(doc, 'hide-original-post-form'); - }); - } $.ready(this.initReady); if (Conf['Persistent QR']) { $.on(d, '4chanXInitFinished', this.persist); @@ -10457,7 +10447,7 @@ return null; } } - position = "" + (Conf['Mascot Position'] === 'bottom' || (Conf['Mascot Position'] === "default" && Conf['Post Form Style'] !== "fixed") ? 0 + ((g.VIEW !== 'thread' || Conf['Bottom Header']) && Conf['4chan SS Navigation'] ? 1.6 : 0) : 20.3 + (g.VIEW !== 'thread' || !!$('#postForm input[name=spoiler]') ? 1.4 : 0) + (Conf['Show Post Form Header'] ? 1.5 : 0) + (Conf['Post Form Decorations'] ? 0.2 : 0)) + "em"; + position = "" + (Conf['Mascot Position'] === 'bottom' || (Conf['Mascot Position'] === "default" && Conf['Post Form Style'] !== "fixed") ? 0 + Style.pfOffset : 19.6 + (g.VIEW !== 'thread' || !!$('#postForm input[name=spoiler]') ? 1.4 : 0) + (Conf['Show Post Form Header'] ? 1.5 : 0) + (Conf['Post Form Decorations'] ? 0.2 : 0) + Style.pfOffset) + "em"; if (Conf['editMode']) { if (!(mascot = editMascot || (mascot = Mascots[Conf["mascot"]]))) { return; @@ -10928,7 +10918,7 @@ if (!$.id('navtopright')) { return; } - return setTimeout((function() { + return setTimeout(function() { var exLink; Style.padding.nav = Header.bar; @@ -10941,7 +10931,7 @@ return setTimeout(Rice.nodes, 100); }); } - }), 500); + }, 500); }, agent: "-o-", sizing: "box-sizing", @@ -11023,13 +11013,12 @@ i = nodes.length; while (i--) { if (!Style.headCount) { - break; + return; } node = nodes[i]; if ((node.nodeName === 'STYLE' && !node.id) || (("" + node.rel).contains('stylesheet') && node.href.slice(0, 4) !== 'data')) { Style.headCount--; $.rm(node); - continue; } } }, @@ -11058,6 +11047,7 @@ _conf = Conf; agent = Style.agent; xOffset = _conf["Sidebar Location"] === "left" ? '-' : ''; + Style.pfOffset = _conf['4chan SS Navigation'] && ((_conf['Bottom Header'] && _conf['Fixed Header']) || (g.VIEW === 'index' && _conf['Pagination'] === 'sticky bottom')) ? 1.5 : 0; position = { right: { hide: parseInt(_conf['Right Thread Padding'], 10) < 100 ? "right" : "left", @@ -11121,10 +11111,10 @@ 'lower right': ".reply.quoted { position: relative; padding-bottom: 1.7em;}.reply .container { position: absolute; right: 0; bottom: 0;}.container::before { content: 'REPLIES: ';}.container { max-width: 100%; padding: 0 5px;}#qp .container { position: static; max-width: 100%;}#qp .container::before { content: '';}.inline .container { position: static; float: none;}.inline .container::before { content: '';}", 'default': "" }[_conf["Backlinks Position"]] + "\n/* Code */\n.prettyprint {\n " + Style.sizing + ": border-box;\n font-family: monospace;\n display: inline-block;\n margin-right: auto;\n white-space: pre-wrap;\n border-radius: 2px;\n overflow-x: auto;\n padding: 3px;\n max-width: 100%;\n}\n/* Menu */\n.entry {\n border-bottom: 1px solid rgba(0,0,0,.25);\n cursor: pointer;\n display: block;\n outline: none;\n padding: 3px 7px;\n position: relative;\n text-decoration: none;\n white-space: nowrap;\n}\n.entry:last-child {\n border-bottom: 0;\n}\n.has-submenu::after {\n content: \"\";\n border-" + position + ": .5em solid;\n border-top: .3em solid transparent;\n border-bottom: .3em solid transparent;\n display: inline-block;\n margin: .3em;\n position: absolute;\n right: 3px;\n}\n.submenu {\n display: none;\n position: absolute;\n " + position + ": 100%;\n top: -1px;\n}\n.focused .submenu {\n display: block;\n}\n/* Stubs */\n" + (_conf['Fit Width Replies'] ? ".stub { display: block; text-align: right;}" : "") + "\n/* Emoji */\n" + (_conf["Emoji"] !== "disable" ? Emoji.css(_conf["Emoji Position"]) : "") + "\n/* Element Replacing */\n/* Checkboxes */\n.rice {\n cursor: pointer;\n width: 9px;\n height: 9px;\n margin: 2px 3px 3px;\n display: inline-block;\n vertical-align: bottom;\n " + (_conf["Rounded Edges"] ? "border-radius: 2px;" : "") + "\n " + (_conf["Circle Checkboxes"] ? "border-radius: 6px;" : "") + "\n}\ninput:checked + .rice {\n background-attachment: scroll;\n background-repeat: no-repeat;\n background-position: bottom right;\n}\n/* Selects */\n.selectrice {\n position: relative;\n cursor: default;\n overflow: hidden;\n text-align: left;\n}\n#settings .selectrice {\n display: inline-block;\n}\n.selectrice::after {\n content: \"\";\n border-right: .25em solid transparent;\n border-left: .25em solid transparent;\n position: absolute;\n right: .4em;\n top: .5em;\n}\n.selectrice::before {\n content: \"\";\n height: 1.6em;\n position: absolute;\n right: 1.3em;\n top: 0;\n}\n/* Select Dropdown */\n#selectrice {\n padding: 0;\n margin: 0;\n position: fixed;\n max-height: 120px;\n overflow-y: auto;\n overflow-x: hidden;\n z-index: 32;\n}\n#selectrice:empty {\n display: none;\n}\n/* Post Form */\n#qr {\n z-index: 20;\n position: fixed;\n padding: 1px;\n border: 1px solid transparent;\n min-width: " + width + "px;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px 3px 0 0;" : "") + "\n}\n#qrtab {\n " + (_conf["Rounded Edges"] ? "border-radius: 3px 3px 0 0;" : "") + "\n}\n\n" + ({ - "fixed": "#qr { top: auto !important; bottom: 1.7em !important; " + Style.sidebarLocation[0] + ": 0 !important; " + Style.sidebarLocation[1] + ": auto !important;}", - "slideout": "#qrtab input,#qrtab .rice { display: none;}#qr { top: auto !important; bottom: 1.7em !important; " + Style.sidebarLocation[0] + ": 0 !important; " + Style.sidebarLocation[1] + ": auto !important; " + agent + "transform: translateX(" + xOffset + "93%);}#qr:hover,#qr.has-focus,#qr.dump { " + agent + "transform: translate(0);}", - "tabbed slideout": "#qr { top: auto !important; bottom: 1.7em !important; " + Style.sidebarLocation[0] + ": 0 !important; " + Style.sidebarLocation[1] + ": auto !important; " + agent + "transform: translateX(" + xOffset + "100%);}#qr:hover,#qr.has-focus,#qr.dump { " + agent + "transform: translateX(0);}#qrtab { " + agent + "transform: rotate(" + (Style.sidebarLocation[0] === "left" ? "" : "-") + "90deg); " + agent + "transform-origin: bottom " + Style.sidebarLocation[0] + "; position: absolute; top: 0; " + Style.sidebarLocation[0] + ": 100%; width: 110px; text-align: center; border-width: 1px 1px 0 1px; cursor: default;}#qr:hover #qrtab,#qr.has-focus #qrtab,#qr.dump #qrtab { opacity: 0; " + Style.sidebarLocation[0] + ": " + (252 + Style.sidebarOffset.W) + "px;}#qrtab input,#qrtab .close,#qrtab .rice,#qrtab span { display: none;}", - "transparent fade": "#qr { overflow: visible; top: auto !important; bottom: 1.7em !important; " + Style.sidebarLocation[0] + ": 2px !important; " + Style.sidebarLocation[1] + ": auto !important; opacity: 0.2; " + agent + "transition: opacity .3s ease-in-out 1s;}#qr:hover,#qr.has-focus,#qr.dump { opacity: 1; " + agent + "transition: opacity .3s linear;}" + "fixed": "#qr { top: auto !important; bottom: " + Style.pfOffset + "em !important; " + Style.sidebarLocation[0] + ": 0 !important; " + Style.sidebarLocation[1] + ": auto !important;}", + "slideout": "#qrtab input,#qrtab .rice { display: none;}#qr { top: auto !important; bottom: " + Style.pfOffset + "em !important; " + Style.sidebarLocation[0] + ": 0 !important; " + Style.sidebarLocation[1] + ": auto !important; " + agent + "transform: translateX(" + xOffset + "93%);}#qr:hover,#qr.has-focus,#qr.dump { " + agent + "transform: translate(0);}", + "tabbed slideout": "#qr { top: auto !important; bottom: " + Style.pfOffset + "em !important; " + Style.sidebarLocation[0] + ": 0 !important; " + Style.sidebarLocation[1] + ": auto !important; " + agent + "transform: translateX(" + xOffset + "100%);}#qr:hover,#qr.has-focus,#qr.dump { " + agent + "transform: translateX(0);}#qrtab { " + agent + "transform: rotate(" + (Style.sidebarLocation[0] === "left" ? "" : "-") + "90deg); " + agent + "transform-origin: bottom " + Style.sidebarLocation[0] + "; position: absolute; top: 0; " + Style.sidebarLocation[0] + ": 100%; width: 110px; text-align: center; border-width: 1px 1px 0 1px; cursor: default;}#qr:hover #qrtab,#qr.has-focus #qrtab,#qr.dump #qrtab { opacity: 0; " + Style.sidebarLocation[0] + ": " + (252 + Style.sidebarOffset.W) + "px;}#qrtab input,#qrtab .close,#qrtab .rice,#qrtab span { display: none;}", + "transparent fade": "#qr { overflow: visible; top: auto !important; bottom: " + Style.pfOffset + "em !important; " + Style.sidebarLocation[0] + ": 2px !important; " + Style.sidebarLocation[1] + ": auto !important; opacity: 0.2; " + agent + "transition: opacity .3s ease-in-out 1s;}#qr:hover,#qr.has-focus,#qr.dump { opacity: 1; " + agent + "transition: opacity .3s linear;}" }[_conf['Post Form Style']] || "") + "\n\n" + (_conf['Post Form Style'] !== 'tabbed slideout' ? (!(_conf['Post Form Style'] === 'float' || _conf['Show Post Form Header']) ? "#qrtab { display: none; }" : _conf['Post Form Style'] !== 'slideout' ? ".autohide:not(:hover):not(.has-focus) > form { display: none !important; }" : "") + "#qrtab { margin-bottom: 1px; }" : "") + "\n\n" + (_conf['Post Form Style'] !== 'float' && _conf["Post Form Slideout Transitions"] ? "#qr { " + agent + "transition: " + agent + "transform .3s ease-in-out 1s;}#qr:hover,#qr.has-focus,#qr.dump { " + agent + "transition: " + agent + "transform .3s linear;}#qrtab { " + agent + "transition: opacity .3s ease-in-out 1s;}#qr:hover #qrtab { " + agent + "transition: opacity .3s linear;}" : "") + "\n\n#qr .close {\n float: right;\n padding: 0 3px;\n}\n#qr .warning {\n min-height: 1.6em;\n vertical-align: middle;\n padding: 0 1px;\n border-width: 1px;\n border-style: solid;\n}\n.persona {\n width: 248px;\n max-width: 100%;\n min-width: 100%;\n}\n#dump-button {\n width: 10%;\n margin: 0;\n}\n\n" + (_conf['Compact Post Form Inputs'] ? ".persona input.field { width: 29.6%; margin: 0 0 0 0.4%;}#qr textarea.field { height: 14.8em; min-height: 9em;}#qr.has-captcha textarea.field { height: 9em;}" : ".persona input.field { width: 100%;}.persona input.field[name='name'] { width: 89.6%; margin: 0 0 0 0.4%;}#qr textarea.field { height: 11.6em; min-height: 6em;}#qr.has-captcha textarea.field { height: 6em;}") + "\n\n" + (_conf["Tripcode Hider"] ? ".tripped:not(:hover):not(:focus) { opacity: 0;}" : "") + "\n\n#qr textarea {\n resize: " + _conf['Textarea Resize'] + ";\n}\n.captcha-img {\n margin: 1px 0 0;\n text-align: center;\n line-height: 0;\n}\n.captcha-img img {\n width: 100%;\n height: 4em;\n width: 246px;\n}\n.captcha-input {\n width: 100%;\n margin: 1px 0 0;\n}\n.field,\n.selectrice,\nbutton,\ninput:not([type=radio]) {\n " + Style.sizing + ": border-box;\n font-size: " + (parseInt(_conf['Font Size'], 10)) + "px;\n height: 1.6em;\n margin: 1px 0 0;\n vertical-align: bottom;\n padding: 0 1px;\n}\n.selectrice {\n padding-right: 1.6em;\n}\n#qr textarea {\n min-width: 100%;\n}\n#qr [type='submit'] {\n width: 25%;\n}\n[type='file'] {\n position: absolute;\n opacity: 0;\n z-index: -1;\n}\n#showQR {\n display: " + (_conf["Hide Show Post Form"] ? "none" : "block") + ";\n z-index: 4;\n " + Style.sidebarLocation[0] + ": 2px;\n width: " + width + "px;\n background-color: transparent;\n text-align: center;\n position: fixed;\n top: auto;\n}\n/* Fake File Input */\n#qr-filename,\n.has-file #qr-no-file {\n display: none;\n}\n#qr-no-file,\n.has-file #qr-filename {\n display: block;\n}\n#qr-filename-container {\n " + Style.sizing + ": border-box;\n display: inline-block;\n position: relative;\n width: 100px;\n min-width: 74.6%;\n max-width: 74.6%;\n margin-right: 0.4%;\n overflow: hidden;\n padding: 2px 1px 0;\n}\n#qr-filerm {\n position: absolute;\n right: 3px;\n top: 2px;\n z-index: 2;\n}\n/* Thread Select / Spoiler Label */\n#qr-thread-select {\n vertical-align: bottom;\n width: 49%;\n display: inline-block;\n}\n#qr-spoiler-label {\n vertical-align: bottom;\n width: 49%;\n display: inline-block;\n text-align: right;\n}\n/* Dumping UI */\n.dump #dump-list-container {\n display: block;\n}\n#dump-list-container {\n display: none;\n position: relative;\n overflow-y: hidden;\n margin-top: 1px;\n}\n#dump-list {\n overflow-x: auto;\n overflow-y: hidden;\n white-space: pre;\n width: 248px;\n max-width: 100%;\n min-width: 100%;\n}\n#dump-list:hover {\n overflow-x: auto;\n}\n.qr-preview {\n " + Style.sizing + ": border-box;\n counter-increment: thumbnails;\n cursor: move;\n display: inline-block;\n height: 90px;\n width: 90px;\n padding: 2px;\n opacity: .5;\n overflow: hidden;\n position: relative;\n text-shadow: 0 1px 1px #000;\n " + agent + "transition: opacity .25s ease-in-out;\n vertical-align: top;\n}\n.qr-preview:hover,\n.qr-preview:focus {\n opacity: .9;\n}\n.qr-preview::before {\n content: counter(thumbnails);\n color: #fff;\n position: absolute;\n top: 3px;\n right: 3px;\n text-shadow: 0 0 3px #000, 0 0 8px #000;\n}\n.qr-preview#selected {\n opacity: 1;\n}\n.qr-preview.drag {\n box-shadow: 0 0 10px rgba(0,0,0,.5);\n}\n.qr-preview.over {\n border-color: #fff;\n}\n.qr-preview > span {\n color: #fff;\n}\n.remove {\n background: none;\n color: #e00;\n font-weight: 700;\n padding: 3px;\n}\na:only-of-type > .remove {\n display: none;\n}\n.remove:hover::after {\n content: \" Remove\";\n}\n.qr-preview > label {\n background: rgba(0,0,0,.5);\n color: #fff;\n right: 0; bottom: 0; left: 0;\n position: absolute;\n text-align: center;\n}\n.qr-preview > label > input {\n margin: 0;\n}\n#add-post {\n cursor: pointer;\n font-size: 2em;\n position: absolute;\n top: 50%;\n right: 10px;\n " + agent + "transform: translateY(-50%);\n}\n/* Ads */\n.topad img,\n.middlead img,\n.bottomad img {\n opacity: 0.3;\n " + agent + "transition: opacity .3s linear;\n}\n.topad img:hover,\n.middlead img:hover,\n.bottomad img:hover {\n opacity: 1;\n}\n" + (_conf["Block Ads"] ? "/* AdBlock Minus */.bottomad + hr,.topad img,.middlead img,.bottomad img { display: none;}" : "") + "\n" + (_conf["Shrink Ads"] ? ".topad a img,.middlead a img,.bottomad a img { width: 500px; height: auto;}" : "") + "\n/* Options */\n#overlay {\n position: fixed;\n z-index: 30;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n background: rgba(0,0,0,.5);\n}\n#appchanx-settings {\n width: auto;\n left: 15%;\n right: 15%;\n top: 15%;\n bottom: 15%;\n position: fixed;\n z-index: 31;\n padding: .3em;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n.description {\n display: none;\n}\n#appchanx-settings h3,\n.section-keybinds,\n.section-mascots,\n.section-script,\n.style {\n text-align: center;\n}\n.section-keybinds table,\n.section-script fieldset,\n.section-style fieldset {\n text-align: left;\n}\n.section-keybinds table {\n margin: auto;\n}\n#appchanx-settings fieldset {\n padding: 5px 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n vertical-align: top;\n " + (_conf["Single Column Mode"] ? "margin: 0 auto 6px;" : "margin: 0 3px 6px;\n display: inline-block;") + "\n border: 0;\n}\n#appchanx-settings .section-advanced fieldset {\n display: block;\n margin: 0 auto 6px;\n}\n.section-advanced .selectrice {\n display: inline-block;\n clear: both;\n}\n.section-container {\n overflow: auto;\n position: absolute;\n top: 1.7em;\n right: 5px;\n bottom: 5px;\n left: 5px;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n.sections-list {\n padding: 0 3px;\n float: left;\n}\n.sections-list > a {\n cursor: pointer;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px 3px 0 0;" : "") + "\n position: relative;\n padding: 0 4px;\n z-index: 1;\n height: 1.4em;\n display: inline-block;\n border-width: 1px 1px 0 1px;\n border-color: transparent;\n border-style: solid;\n}\n.credits {\n float: right;\n}\n#appchanx-settings h3 {\n margin: 0;\n}\n.section-script fieldset > div,\n.section-style fieldset > div,\n.section-advanced fieldset > div {\n overflow: visible;\n padding: 0 5px 0 7px;\n}\n#appchanx-settings tr:nth-of-type(2n+1),\n.section-script fieldset > div:nth-of-type(2n+1),\n.section-advanced fieldset > div:nth-of-type(2n+1),\n.section-style fieldset > div:nth-of-type(2n+1),\n.section-keybinds tr:nth-of-type(2n+1),\n#selectrice li:nth-of-type(2n+1) {\n background-color: rgba(0, 0, 0, 0.05);\n}\narticle li {\n margin: 10px 0 10px 2em;\n}\n#appchanx-settings .option {\n width: 50%;\n display: inline-block;\n vertical-align: bottom;\n}\n.option input {\n width: 100%;\n}\n.optionlabel {\n padding-left: 18px;\n}\n.rice + .optionlabel {\n padding-left: 0;\n}\n.section-script fieldset,\n.styleoption {\n text-align: left;\n}\n.section-style fieldset {\n width: 370px;\n}\n.section-script fieldset {\n width: 200px;\n}\n.suboptions,\n#mascotcontent,\n#themecontent {\n overflow: auto;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 1.7em;\n left: 0;\n}\n.mAlign {\n height: 250px;\n vertical-align: middle;\n display: table-cell;\n}\n#themecontent {\n top: 1.7em;\n}\n#save,\n.stylesettings {\n position: absolute;\n right: 10px;\n bottom: 0;\n}\n.section-style .suboptions {\n bottom: 0;\n}\n.section-container textarea {\n font-family: monospace;\n min-height: 350px;\n resize: vertical;\n width: 100%;\n}\n/* Hover Functionality */\n#mouseover {\n z-index: 33;\n position: fixed;\n max-width: 70%;\n}\n#mouseover:empty {\n display: none;\n}\n/* Mascot Tab */\n#mascot_hide {\n padding: 3px;\n position: absolute;\n top: 2px;\n right: 18px;\n}\n#mascot_hide .rice {\n float: left;\n}\n#mascot_hide > div {\n height: 0;\n text-align: right;\n overflow: hidden;\n}\n#mascot_hide:hover > div {\n height: auto;\n}\n#mascot_hide label {\n width: 100%;\n display: block;\n clear: both;\n text-decoration: none;\n}\n.mascots {\n padding: 0;\n text-align: center;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n.mascot,\n.mascotcontainer {\n overflow: hidden;\n}\n.mascot {\n position: relative;\n border: none;\n margin: 5px;\n padding: 0;\n width: 200px;\n display: inline-block;\n background-color: transparent;\n}\n.mascotcontainer {\n height: 250px;\n border: 0;\n margin: 0;\n max-height: 250px;\n cursor: pointer;\n bottom: 0;\n border-width: 0 1px 1px;\n border-style: solid;\n border-color: transparent;\n overflow: hidden;\n}\n.mascot img {\n max-width: 200px;\n}\n.mascotname,\n.mascotoptions {\n padding: 0;\n width: 100%;\n}\n.mascot .mascotoptions {\nopacity: 0;\n " + agent + "transition: opacity .3s linear;\n}\n.mascot:hover .mascotoptions {\n opacity: 1;\n}\n.mascotoptions {\n position: absolute;\n bottom: 0;\n right: 0;\n left: 0;\n}\n.mascotoptions a {\n display: inline-block;\n width: 33%;\n}\n#upload {\n position: absolute;\n width: 100px;\n left: 50%;\n margin-left: -50px;\n text-align: center;\n bottom: 0;\n}\n#mascots_batch {\n position: absolute;\n left: 10px;\n bottom: 0;\n}\n/* Themes Tab */\n#themes h1 {\n position: absolute;\n right: 300px;\n bottom: 10px;\n margin: 0;\n " + agent + "transition: all .2s ease-in-out;\n opacity: 0;\n}\n#themes .selectedtheme h1 {\n right: 11px;\n opacity: 1;\n}\n#themeContainer {\n margin-bottom: 3px;\n}\n#addthemes {\n position: absolute;\n left: 10px;\n bottom: 0;\n}\n.theme {\n margin: 1em;\n}\n/* Theme Editor */\n#themeConf {\n position: fixed;\n " + Style.sidebarLocation[1] + ": 2px;\n " + Style.sidebarLocation[0] + ": auto;\n top: 0;\n bottom: 0;\n width: 296px;\n z-index: 10;\n}\n#themebar input {\n width: 30%;\n}\n.option .color {\n width: 10%;\n border-left: none !important;\n color: transparent !important;\n}\n.option .colorfield {\n width: 90%;\n}\n.themevar textarea {\n min-width: 100%;\n max-width: 100%;\n height: 20em;\n resize: vertical;\n}\n/* Mascot Editor */\n#mascotConf {\n position: fixed;\n height: 17em;\n bottom: 0;\n left: 50%;\n width: 500px;\n margin-left: -250px;\n overflow: auto;\n z-index: 10;\n}\n#mascotConf .option,\n#mascotConf .optionlabel {\n " + Style.sizing + ": border-box;\n width: 50%;\n display: inline-block;\n vertical-align: middle;\n}\n#mascotConf .option input {\n width: 100%;\n}\n#close {\n position: absolute;\n left: 10px;\n bottom: 0;\n}\n/* Catalog */\n#content .navLinks,\n#info .navLinks,\n.btn-wrap {\n display: block;\n}\n.navLinks > .btn-wrap:not(:first-of-type)::before {\n content: ' - ';\n}\n.button {\n cursor: pointer;\n}\n#content .btn-wrap,\n#info .btn-wrap {\n display: inline-block;\n}\n#post-preview {\n position: absolute;\n z-index: 22;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n#settings,\n#threads,\n#info .navLinks,\n#content .navLinks {\n text-align: center;\n}\n#threads .thread {\n vertical-align: top;\n display: inline-block;\n word-wrap: break-word;\n overflow: hidden;\n margin-top: 5px;\n padding: 5px 0 3px;\n text-align: center;\n}\n.extended-small .thread,\n.small .thread {\n width: 165px;\n max-height: 320px;\n}\n.small .teaser,\n.large .teaser {\n display: none;\n}\n.extended-large .thread,\n.large .thread {\n width: 270px;\n max-height: 410px;\n}\n.extended-small .thumb,\n.small .thumb {\n max-width: 150px;\n max-height: 150px;\n}\n.panel {\n position: fixed;\n top: 50% !important;\n left: 50%;\n " + agent + "transform: translate(-50%, -50%);\n}\n.icon::after {\n display: inline-block;\n float: right;\n width: 1em;\n cursor: pointer;\n}\n.helpIcon::after {\n content: '?';\n}\n.closeIcon::after {\n content: '×';\n}\n/* Front Page */\n#logo {\n text-align: center;\n}\n#doc {\n margin: 0 auto;\n width: 1000px;\n position: relative;\n}\n#boards .boxcontent {\n vertical-align: top;\n text-align: center;\n}\n#filter-container,\n#options-container {\n float: right;\n position: relative;\n}\n#optionssmenu {\n top: 100% !important;\n left: 0 !important;\n}\n#boards .column {\n " + Style.sizing + ": border-box;\n display: inline-block;\n width: 16em;\n text-align: left;\n vertical-align: top;\n}\n.bd ul,\n.boxcontent ul {\n vertical-align: top;\n padding: 0;\n}\n.right-box .boxcontent ul {\n padding: 0 10px;\n}\n.yuimenuitem,\n.boxcontent li {\n list-style-type: none;\n}\n.bd ul {\n margin: 0;\n}\n.yuimenuitem::before {\n content: \" [ ] \";\n font-family: monospace;\n}\n.yuimenuitem-checked::before {\n content: \" [x] \"\n}\n.yui-u {\n display: inline-block;\n vertical-align: top;\n width: 475px;\n margin: 10px;\n}\n#recent-images .boxcontent {\n text-align: center;\n}\n#ft {\n text-align: center;\n}\n#ft ul {\n padding: 0;\n}\n#ft li {\n list-style-type: none;\n display: inline-block;\n width: 100px;\n}\n#preview-tooltip-nws,\n#preview-tooltip-ws,\n#ft .fill,\n.clear-bug {\n display: none;\n}"; }, theme: function(theme) { @@ -11212,7 +11202,7 @@ Style.padding.pages.property = Style.padding.pages.property[Style.padding.pages.property.length - 1]; } css = "body::before {\n"; - if (Style.padding.pages && ["sticky top", "top", "sticky bottom"].contains(_conf["Pagination"])) { + if (_conf['4chan SS Navigation'] && Style.padding.pages && ["sticky top", "top", "sticky bottom"].contains(_conf["Pagination"])) { css += " " + Style.padding.pages.property + ": " + Style.padding.pages.offsetHeight + "px !important;\n"; } if (_conf['Fixed Header']) { diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index d38d71cb4..af16bf518 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -124,7 +124,6 @@ 'Miscellaneous': { '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.'], '404 Redirect': [true, 'Redirect dead threads and images.'], 'Keybinds': [true, 'Bind actions to keyboard shortcuts.'], @@ -197,7 +196,6 @@ 'Remember QR Size': [false, 'Remember the size of the Quick reply.'], 'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.'], 'Remember QR Size': [false, 'Remember the size of the quick reply\'s comment field.'], - 'Hide Original Post Form': [true, 'Hide the normal post form.'], 'Cooldown': [true, 'Indicate the remaining time before posting again.'], 'Cooldown Prediction': [true, 'Decrease the cooldown time by taking into account upload speed. Disable it if it\'s inaccurate for you.'], 'Posting Success Notifications': [true, 'Show notifications on successful post creation or file uploading.'] @@ -301,7 +299,6 @@ }, 'Post Form': { 'Compact Post Form Inputs': [true, 'Use compact inputs on the post form.'], - 'Hide Show Post Form': [false, 'Hides the "Show Post Form" button when Persistent QR is disabled.'], 'Show Post Form Header': [false, 'Force the Post Form to have a header.'], 'Post Form Style': ['tabbed slideout', 'How the post form will sit on the page.', ['fixed', 'slideout', 'tabbed slideout', 'transparent fade', 'float']], 'Post Form Slideout Transitions': [true, 'Animate slideouts for the post form.'], @@ -6667,13 +6664,6 @@ return $.toggleClass(this, 'disabled'); }); Header.addShortcut(sc); - if (Conf['Hide Original Post Form']) { - $.asap((function() { - return doc; - }), function() { - return $.addClass(doc, 'hide-original-post-form'); - }); - } $.ready(this.initReady); if (Conf['Persistent QR']) { $.on(d, '4chanXInitFinished', this.persist); @@ -10478,7 +10468,7 @@ return null; } } - position = "" + (Conf['Mascot Position'] === 'bottom' || (Conf['Mascot Position'] === "default" && Conf['Post Form Style'] !== "fixed") ? 0 + ((g.VIEW !== 'thread' || Conf['Bottom Header']) && Conf['4chan SS Navigation'] ? 1.6 : 0) : 20.3 + (g.VIEW !== 'thread' || !!$('#postForm input[name=spoiler]') ? 1.4 : 0) + (Conf['Show Post Form Header'] ? 1.5 : 0) + (Conf['Post Form Decorations'] ? 0.2 : 0)) + "em"; + position = "" + (Conf['Mascot Position'] === 'bottom' || (Conf['Mascot Position'] === "default" && Conf['Post Form Style'] !== "fixed") ? 0 + Style.pfOffset : 19.6 + (g.VIEW !== 'thread' || !!$('#postForm input[name=spoiler]') ? 1.4 : 0) + (Conf['Show Post Form Header'] ? 1.5 : 0) + (Conf['Post Form Decorations'] ? 0.2 : 0) + Style.pfOffset) + "em"; if (Conf['editMode']) { if (!(mascot = editMascot || (mascot = Mascots[Conf["mascot"]]))) { return; @@ -10949,7 +10939,7 @@ if (!$.id('navtopright')) { return; } - return setTimeout((function() { + return setTimeout(function() { var exLink; Style.padding.nav = Header.bar; @@ -10962,7 +10952,7 @@ return setTimeout(Rice.nodes, 100); }); } - }), 500); + }, 500); }, agent: "-moz-", sizing: "-moz-box-sizing", @@ -11044,13 +11034,12 @@ i = nodes.length; while (i--) { if (!Style.headCount) { - break; + return; } node = nodes[i]; if ((node.nodeName === 'STYLE' && !node.id) || (("" + node.rel).contains('stylesheet') && node.href.slice(0, 4) !== 'data')) { Style.headCount--; $.rm(node); - continue; } } }, @@ -11079,6 +11068,7 @@ _conf = Conf; agent = Style.agent; xOffset = _conf["Sidebar Location"] === "left" ? '-' : ''; + Style.pfOffset = _conf['4chan SS Navigation'] && ((_conf['Bottom Header'] && _conf['Fixed Header']) || (g.VIEW === 'index' && _conf['Pagination'] === 'sticky bottom')) ? 1.5 : 0; position = { right: { hide: parseInt(_conf['Right Thread Padding'], 10) < 100 ? "right" : "left", @@ -11142,10 +11132,10 @@ 'lower right': ".reply.quoted { position: relative; padding-bottom: 1.7em;}.reply .container { position: absolute; right: 0; bottom: 0;}.container::before { content: 'REPLIES: ';}.container { max-width: 100%; padding: 0 5px;}#qp .container { position: static; max-width: 100%;}#qp .container::before { content: '';}.inline .container { position: static; float: none;}.inline .container::before { content: '';}", 'default': "" }[_conf["Backlinks Position"]] + "\n/* Code */\n.prettyprint {\n " + Style.sizing + ": border-box;\n font-family: monospace;\n display: inline-block;\n margin-right: auto;\n white-space: pre-wrap;\n border-radius: 2px;\n overflow-x: auto;\n padding: 3px;\n max-width: 100%;\n}\n/* Menu */\n.entry {\n border-bottom: 1px solid rgba(0,0,0,.25);\n cursor: pointer;\n display: block;\n outline: none;\n padding: 3px 7px;\n position: relative;\n text-decoration: none;\n white-space: nowrap;\n}\n.entry:last-child {\n border-bottom: 0;\n}\n.has-submenu::after {\n content: \"\";\n border-" + position + ": .5em solid;\n border-top: .3em solid transparent;\n border-bottom: .3em solid transparent;\n display: inline-block;\n margin: .3em;\n position: absolute;\n right: 3px;\n}\n.submenu {\n display: none;\n position: absolute;\n " + position + ": 100%;\n top: -1px;\n}\n.focused .submenu {\n display: block;\n}\n/* Stubs */\n" + (_conf['Fit Width Replies'] ? ".stub { display: block; text-align: right;}" : "") + "\n/* Emoji */\n" + (_conf["Emoji"] !== "disable" ? Emoji.css(_conf["Emoji Position"]) : "") + "\n/* Element Replacing */\n/* Checkboxes */\n.rice {\n cursor: pointer;\n width: 9px;\n height: 9px;\n margin: 2px 3px 3px;\n display: inline-block;\n vertical-align: bottom;\n " + (_conf["Rounded Edges"] ? "border-radius: 2px;" : "") + "\n " + (_conf["Circle Checkboxes"] ? "border-radius: 6px;" : "") + "\n}\ninput:checked + .rice {\n background-attachment: scroll;\n background-repeat: no-repeat;\n background-position: bottom right;\n}\n/* Selects */\n.selectrice {\n position: relative;\n cursor: default;\n overflow: hidden;\n text-align: left;\n}\n#settings .selectrice {\n display: inline-block;\n}\n.selectrice::after {\n content: \"\";\n border-right: .25em solid transparent;\n border-left: .25em solid transparent;\n position: absolute;\n right: .4em;\n top: .5em;\n}\n.selectrice::before {\n content: \"\";\n height: 1.6em;\n position: absolute;\n right: 1.3em;\n top: 0;\n}\n/* Select Dropdown */\n#selectrice {\n padding: 0;\n margin: 0;\n position: fixed;\n max-height: 120px;\n overflow-y: auto;\n overflow-x: hidden;\n z-index: 32;\n}\n#selectrice:empty {\n display: none;\n}\n/* Post Form */\n#qr {\n z-index: 20;\n position: fixed;\n padding: 1px;\n border: 1px solid transparent;\n min-width: " + width + "px;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px 3px 0 0;" : "") + "\n}\n#qrtab {\n " + (_conf["Rounded Edges"] ? "border-radius: 3px 3px 0 0;" : "") + "\n}\n\n" + ({ - "fixed": "#qr { top: auto !important; bottom: 1.7em !important; " + Style.sidebarLocation[0] + ": 0 !important; " + Style.sidebarLocation[1] + ": auto !important;}", - "slideout": "#qrtab input,#qrtab .rice { display: none;}#qr { top: auto !important; bottom: 1.7em !important; " + Style.sidebarLocation[0] + ": 0 !important; " + Style.sidebarLocation[1] + ": auto !important; " + agent + "transform: translateX(" + xOffset + "93%);}#qr:hover,#qr.has-focus,#qr.dump { " + agent + "transform: translate(0);}", - "tabbed slideout": "#qr { top: auto !important; bottom: 1.7em !important; " + Style.sidebarLocation[0] + ": 0 !important; " + Style.sidebarLocation[1] + ": auto !important; " + agent + "transform: translateX(" + xOffset + "100%);}#qr:hover,#qr.has-focus,#qr.dump { " + agent + "transform: translateX(0);}#qrtab { " + agent + "transform: rotate(" + (Style.sidebarLocation[0] === "left" ? "" : "-") + "90deg); " + agent + "transform-origin: bottom " + Style.sidebarLocation[0] + "; position: absolute; top: 0; " + Style.sidebarLocation[0] + ": 100%; width: 110px; text-align: center; border-width: 1px 1px 0 1px; cursor: default;}#qr:hover #qrtab,#qr.has-focus #qrtab,#qr.dump #qrtab { opacity: 0; " + Style.sidebarLocation[0] + ": " + (252 + Style.sidebarOffset.W) + "px;}#qrtab input,#qrtab .close,#qrtab .rice,#qrtab span { display: none;}", - "transparent fade": "#qr { overflow: visible; top: auto !important; bottom: 1.7em !important; " + Style.sidebarLocation[0] + ": 2px !important; " + Style.sidebarLocation[1] + ": auto !important; opacity: 0.2; " + agent + "transition: opacity .3s ease-in-out 1s;}#qr:hover,#qr.has-focus,#qr.dump { opacity: 1; " + agent + "transition: opacity .3s linear;}" + "fixed": "#qr { top: auto !important; bottom: " + Style.pfOffset + "em !important; " + Style.sidebarLocation[0] + ": 0 !important; " + Style.sidebarLocation[1] + ": auto !important;}", + "slideout": "#qrtab input,#qrtab .rice { display: none;}#qr { top: auto !important; bottom: " + Style.pfOffset + "em !important; " + Style.sidebarLocation[0] + ": 0 !important; " + Style.sidebarLocation[1] + ": auto !important; " + agent + "transform: translateX(" + xOffset + "93%);}#qr:hover,#qr.has-focus,#qr.dump { " + agent + "transform: translate(0);}", + "tabbed slideout": "#qr { top: auto !important; bottom: " + Style.pfOffset + "em !important; " + Style.sidebarLocation[0] + ": 0 !important; " + Style.sidebarLocation[1] + ": auto !important; " + agent + "transform: translateX(" + xOffset + "100%);}#qr:hover,#qr.has-focus,#qr.dump { " + agent + "transform: translateX(0);}#qrtab { " + agent + "transform: rotate(" + (Style.sidebarLocation[0] === "left" ? "" : "-") + "90deg); " + agent + "transform-origin: bottom " + Style.sidebarLocation[0] + "; position: absolute; top: 0; " + Style.sidebarLocation[0] + ": 100%; width: 110px; text-align: center; border-width: 1px 1px 0 1px; cursor: default;}#qr:hover #qrtab,#qr.has-focus #qrtab,#qr.dump #qrtab { opacity: 0; " + Style.sidebarLocation[0] + ": " + (252 + Style.sidebarOffset.W) + "px;}#qrtab input,#qrtab .close,#qrtab .rice,#qrtab span { display: none;}", + "transparent fade": "#qr { overflow: visible; top: auto !important; bottom: " + Style.pfOffset + "em !important; " + Style.sidebarLocation[0] + ": 2px !important; " + Style.sidebarLocation[1] + ": auto !important; opacity: 0.2; " + agent + "transition: opacity .3s ease-in-out 1s;}#qr:hover,#qr.has-focus,#qr.dump { opacity: 1; " + agent + "transition: opacity .3s linear;}" }[_conf['Post Form Style']] || "") + "\n\n" + (_conf['Post Form Style'] !== 'tabbed slideout' ? (!(_conf['Post Form Style'] === 'float' || _conf['Show Post Form Header']) ? "#qrtab { display: none; }" : _conf['Post Form Style'] !== 'slideout' ? ".autohide:not(:hover):not(.has-focus) > form { display: none !important; }" : "") + "#qrtab { margin-bottom: 1px; }" : "") + "\n\n" + (_conf['Post Form Style'] !== 'float' && _conf["Post Form Slideout Transitions"] ? "#qr { " + agent + "transition: " + agent + "transform .3s ease-in-out 1s;}#qr:hover,#qr.has-focus,#qr.dump { " + agent + "transition: " + agent + "transform .3s linear;}#qrtab { " + agent + "transition: opacity .3s ease-in-out 1s;}#qr:hover #qrtab { " + agent + "transition: opacity .3s linear;}" : "") + "\n\n#qr .close {\n float: right;\n padding: 0 3px;\n}\n#qr .warning {\n min-height: 1.6em;\n vertical-align: middle;\n padding: 0 1px;\n border-width: 1px;\n border-style: solid;\n}\n.persona {\n width: 248px;\n max-width: 100%;\n min-width: 100%;\n}\n#dump-button {\n width: 10%;\n margin: 0;\n}\n\n" + (_conf['Compact Post Form Inputs'] ? ".persona input.field { width: 29.6%; margin: 0 0 0 0.4%;}#qr textarea.field { height: 14.8em; min-height: 9em;}#qr.has-captcha textarea.field { height: 9em;}" : ".persona input.field { width: 100%;}.persona input.field[name='name'] { width: 89.6%; margin: 0 0 0 0.4%;}#qr textarea.field { height: 11.6em; min-height: 6em;}#qr.has-captcha textarea.field { height: 6em;}") + "\n\n" + (_conf["Tripcode Hider"] ? ".tripped:not(:hover):not(:focus) { opacity: 0;}" : "") + "\n\n#qr textarea {\n resize: " + _conf['Textarea Resize'] + ";\n}\n.captcha-img {\n margin: 1px 0 0;\n text-align: center;\n line-height: 0;\n}\n.captcha-img img {\n width: 100%;\n height: 4em;\n width: 246px;\n}\n.captcha-input {\n width: 100%;\n margin: 1px 0 0;\n}\n.field,\n.selectrice,\nbutton,\ninput:not([type=radio]) {\n " + Style.sizing + ": border-box;\n font-size: " + (parseInt(_conf['Font Size'], 10)) + "px;\n height: 1.6em;\n margin: 1px 0 0;\n vertical-align: bottom;\n padding: 0 1px;\n}\n.selectrice {\n padding-right: 1.6em;\n}\n#qr textarea {\n min-width: 100%;\n}\n#qr [type='submit'] {\n width: 25%;\n}\n[type='file'] {\n position: absolute;\n opacity: 0;\n z-index: -1;\n}\n#showQR {\n display: " + (_conf["Hide Show Post Form"] ? "none" : "block") + ";\n z-index: 4;\n " + Style.sidebarLocation[0] + ": 2px;\n width: " + width + "px;\n background-color: transparent;\n text-align: center;\n position: fixed;\n top: auto;\n}\n/* Fake File Input */\n#qr-filename,\n.has-file #qr-no-file {\n display: none;\n}\n#qr-no-file,\n.has-file #qr-filename {\n display: block;\n}\n#qr-filename-container {\n " + Style.sizing + ": border-box;\n display: inline-block;\n position: relative;\n width: 100px;\n min-width: 74.6%;\n max-width: 74.6%;\n margin-right: 0.4%;\n overflow: hidden;\n padding: 2px 1px 0;\n}\n#qr-filerm {\n position: absolute;\n right: 3px;\n top: 2px;\n z-index: 2;\n}\n/* Thread Select / Spoiler Label */\n#qr-thread-select {\n vertical-align: bottom;\n width: 49%;\n display: inline-block;\n}\n#qr-spoiler-label {\n vertical-align: bottom;\n width: 49%;\n display: inline-block;\n text-align: right;\n}\n/* Dumping UI */\n.dump #dump-list-container {\n display: block;\n}\n#dump-list-container {\n display: none;\n position: relative;\n overflow-y: hidden;\n margin-top: 1px;\n}\n#dump-list {\n overflow-x: auto;\n overflow-y: hidden;\n white-space: pre;\n width: 248px;\n max-width: 100%;\n min-width: 100%;\n}\n#dump-list:hover {\n overflow-x: auto;\n}\n.qr-preview {\n " + Style.sizing + ": border-box;\n counter-increment: thumbnails;\n cursor: move;\n display: inline-block;\n height: 90px;\n width: 90px;\n padding: 2px;\n opacity: .5;\n overflow: hidden;\n position: relative;\n text-shadow: 0 1px 1px #000;\n " + agent + "transition: opacity .25s ease-in-out;\n vertical-align: top;\n}\n.qr-preview:hover,\n.qr-preview:focus {\n opacity: .9;\n}\n.qr-preview::before {\n content: counter(thumbnails);\n color: #fff;\n position: absolute;\n top: 3px;\n right: 3px;\n text-shadow: 0 0 3px #000, 0 0 8px #000;\n}\n.qr-preview#selected {\n opacity: 1;\n}\n.qr-preview.drag {\n box-shadow: 0 0 10px rgba(0,0,0,.5);\n}\n.qr-preview.over {\n border-color: #fff;\n}\n.qr-preview > span {\n color: #fff;\n}\n.remove {\n background: none;\n color: #e00;\n font-weight: 700;\n padding: 3px;\n}\na:only-of-type > .remove {\n display: none;\n}\n.remove:hover::after {\n content: \" Remove\";\n}\n.qr-preview > label {\n background: rgba(0,0,0,.5);\n color: #fff;\n right: 0; bottom: 0; left: 0;\n position: absolute;\n text-align: center;\n}\n.qr-preview > label > input {\n margin: 0;\n}\n#add-post {\n cursor: pointer;\n font-size: 2em;\n position: absolute;\n top: 50%;\n right: 10px;\n " + agent + "transform: translateY(-50%);\n}\n/* Ads */\n.topad img,\n.middlead img,\n.bottomad img {\n opacity: 0.3;\n " + agent + "transition: opacity .3s linear;\n}\n.topad img:hover,\n.middlead img:hover,\n.bottomad img:hover {\n opacity: 1;\n}\n" + (_conf["Block Ads"] ? "/* AdBlock Minus */.bottomad + hr,.topad img,.middlead img,.bottomad img { display: none;}" : "") + "\n" + (_conf["Shrink Ads"] ? ".topad a img,.middlead a img,.bottomad a img { width: 500px; height: auto;}" : "") + "\n/* Options */\n#overlay {\n position: fixed;\n z-index: 30;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n background: rgba(0,0,0,.5);\n}\n#appchanx-settings {\n width: auto;\n left: 15%;\n right: 15%;\n top: 15%;\n bottom: 15%;\n position: fixed;\n z-index: 31;\n padding: .3em;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n.description {\n display: none;\n}\n#appchanx-settings h3,\n.section-keybinds,\n.section-mascots,\n.section-script,\n.style {\n text-align: center;\n}\n.section-keybinds table,\n.section-script fieldset,\n.section-style fieldset {\n text-align: left;\n}\n.section-keybinds table {\n margin: auto;\n}\n#appchanx-settings fieldset {\n padding: 5px 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n vertical-align: top;\n " + (_conf["Single Column Mode"] ? "margin: 0 auto 6px;" : "margin: 0 3px 6px;\n display: inline-block;") + "\n border: 0;\n}\n#appchanx-settings .section-advanced fieldset {\n display: block;\n margin: 0 auto 6px;\n}\n.section-advanced .selectrice {\n display: inline-block;\n clear: both;\n}\n.section-container {\n overflow: auto;\n position: absolute;\n top: 1.7em;\n right: 5px;\n bottom: 5px;\n left: 5px;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n.sections-list {\n padding: 0 3px;\n float: left;\n}\n.sections-list > a {\n cursor: pointer;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px 3px 0 0;" : "") + "\n position: relative;\n padding: 0 4px;\n z-index: 1;\n height: 1.4em;\n display: inline-block;\n border-width: 1px 1px 0 1px;\n border-color: transparent;\n border-style: solid;\n}\n.credits {\n float: right;\n}\n#appchanx-settings h3 {\n margin: 0;\n}\n.section-script fieldset > div,\n.section-style fieldset > div,\n.section-advanced fieldset > div {\n overflow: visible;\n padding: 0 5px 0 7px;\n}\n#appchanx-settings tr:nth-of-type(2n+1),\n.section-script fieldset > div:nth-of-type(2n+1),\n.section-advanced fieldset > div:nth-of-type(2n+1),\n.section-style fieldset > div:nth-of-type(2n+1),\n.section-keybinds tr:nth-of-type(2n+1),\n#selectrice li:nth-of-type(2n+1) {\n background-color: rgba(0, 0, 0, 0.05);\n}\narticle li {\n margin: 10px 0 10px 2em;\n}\n#appchanx-settings .option {\n width: 50%;\n display: inline-block;\n vertical-align: bottom;\n}\n.option input {\n width: 100%;\n}\n.optionlabel {\n padding-left: 18px;\n}\n.rice + .optionlabel {\n padding-left: 0;\n}\n.section-script fieldset,\n.styleoption {\n text-align: left;\n}\n.section-style fieldset {\n width: 370px;\n}\n.section-script fieldset {\n width: 200px;\n}\n.suboptions,\n#mascotcontent,\n#themecontent {\n overflow: auto;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 1.7em;\n left: 0;\n}\n.mAlign {\n height: 250px;\n vertical-align: middle;\n display: table-cell;\n}\n#themecontent {\n top: 1.7em;\n}\n#save,\n.stylesettings {\n position: absolute;\n right: 10px;\n bottom: 0;\n}\n.section-style .suboptions {\n bottom: 0;\n}\n.section-container textarea {\n font-family: monospace;\n min-height: 350px;\n resize: vertical;\n width: 100%;\n}\n/* Hover Functionality */\n#mouseover {\n z-index: 33;\n position: fixed;\n max-width: 70%;\n}\n#mouseover:empty {\n display: none;\n}\n/* Mascot Tab */\n#mascot_hide {\n padding: 3px;\n position: absolute;\n top: 2px;\n right: 18px;\n}\n#mascot_hide .rice {\n float: left;\n}\n#mascot_hide > div {\n height: 0;\n text-align: right;\n overflow: hidden;\n}\n#mascot_hide:hover > div {\n height: auto;\n}\n#mascot_hide label {\n width: 100%;\n display: block;\n clear: both;\n text-decoration: none;\n}\n.mascots {\n padding: 0;\n text-align: center;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n.mascot,\n.mascotcontainer {\n overflow: hidden;\n}\n.mascot {\n position: relative;\n border: none;\n margin: 5px;\n padding: 0;\n width: 200px;\n display: inline-block;\n background-color: transparent;\n}\n.mascotcontainer {\n height: 250px;\n border: 0;\n margin: 0;\n max-height: 250px;\n cursor: pointer;\n bottom: 0;\n border-width: 0 1px 1px;\n border-style: solid;\n border-color: transparent;\n overflow: hidden;\n}\n.mascot img {\n max-width: 200px;\n}\n.mascotname,\n.mascotoptions {\n padding: 0;\n width: 100%;\n}\n.mascot .mascotoptions {\nopacity: 0;\n " + agent + "transition: opacity .3s linear;\n}\n.mascot:hover .mascotoptions {\n opacity: 1;\n}\n.mascotoptions {\n position: absolute;\n bottom: 0;\n right: 0;\n left: 0;\n}\n.mascotoptions a {\n display: inline-block;\n width: 33%;\n}\n#upload {\n position: absolute;\n width: 100px;\n left: 50%;\n margin-left: -50px;\n text-align: center;\n bottom: 0;\n}\n#mascots_batch {\n position: absolute;\n left: 10px;\n bottom: 0;\n}\n/* Themes Tab */\n#themes h1 {\n position: absolute;\n right: 300px;\n bottom: 10px;\n margin: 0;\n " + agent + "transition: all .2s ease-in-out;\n opacity: 0;\n}\n#themes .selectedtheme h1 {\n right: 11px;\n opacity: 1;\n}\n#themeContainer {\n margin-bottom: 3px;\n}\n#addthemes {\n position: absolute;\n left: 10px;\n bottom: 0;\n}\n.theme {\n margin: 1em;\n}\n/* Theme Editor */\n#themeConf {\n position: fixed;\n " + Style.sidebarLocation[1] + ": 2px;\n " + Style.sidebarLocation[0] + ": auto;\n top: 0;\n bottom: 0;\n width: 296px;\n z-index: 10;\n}\n#themebar input {\n width: 30%;\n}\n.option .color {\n width: 10%;\n border-left: none !important;\n color: transparent !important;\n}\n.option .colorfield {\n width: 90%;\n}\n.themevar textarea {\n min-width: 100%;\n max-width: 100%;\n height: 20em;\n resize: vertical;\n}\n/* Mascot Editor */\n#mascotConf {\n position: fixed;\n height: 17em;\n bottom: 0;\n left: 50%;\n width: 500px;\n margin-left: -250px;\n overflow: auto;\n z-index: 10;\n}\n#mascotConf .option,\n#mascotConf .optionlabel {\n " + Style.sizing + ": border-box;\n width: 50%;\n display: inline-block;\n vertical-align: middle;\n}\n#mascotConf .option input {\n width: 100%;\n}\n#close {\n position: absolute;\n left: 10px;\n bottom: 0;\n}\n/* Catalog */\n#content .navLinks,\n#info .navLinks,\n.btn-wrap {\n display: block;\n}\n.navLinks > .btn-wrap:not(:first-of-type)::before {\n content: ' - ';\n}\n.button {\n cursor: pointer;\n}\n#content .btn-wrap,\n#info .btn-wrap {\n display: inline-block;\n}\n#post-preview {\n position: absolute;\n z-index: 22;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n#settings,\n#threads,\n#info .navLinks,\n#content .navLinks {\n text-align: center;\n}\n#threads .thread {\n vertical-align: top;\n display: inline-block;\n word-wrap: break-word;\n overflow: hidden;\n margin-top: 5px;\n padding: 5px 0 3px;\n text-align: center;\n}\n.extended-small .thread,\n.small .thread {\n width: 165px;\n max-height: 320px;\n}\n.small .teaser,\n.large .teaser {\n display: none;\n}\n.extended-large .thread,\n.large .thread {\n width: 270px;\n max-height: 410px;\n}\n.extended-small .thumb,\n.small .thumb {\n max-width: 150px;\n max-height: 150px;\n}\n.panel {\n position: fixed;\n top: 50% !important;\n left: 50%;\n " + agent + "transform: translate(-50%, -50%);\n}\n.icon::after {\n display: inline-block;\n float: right;\n width: 1em;\n cursor: pointer;\n}\n.helpIcon::after {\n content: '?';\n}\n.closeIcon::after {\n content: '×';\n}\n/* Front Page */\n#logo {\n text-align: center;\n}\n#doc {\n margin: 0 auto;\n width: 1000px;\n position: relative;\n}\n#boards .boxcontent {\n vertical-align: top;\n text-align: center;\n}\n#filter-container,\n#options-container {\n float: right;\n position: relative;\n}\n#optionssmenu {\n top: 100% !important;\n left: 0 !important;\n}\n#boards .column {\n " + Style.sizing + ": border-box;\n display: inline-block;\n width: 16em;\n text-align: left;\n vertical-align: top;\n}\n.bd ul,\n.boxcontent ul {\n vertical-align: top;\n padding: 0;\n}\n.right-box .boxcontent ul {\n padding: 0 10px;\n}\n.yuimenuitem,\n.boxcontent li {\n list-style-type: none;\n}\n.bd ul {\n margin: 0;\n}\n.yuimenuitem::before {\n content: \" [ ] \";\n font-family: monospace;\n}\n.yuimenuitem-checked::before {\n content: \" [x] \"\n}\n.yui-u {\n display: inline-block;\n vertical-align: top;\n width: 475px;\n margin: 10px;\n}\n#recent-images .boxcontent {\n text-align: center;\n}\n#ft {\n text-align: center;\n}\n#ft ul {\n padding: 0;\n}\n#ft li {\n list-style-type: none;\n display: inline-block;\n width: 100px;\n}\n#preview-tooltip-nws,\n#preview-tooltip-ws,\n#ft .fill,\n.clear-bug {\n display: none;\n}"; }, theme: function(theme) { @@ -11233,7 +11223,7 @@ Style.padding.pages.property = Style.padding.pages.property[Style.padding.pages.property.length - 1]; } css = "body::before {\n"; - if (Style.padding.pages && ["sticky top", "top", "sticky bottom"].contains(_conf["Pagination"])) { + if (_conf['4chan SS Navigation'] && Style.padding.pages && ["sticky top", "top", "sticky bottom"].contains(_conf["Pagination"])) { css += " " + Style.padding.pages.property + ": " + Style.padding.pages.offsetHeight + "px !important;\n"; } if (_conf['Fixed Header']) { diff --git a/builds/crx/script.js b/builds/crx/script.js index 7e433015d..2041e3c36 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -104,7 +104,6 @@ 'Miscellaneous': { '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.'], '404 Redirect': [true, 'Redirect dead threads and images.'], 'Keybinds': [true, 'Bind actions to keyboard shortcuts.'], @@ -177,7 +176,6 @@ 'Remember Subject': [false, 'Remember the subject field, instead of resetting after posting.'], 'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.'], 'Remember QR Size': [false, 'Remember the size of the quick reply\'s comment field.'], - 'Hide Original Post Form': [true, 'Hide the normal post form.'], 'Cooldown': [true, 'Indicate the remaining time before posting again.'], 'Cooldown Prediction': [true, 'Decrease the cooldown time by taking into account upload speed. Disable it if it\'s inaccurate for you.'], 'Posting Success Notifications': [true, 'Show notifications on successful post creation or file uploading.'] @@ -281,7 +279,6 @@ }, 'Post Form': { 'Compact Post Form Inputs': [true, 'Use compact inputs on the post form.'], - 'Hide Show Post Form': [false, 'Hides the "Show Post Form" button when Persistent QR is disabled.'], 'Show Post Form Header': [false, 'Force the Post Form to have a header.'], 'Post Form Style': ['tabbed slideout', 'How the post form will sit on the page.', ['fixed', 'slideout', 'tabbed slideout', 'transparent fade', 'float']], 'Post Form Slideout Transitions': [true, 'Animate slideouts for the post form.'], @@ -6668,13 +6665,6 @@ return $.toggleClass(this, 'disabled'); }); Header.addShortcut(sc); - if (Conf['Hide Original Post Form']) { - $.asap((function() { - return doc; - }), function() { - return $.addClass(doc, 'hide-original-post-form'); - }); - } $.ready(this.initReady); if (Conf['Persistent QR']) { $.on(d, '4chanXInitFinished', this.persist); @@ -10460,7 +10450,7 @@ return null; } } - position = "" + (Conf['Mascot Position'] === 'bottom' || (Conf['Mascot Position'] === "default" && Conf['Post Form Style'] !== "fixed") ? 0 + ((g.VIEW !== 'thread' || Conf['Bottom Header']) && Conf['4chan SS Navigation'] ? 1.6 : 0) : 20.3 + (g.VIEW !== 'thread' || !!$('#postForm input[name=spoiler]') ? 1.4 : 0) + (Conf['Show Post Form Header'] ? 1.5 : 0) + (Conf['Post Form Decorations'] ? 0.2 : 0)) + "em"; + position = "" + (Conf['Mascot Position'] === 'bottom' || (Conf['Mascot Position'] === "default" && Conf['Post Form Style'] !== "fixed") ? 0 + Style.pfOffset : 19.6 + (g.VIEW !== 'thread' || !!$('#postForm input[name=spoiler]') ? 1.4 : 0) + (Conf['Show Post Form Header'] ? 1.5 : 0) + (Conf['Post Form Decorations'] ? 0.2 : 0) + Style.pfOffset) + "em"; if (Conf['editMode']) { if (!(mascot = editMascot || (mascot = Mascots[Conf["mascot"]]))) { return; @@ -10931,7 +10921,7 @@ if (!$.id('navtopright')) { return; } - return setTimeout((function() { + return setTimeout(function() { var exLink; Style.padding.nav = Header.bar; @@ -10944,7 +10934,7 @@ return setTimeout(Rice.nodes, 100); }); } - }), 500); + }, 500); }, agent: "-webkit-", sizing: "box-sizing", @@ -11026,13 +11016,12 @@ i = nodes.length; while (i--) { if (!Style.headCount) { - break; + return; } node = nodes[i]; if ((node.nodeName === 'STYLE' && !node.id) || (("" + node.rel).contains('stylesheet') && node.href.slice(0, 4) !== 'data')) { Style.headCount--; $.rm(node); - continue; } } }, @@ -11061,6 +11050,7 @@ _conf = Conf; agent = Style.agent; xOffset = _conf["Sidebar Location"] === "left" ? '-' : ''; + Style.pfOffset = _conf['4chan SS Navigation'] && ((_conf['Bottom Header'] && _conf['Fixed Header']) || (g.VIEW === 'index' && _conf['Pagination'] === 'sticky bottom')) ? 1.5 : 0; position = { right: { hide: parseInt(_conf['Right Thread Padding'], 10) < 100 ? "right" : "left", @@ -11124,10 +11114,10 @@ 'lower right': ".reply.quoted { position: relative; padding-bottom: 1.7em;}.reply .container { position: absolute; right: 0; bottom: 0;}.container::before { content: 'REPLIES: ';}.container { max-width: 100%; padding: 0 5px;}#qp .container { position: static; max-width: 100%;}#qp .container::before { content: '';}.inline .container { position: static; float: none;}.inline .container::before { content: '';}", 'default': "" }[_conf["Backlinks Position"]] + "\n/* Code */\n.prettyprint {\n " + Style.sizing + ": border-box;\n font-family: monospace;\n display: inline-block;\n margin-right: auto;\n white-space: pre-wrap;\n border-radius: 2px;\n overflow-x: auto;\n padding: 3px;\n max-width: 100%;\n}\n/* Menu */\n.entry {\n border-bottom: 1px solid rgba(0,0,0,.25);\n cursor: pointer;\n display: block;\n outline: none;\n padding: 3px 7px;\n position: relative;\n text-decoration: none;\n white-space: nowrap;\n}\n.entry:last-child {\n border-bottom: 0;\n}\n.has-submenu::after {\n content: \"\";\n border-" + position + ": .5em solid;\n border-top: .3em solid transparent;\n border-bottom: .3em solid transparent;\n display: inline-block;\n margin: .3em;\n position: absolute;\n right: 3px;\n}\n.submenu {\n display: none;\n position: absolute;\n " + position + ": 100%;\n top: -1px;\n}\n.focused .submenu {\n display: block;\n}\n/* Stubs */\n" + (_conf['Fit Width Replies'] ? ".stub { display: block; text-align: right;}" : "") + "\n/* Emoji */\n" + (_conf["Emoji"] !== "disable" ? Emoji.css(_conf["Emoji Position"]) : "") + "\n/* Element Replacing */\n/* Checkboxes */\n.rice {\n cursor: pointer;\n width: 9px;\n height: 9px;\n margin: 2px 3px 3px;\n display: inline-block;\n vertical-align: bottom;\n " + (_conf["Rounded Edges"] ? "border-radius: 2px;" : "") + "\n " + (_conf["Circle Checkboxes"] ? "border-radius: 6px;" : "") + "\n}\ninput:checked + .rice {\n background-attachment: scroll;\n background-repeat: no-repeat;\n background-position: bottom right;\n}\n/* Selects */\n.selectrice {\n position: relative;\n cursor: default;\n overflow: hidden;\n text-align: left;\n}\n#settings .selectrice {\n display: inline-block;\n}\n.selectrice::after {\n content: \"\";\n border-right: .25em solid transparent;\n border-left: .25em solid transparent;\n position: absolute;\n right: .4em;\n top: .5em;\n}\n.selectrice::before {\n content: \"\";\n height: 1.6em;\n position: absolute;\n right: 1.3em;\n top: 0;\n}\n/* Select Dropdown */\n#selectrice {\n padding: 0;\n margin: 0;\n position: fixed;\n max-height: 120px;\n overflow-y: auto;\n overflow-x: hidden;\n z-index: 32;\n}\n#selectrice:empty {\n display: none;\n}\n/* Post Form */\n#qr {\n z-index: 20;\n position: fixed;\n padding: 1px;\n border: 1px solid transparent;\n min-width: " + width + "px;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px 3px 0 0;" : "") + "\n}\n#qrtab {\n " + (_conf["Rounded Edges"] ? "border-radius: 3px 3px 0 0;" : "") + "\n}\n\n" + ({ - "fixed": "#qr { top: auto !important; bottom: 1.7em !important; " + Style.sidebarLocation[0] + ": 0 !important; " + Style.sidebarLocation[1] + ": auto !important;}", - "slideout": "#qrtab input,#qrtab .rice { display: none;}#qr { top: auto !important; bottom: 1.7em !important; " + Style.sidebarLocation[0] + ": 0 !important; " + Style.sidebarLocation[1] + ": auto !important; " + agent + "transform: translateX(" + xOffset + "93%);}#qr:hover,#qr.has-focus,#qr.dump { " + agent + "transform: translate(0);}", - "tabbed slideout": "#qr { top: auto !important; bottom: 1.7em !important; " + Style.sidebarLocation[0] + ": 0 !important; " + Style.sidebarLocation[1] + ": auto !important; " + agent + "transform: translateX(" + xOffset + "100%);}#qr:hover,#qr.has-focus,#qr.dump { " + agent + "transform: translateX(0);}#qrtab { " + agent + "transform: rotate(" + (Style.sidebarLocation[0] === "left" ? "" : "-") + "90deg); " + agent + "transform-origin: bottom " + Style.sidebarLocation[0] + "; position: absolute; top: 0; " + Style.sidebarLocation[0] + ": 100%; width: 110px; text-align: center; border-width: 1px 1px 0 1px; cursor: default;}#qr:hover #qrtab,#qr.has-focus #qrtab,#qr.dump #qrtab { opacity: 0; " + Style.sidebarLocation[0] + ": " + (252 + Style.sidebarOffset.W) + "px;}#qrtab input,#qrtab .close,#qrtab .rice,#qrtab span { display: none;}", - "transparent fade": "#qr { overflow: visible; top: auto !important; bottom: 1.7em !important; " + Style.sidebarLocation[0] + ": 2px !important; " + Style.sidebarLocation[1] + ": auto !important; opacity: 0.2; " + agent + "transition: opacity .3s ease-in-out 1s;}#qr:hover,#qr.has-focus,#qr.dump { opacity: 1; " + agent + "transition: opacity .3s linear;}" + "fixed": "#qr { top: auto !important; bottom: " + Style.pfOffset + "em !important; " + Style.sidebarLocation[0] + ": 0 !important; " + Style.sidebarLocation[1] + ": auto !important;}", + "slideout": "#qrtab input,#qrtab .rice { display: none;}#qr { top: auto !important; bottom: " + Style.pfOffset + "em !important; " + Style.sidebarLocation[0] + ": 0 !important; " + Style.sidebarLocation[1] + ": auto !important; " + agent + "transform: translateX(" + xOffset + "93%);}#qr:hover,#qr.has-focus,#qr.dump { " + agent + "transform: translate(0);}", + "tabbed slideout": "#qr { top: auto !important; bottom: " + Style.pfOffset + "em !important; " + Style.sidebarLocation[0] + ": 0 !important; " + Style.sidebarLocation[1] + ": auto !important; " + agent + "transform: translateX(" + xOffset + "100%);}#qr:hover,#qr.has-focus,#qr.dump { " + agent + "transform: translateX(0);}#qrtab { " + agent + "transform: rotate(" + (Style.sidebarLocation[0] === "left" ? "" : "-") + "90deg); " + agent + "transform-origin: bottom " + Style.sidebarLocation[0] + "; position: absolute; top: 0; " + Style.sidebarLocation[0] + ": 100%; width: 110px; text-align: center; border-width: 1px 1px 0 1px; cursor: default;}#qr:hover #qrtab,#qr.has-focus #qrtab,#qr.dump #qrtab { opacity: 0; " + Style.sidebarLocation[0] + ": " + (252 + Style.sidebarOffset.W) + "px;}#qrtab input,#qrtab .close,#qrtab .rice,#qrtab span { display: none;}", + "transparent fade": "#qr { overflow: visible; top: auto !important; bottom: " + Style.pfOffset + "em !important; " + Style.sidebarLocation[0] + ": 2px !important; " + Style.sidebarLocation[1] + ": auto !important; opacity: 0.2; " + agent + "transition: opacity .3s ease-in-out 1s;}#qr:hover,#qr.has-focus,#qr.dump { opacity: 1; " + agent + "transition: opacity .3s linear;}" }[_conf['Post Form Style']] || "") + "\n\n" + (_conf['Post Form Style'] !== 'tabbed slideout' ? (!(_conf['Post Form Style'] === 'float' || _conf['Show Post Form Header']) ? "#qrtab { display: none; }" : _conf['Post Form Style'] !== 'slideout' ? ".autohide:not(:hover):not(.has-focus) > form { display: none !important; }" : "") + "#qrtab { margin-bottom: 1px; }" : "") + "\n\n" + (_conf['Post Form Style'] !== 'float' && _conf["Post Form Slideout Transitions"] ? "#qr { " + agent + "transition: " + agent + "transform .3s ease-in-out 1s;}#qr:hover,#qr.has-focus,#qr.dump { " + agent + "transition: " + agent + "transform .3s linear;}#qrtab { " + agent + "transition: opacity .3s ease-in-out 1s;}#qr:hover #qrtab { " + agent + "transition: opacity .3s linear;}" : "") + "\n\n#qr .close {\n float: right;\n padding: 0 3px;\n}\n#qr .warning {\n min-height: 1.6em;\n vertical-align: middle;\n padding: 0 1px;\n border-width: 1px;\n border-style: solid;\n}\n.persona {\n width: 248px;\n max-width: 100%;\n min-width: 100%;\n}\n#dump-button {\n width: 10%;\n margin: 0;\n}\n\n" + (_conf['Compact Post Form Inputs'] ? ".persona input.field { width: 29.6%; margin: 0 0 0 0.4%;}#qr textarea.field { height: 14.8em; min-height: 9em;}#qr.has-captcha textarea.field { height: 9em;}" : ".persona input.field { width: 100%;}.persona input.field[name='name'] { width: 89.6%; margin: 0 0 0 0.4%;}#qr textarea.field { height: 11.6em; min-height: 6em;}#qr.has-captcha textarea.field { height: 6em;}") + "\n\n" + (_conf["Tripcode Hider"] ? ".tripped:not(:hover):not(:focus) { opacity: 0;}" : "") + "\n\n#qr textarea {\n resize: " + _conf['Textarea Resize'] + ";\n}\n.captcha-img {\n margin: 1px 0 0;\n text-align: center;\n line-height: 0;\n}\n.captcha-img img {\n width: 100%;\n height: 4em;\n width: 246px;\n}\n.captcha-input {\n width: 100%;\n margin: 1px 0 0;\n}\n.field,\n.selectrice,\nbutton,\ninput:not([type=radio]) {\n " + Style.sizing + ": border-box;\n font-size: " + (parseInt(_conf['Font Size'], 10)) + "px;\n height: 1.6em;\n margin: 1px 0 0;\n vertical-align: bottom;\n padding: 0 1px;\n}\n.selectrice {\n padding-right: 1.6em;\n}\n#qr textarea {\n min-width: 100%;\n}\n#qr [type='submit'] {\n width: 25%;\n}\n[type='file'] {\n position: absolute;\n opacity: 0;\n z-index: -1;\n}\n#showQR {\n display: " + (_conf["Hide Show Post Form"] ? "none" : "block") + ";\n z-index: 4;\n " + Style.sidebarLocation[0] + ": 2px;\n width: " + width + "px;\n background-color: transparent;\n text-align: center;\n position: fixed;\n top: auto;\n}\n/* Fake File Input */\n#qr-filename,\n.has-file #qr-no-file {\n display: none;\n}\n#qr-no-file,\n.has-file #qr-filename {\n display: block;\n}\n#qr-filename-container {\n " + Style.sizing + ": border-box;\n display: inline-block;\n position: relative;\n width: 100px;\n min-width: 74.6%;\n max-width: 74.6%;\n margin-right: 0.4%;\n overflow: hidden;\n padding: 2px 1px 0;\n}\n#qr-filerm {\n position: absolute;\n right: 3px;\n top: 2px;\n z-index: 2;\n}\n/* Thread Select / Spoiler Label */\n#qr-thread-select {\n vertical-align: bottom;\n width: 49%;\n display: inline-block;\n}\n#qr-spoiler-label {\n vertical-align: bottom;\n width: 49%;\n display: inline-block;\n text-align: right;\n}\n/* Dumping UI */\n.dump #dump-list-container {\n display: block;\n}\n#dump-list-container {\n display: none;\n position: relative;\n overflow-y: hidden;\n margin-top: 1px;\n}\n#dump-list {\n overflow-x: auto;\n overflow-y: hidden;\n white-space: pre;\n width: 248px;\n max-width: 100%;\n min-width: 100%;\n}\n#dump-list:hover {\n overflow-x: auto;\n}\n.qr-preview {\n " + Style.sizing + ": border-box;\n counter-increment: thumbnails;\n cursor: move;\n display: inline-block;\n height: 90px;\n width: 90px;\n padding: 2px;\n opacity: .5;\n overflow: hidden;\n position: relative;\n text-shadow: 0 1px 1px #000;\n " + agent + "transition: opacity .25s ease-in-out;\n vertical-align: top;\n}\n.qr-preview:hover,\n.qr-preview:focus {\n opacity: .9;\n}\n.qr-preview::before {\n content: counter(thumbnails);\n color: #fff;\n position: absolute;\n top: 3px;\n right: 3px;\n text-shadow: 0 0 3px #000, 0 0 8px #000;\n}\n.qr-preview#selected {\n opacity: 1;\n}\n.qr-preview.drag {\n box-shadow: 0 0 10px rgba(0,0,0,.5);\n}\n.qr-preview.over {\n border-color: #fff;\n}\n.qr-preview > span {\n color: #fff;\n}\n.remove {\n background: none;\n color: #e00;\n font-weight: 700;\n padding: 3px;\n}\na:only-of-type > .remove {\n display: none;\n}\n.remove:hover::after {\n content: \" Remove\";\n}\n.qr-preview > label {\n background: rgba(0,0,0,.5);\n color: #fff;\n right: 0; bottom: 0; left: 0;\n position: absolute;\n text-align: center;\n}\n.qr-preview > label > input {\n margin: 0;\n}\n#add-post {\n cursor: pointer;\n font-size: 2em;\n position: absolute;\n top: 50%;\n right: 10px;\n " + agent + "transform: translateY(-50%);\n}\n/* Ads */\n.topad img,\n.middlead img,\n.bottomad img {\n opacity: 0.3;\n " + agent + "transition: opacity .3s linear;\n}\n.topad img:hover,\n.middlead img:hover,\n.bottomad img:hover {\n opacity: 1;\n}\n" + (_conf["Block Ads"] ? "/* AdBlock Minus */.bottomad + hr,.topad img,.middlead img,.bottomad img { display: none;}" : "") + "\n" + (_conf["Shrink Ads"] ? ".topad a img,.middlead a img,.bottomad a img { width: 500px; height: auto;}" : "") + "\n/* Options */\n#overlay {\n position: fixed;\n z-index: 30;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n background: rgba(0,0,0,.5);\n}\n#appchanx-settings {\n width: auto;\n left: 15%;\n right: 15%;\n top: 15%;\n bottom: 15%;\n position: fixed;\n z-index: 31;\n padding: .3em;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n.description {\n display: none;\n}\n#appchanx-settings h3,\n.section-keybinds,\n.section-mascots,\n.section-script,\n.style {\n text-align: center;\n}\n.section-keybinds table,\n.section-script fieldset,\n.section-style fieldset {\n text-align: left;\n}\n.section-keybinds table {\n margin: auto;\n}\n#appchanx-settings fieldset {\n padding: 5px 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n vertical-align: top;\n " + (_conf["Single Column Mode"] ? "margin: 0 auto 6px;" : "margin: 0 3px 6px;\n display: inline-block;") + "\n border: 0;\n}\n#appchanx-settings .section-advanced fieldset {\n display: block;\n margin: 0 auto 6px;\n}\n.section-advanced .selectrice {\n display: inline-block;\n clear: both;\n}\n.section-container {\n overflow: auto;\n position: absolute;\n top: 1.7em;\n right: 5px;\n bottom: 5px;\n left: 5px;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n.sections-list {\n padding: 0 3px;\n float: left;\n}\n.sections-list > a {\n cursor: pointer;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px 3px 0 0;" : "") + "\n position: relative;\n padding: 0 4px;\n z-index: 1;\n height: 1.4em;\n display: inline-block;\n border-width: 1px 1px 0 1px;\n border-color: transparent;\n border-style: solid;\n}\n.credits {\n float: right;\n}\n#appchanx-settings h3 {\n margin: 0;\n}\n.section-script fieldset > div,\n.section-style fieldset > div,\n.section-advanced fieldset > div {\n overflow: visible;\n padding: 0 5px 0 7px;\n}\n#appchanx-settings tr:nth-of-type(2n+1),\n.section-script fieldset > div:nth-of-type(2n+1),\n.section-advanced fieldset > div:nth-of-type(2n+1),\n.section-style fieldset > div:nth-of-type(2n+1),\n.section-keybinds tr:nth-of-type(2n+1),\n#selectrice li:nth-of-type(2n+1) {\n background-color: rgba(0, 0, 0, 0.05);\n}\narticle li {\n margin: 10px 0 10px 2em;\n}\n#appchanx-settings .option {\n width: 50%;\n display: inline-block;\n vertical-align: bottom;\n}\n.option input {\n width: 100%;\n}\n.optionlabel {\n padding-left: 18px;\n}\n.rice + .optionlabel {\n padding-left: 0;\n}\n.section-script fieldset,\n.styleoption {\n text-align: left;\n}\n.section-style fieldset {\n width: 370px;\n}\n.section-script fieldset {\n width: 200px;\n}\n.suboptions,\n#mascotcontent,\n#themecontent {\n overflow: auto;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 1.7em;\n left: 0;\n}\n.mAlign {\n height: 250px;\n vertical-align: middle;\n display: table-cell;\n}\n#themecontent {\n top: 1.7em;\n}\n#save,\n.stylesettings {\n position: absolute;\n right: 10px;\n bottom: 0;\n}\n.section-style .suboptions {\n bottom: 0;\n}\n.section-container textarea {\n font-family: monospace;\n min-height: 350px;\n resize: vertical;\n width: 100%;\n}\n/* Hover Functionality */\n#mouseover {\n z-index: 33;\n position: fixed;\n max-width: 70%;\n}\n#mouseover:empty {\n display: none;\n}\n/* Mascot Tab */\n#mascot_hide {\n padding: 3px;\n position: absolute;\n top: 2px;\n right: 18px;\n}\n#mascot_hide .rice {\n float: left;\n}\n#mascot_hide > div {\n height: 0;\n text-align: right;\n overflow: hidden;\n}\n#mascot_hide:hover > div {\n height: auto;\n}\n#mascot_hide label {\n width: 100%;\n display: block;\n clear: both;\n text-decoration: none;\n}\n.mascots {\n padding: 0;\n text-align: center;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n.mascot,\n.mascotcontainer {\n overflow: hidden;\n}\n.mascot {\n position: relative;\n border: none;\n margin: 5px;\n padding: 0;\n width: 200px;\n display: inline-block;\n background-color: transparent;\n}\n.mascotcontainer {\n height: 250px;\n border: 0;\n margin: 0;\n max-height: 250px;\n cursor: pointer;\n bottom: 0;\n border-width: 0 1px 1px;\n border-style: solid;\n border-color: transparent;\n overflow: hidden;\n}\n.mascot img {\n max-width: 200px;\n}\n.mascotname,\n.mascotoptions {\n padding: 0;\n width: 100%;\n}\n.mascot .mascotoptions {\nopacity: 0;\n " + agent + "transition: opacity .3s linear;\n}\n.mascot:hover .mascotoptions {\n opacity: 1;\n}\n.mascotoptions {\n position: absolute;\n bottom: 0;\n right: 0;\n left: 0;\n}\n.mascotoptions a {\n display: inline-block;\n width: 33%;\n}\n#upload {\n position: absolute;\n width: 100px;\n left: 50%;\n margin-left: -50px;\n text-align: center;\n bottom: 0;\n}\n#mascots_batch {\n position: absolute;\n left: 10px;\n bottom: 0;\n}\n/* Themes Tab */\n#themes h1 {\n position: absolute;\n right: 300px;\n bottom: 10px;\n margin: 0;\n " + agent + "transition: all .2s ease-in-out;\n opacity: 0;\n}\n#themes .selectedtheme h1 {\n right: 11px;\n opacity: 1;\n}\n#themeContainer {\n margin-bottom: 3px;\n}\n#addthemes {\n position: absolute;\n left: 10px;\n bottom: 0;\n}\n.theme {\n margin: 1em;\n}\n/* Theme Editor */\n#themeConf {\n position: fixed;\n " + Style.sidebarLocation[1] + ": 2px;\n " + Style.sidebarLocation[0] + ": auto;\n top: 0;\n bottom: 0;\n width: 296px;\n z-index: 10;\n}\n#themebar input {\n width: 30%;\n}\n.option .color {\n width: 10%;\n border-left: none !important;\n color: transparent !important;\n}\n.option .colorfield {\n width: 90%;\n}\n.themevar textarea {\n min-width: 100%;\n max-width: 100%;\n height: 20em;\n resize: vertical;\n}\n/* Mascot Editor */\n#mascotConf {\n position: fixed;\n height: 17em;\n bottom: 0;\n left: 50%;\n width: 500px;\n margin-left: -250px;\n overflow: auto;\n z-index: 10;\n}\n#mascotConf .option,\n#mascotConf .optionlabel {\n " + Style.sizing + ": border-box;\n width: 50%;\n display: inline-block;\n vertical-align: middle;\n}\n#mascotConf .option input {\n width: 100%;\n}\n#close {\n position: absolute;\n left: 10px;\n bottom: 0;\n}\n/* Catalog */\n#content .navLinks,\n#info .navLinks,\n.btn-wrap {\n display: block;\n}\n.navLinks > .btn-wrap:not(:first-of-type)::before {\n content: ' - ';\n}\n.button {\n cursor: pointer;\n}\n#content .btn-wrap,\n#info .btn-wrap {\n display: inline-block;\n}\n#post-preview {\n position: absolute;\n z-index: 22;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n#settings,\n#threads,\n#info .navLinks,\n#content .navLinks {\n text-align: center;\n}\n#threads .thread {\n vertical-align: top;\n display: inline-block;\n word-wrap: break-word;\n overflow: hidden;\n margin-top: 5px;\n padding: 5px 0 3px;\n text-align: center;\n}\n.extended-small .thread,\n.small .thread {\n width: 165px;\n max-height: 320px;\n}\n.small .teaser,\n.large .teaser {\n display: none;\n}\n.extended-large .thread,\n.large .thread {\n width: 270px;\n max-height: 410px;\n}\n.extended-small .thumb,\n.small .thumb {\n max-width: 150px;\n max-height: 150px;\n}\n.panel {\n position: fixed;\n top: 50% !important;\n left: 50%;\n " + agent + "transform: translate(-50%, -50%);\n}\n.icon::after {\n display: inline-block;\n float: right;\n width: 1em;\n cursor: pointer;\n}\n.helpIcon::after {\n content: '?';\n}\n.closeIcon::after {\n content: '×';\n}\n/* Front Page */\n#logo {\n text-align: center;\n}\n#doc {\n margin: 0 auto;\n width: 1000px;\n position: relative;\n}\n#boards .boxcontent {\n vertical-align: top;\n text-align: center;\n}\n#filter-container,\n#options-container {\n float: right;\n position: relative;\n}\n#optionssmenu {\n top: 100% !important;\n left: 0 !important;\n}\n#boards .column {\n " + Style.sizing + ": border-box;\n display: inline-block;\n width: 16em;\n text-align: left;\n vertical-align: top;\n}\n.bd ul,\n.boxcontent ul {\n vertical-align: top;\n padding: 0;\n}\n.right-box .boxcontent ul {\n padding: 0 10px;\n}\n.yuimenuitem,\n.boxcontent li {\n list-style-type: none;\n}\n.bd ul {\n margin: 0;\n}\n.yuimenuitem::before {\n content: \" [ ] \";\n font-family: monospace;\n}\n.yuimenuitem-checked::before {\n content: \" [x] \"\n}\n.yui-u {\n display: inline-block;\n vertical-align: top;\n width: 475px;\n margin: 10px;\n}\n#recent-images .boxcontent {\n text-align: center;\n}\n#ft {\n text-align: center;\n}\n#ft ul {\n padding: 0;\n}\n#ft li {\n list-style-type: none;\n display: inline-block;\n width: 100px;\n}\n#preview-tooltip-nws,\n#preview-tooltip-ws,\n#ft .fill,\n.clear-bug {\n display: none;\n}"; }, theme: function(theme) { @@ -11215,7 +11205,7 @@ Style.padding.pages.property = Style.padding.pages.property[Style.padding.pages.property.length - 1]; } css = "body::before {\n"; - if (Style.padding.pages && ["sticky top", "top", "sticky bottom"].contains(_conf["Pagination"])) { + if (_conf['4chan SS Navigation'] && Style.padding.pages && ["sticky top", "top", "sticky bottom"].contains(_conf["Pagination"])) { css += " " + Style.padding.pages.property + ": " + Style.padding.pages.offsetHeight + "px !important;\n"; } if (_conf['Fixed Header']) { diff --git a/src/General/Config.coffee b/src/General/Config.coffee index e7723de22..db8c416fb 100644 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -9,10 +9,6 @@ Config = 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.' @@ -273,10 +269,6 @@ Config = false 'Remember the size of the quick reply\'s comment field.' ] - 'Hide Original Post Form': [ - true - 'Hide the normal post form.' - ] 'Cooldown': [ true 'Indicate the remaining time before posting again.' @@ -667,10 +659,6 @@ Config = true 'Use compact inputs on the post form.' ] - 'Hide Show Post Form': [ - false - 'Hides the "Show Post Form" button when Persistent QR is disabled.' - ] 'Show Post Form Header': [ false 'Force the Post Form to have a header.' diff --git a/src/General/css/layout.css b/src/General/css/layout.css index a8121d9d0..334da89b6 100644 --- a/src/General/css/layout.css +++ b/src/General/css/layout.css @@ -1095,7 +1095,7 @@ input:checked + .rice { "fixed": " #qr { top: auto !important; - bottom: 1.7em !important; + bottom: #{Style.pfOffset}em !important; #{Style.sidebarLocation[0]}: 0 !important; #{Style.sidebarLocation[1]}: auto !important; }" @@ -1107,7 +1107,7 @@ input:checked + .rice { } #qr { top: auto !important; - bottom: 1.7em !important; + bottom: #{Style.pfOffset}em !important; #{Style.sidebarLocation[0]}: 0 !important; #{Style.sidebarLocation[1]}: auto !important; #{agent}transform: translateX(#{xOffset}93%); @@ -1121,7 +1121,7 @@ input:checked + .rice { "tabbed slideout": " #qr { top: auto !important; - bottom: 1.7em !important; + bottom: #{Style.pfOffset}em !important; #{Style.sidebarLocation[0]}: 0 !important; #{Style.sidebarLocation[1]}: auto !important; #{agent}transform: translateX(#{xOffset}100%); @@ -1159,7 +1159,7 @@ input:checked + .rice { #qr { overflow: visible; top: auto !important; - bottom: 1.7em !important; + bottom: #{Style.pfOffset}em !important; #{Style.sidebarLocation[0]}: 2px !important; #{Style.sidebarLocation[1]}: auto !important; opacity: 0.2; diff --git a/src/Posting/QuickReply.coffee b/src/Posting/QuickReply.coffee index 3418eb208..d94ced8a9 100644 --- a/src/Posting/QuickReply.coffee +++ b/src/Posting/QuickReply.coffee @@ -9,6 +9,7 @@ QR = textContent: 'QR' title: 'Quick Reply' href: 'javascript:;' + $.on sc, 'click', -> if !QR.nodes or QR.nodes.el.hidden $.event 'CloseMenu' @@ -20,9 +21,6 @@ QR = Header.addShortcut sc - if Conf['Hide Original Post Form'] - $.asap (-> doc), -> $.addClass doc, 'hide-original-post-form' - $.ready @initReady $.on d, '4chanXInitFinished', @persist if Conf['Persistent QR'] @@ -51,7 +49,6 @@ QR = else QR.status() - node: -> $.on $('a[title="Quote this post"]', @nodes.info), 'click', QR.quote diff --git a/src/Theming/Mascots.coffee b/src/Theming/Mascots.coffee index 2723c5e26..f33c66a78 100644 --- a/src/Theming/Mascots.coffee +++ b/src/Theming/Mascots.coffee @@ -8,9 +8,9 @@ MascotTools = return if el then el.src = "" else null position = "#{if Conf['Mascot Position'] is 'bottom' or (Conf['Mascot Position'] is "default" and Conf['Post Form Style'] isnt "fixed") - 0 + (if (g.VIEW isnt 'thread' or Conf['Bottom Header']) and Conf['4chan SS Navigation'] then 1.6 else 0) + 0 + Style.pfOffset else - 20.3 + (if g.VIEW isnt 'thread' or !!$ '#postForm input[name=spoiler]' then 1.4 else 0) + (if Conf['Show Post Form Header'] then 1.5 else 0) + (if Conf['Post Form Decorations'] then 0.2 else 0) + 19.6 + (if g.VIEW isnt 'thread' or !!$ '#postForm input[name=spoiler]' then 1.4 else 0) + (if Conf['Show Post Form Header'] then 1.5 else 0) + (if Conf['Post Form Decorations'] then 0.2 else 0) + Style.pfOffset }em" # If we're editting anything, let's not change mascots any time we change a value. diff --git a/src/Theming/Style.coffee b/src/Theming/Style.coffee index 37f6d94c7..a0468141f 100644 --- a/src/Theming/Style.coffee +++ b/src/Theming/Style.coffee @@ -13,6 +13,7 @@ Style = prev = $ ".pagelist > .prev" prevA = $.el 'a', textContent: '<' + next = $ ".pagelist > .next" nextA = $.el 'a', textContent: '>' @@ -21,6 +22,7 @@ Style = prevA.href = 'javascript:;' $.on prevA, 'click', -> prevAction.firstElementChild.click() + if (nextAction = next.firstElementChild).nodeName is 'FORM' nextA.href = 'javascript:;' $.on nextA, 'click', -> @@ -33,7 +35,7 @@ Style = return unless $.id 'navtopright' # Give ExLinks and 4sight a little time to append their dialog links - setTimeout (-> + setTimeout -> Style.padding.nav = Header.bar Style.padding.pages = $(".pagelist", d.body) Style.padding() @@ -42,7 +44,7 @@ Style = if exLink = $ "#navtopright .exlinksOptionsLink", d.body $.on exLink, "click", -> setTimeout Rice.nodes, 100 - ), 500 + , 500 agent: "<% if (type === 'crx') { %>-webkit-<% } else if (type === 'userscript') { %>-moz-<% } else { %>-o-<% } %>" @@ -114,12 +116,11 @@ Style = nodes = d.head.children i = nodes.length while i-- - break unless Style.headCount + return unless Style.headCount node = nodes[i] if (node.nodeName is 'STYLE' and !node.id) or ("#{node.rel}".contains('stylesheet') and node.href[..3] isnt 'data') Style.headCount-- $.rm node - continue return filter: (text, background) -> @@ -148,6 +149,11 @@ Style = _conf = Conf agent = Style.agent xOffset = if _conf["Sidebar Location"] is "left" then '-' else '' + + Style.pfOffset = if _conf['4chan SS Navigation'] and ((_conf['Bottom Header'] and _conf['Fixed Header']) or (g.VIEW is 'index' and _conf['Pagination'] is 'sticky bottom')) + 1.5 + else + 0 # Position of submenus in relation to the post menu. position = { @@ -332,7 +338,7 @@ Style = Style.padding.pages.property = _conf["Pagination"].split(" ") Style.padding.pages.property = Style.padding.pages.property[Style.padding.pages.property.length - 1] css = "body::before {\n" - if Style.padding.pages and ["sticky top", "top", "sticky bottom"].contains _conf["Pagination"] + if _conf['4chan SS Navigation'] and Style.padding.pages and ["sticky top", "top", "sticky bottom"].contains _conf["Pagination"] css += " #{Style.padding.pages.property}: #{Style.padding.pages.offsetHeight}px !important;\n" if _conf['Fixed Header']