From 3851be3898522183656de2942e262304db7b062b Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Sat, 6 Jul 2013 14:20:11 -0700 Subject: [PATCH] HAEY KCUF! SMARTSHIFT! --- LICENSE | 2 +- builds/appchan-x.user.js | 11 ++++++----- builds/crx/script.js | 11 ++++++----- src/General/Config.coffee | 9 +++++---- src/Theming/Style.coffee | 3 ++- 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/LICENSE b/LICENSE index 520f2a55c..3f7858dd3 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* appchan x - Version 2.1.3 - 2013-07-05 +* appchan x - Version 2.1.3 - 2013-07-06 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index d11c853e1..6a7835a14 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -18,7 +18,7 @@ // ==/UserScript== /* -* appchan x - Version 2.1.3 - 2013-07-05 +* appchan x - Version 2.1.3 - 2013-07-06 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE @@ -187,7 +187,6 @@ 'Page Count in Stats': [false, 'Display the page count in the thread stats as well.'], 'Updater and Stats in Header': [true, 'Places the thread updater and thread stats in the header instead of floating them.'], 'Thread Watcher': [true, 'Bookmark threads.'], - 'Toggleable Thread Watcher': [false, 'Adds a shortcut for the thread watcher, hides the watcher by default, and makes it scroll with the page.'], 'Auto Watch': [true, 'Automatically watch threads you start.'], 'Auto Watch Reply': [false, 'Automatically watch threads you reply to.'] }, @@ -295,7 +294,8 @@ 'Grayscale Mascots': [false, 'Force mascots to be monochrome.'], 'Mascot Opacity': ['1.00', 'Make Mascots transparent.', 'text'], 'Hide Mascots on Catalog': [false, 'Do not show mascots on the official catalog pages.'], - 'Silhouettize Mascots': [false, 'Apply a filter to mascots to try to turn them into silhouettes.'] + 'Silhouettize Mascots': [false, 'Apply a filter to mascots to try to turn them into silhouettes.'], + 'Silhouette Contrast': ['0', 'A number to increase the contrast of silhouettes. Suggested values: 0, 8, 16 ...', 'text'] }, Navigation: { 'Navigation Alignment': ['left', 'Change the text alignment of the navigation.', ['left', 'center', 'right']], @@ -11554,12 +11554,13 @@ return "#boardNavDesktopFoot a,\n#header-bar a,\n.deleteform::before,\n.field,\n.hide-navigation-decorations .pages a,\n.notification,\n.selectrice,\nbody,\nbutton,\ninput,\ntextarea {\n font-size: " + (parseInt(_conf["Font Size"], 10)) + "px;\n}\n#boardTitle,\n.boardTitle a {\n font-size: " + (parseInt(_conf["Font Size"], 10) + 10) + "px;\n}\n.boardSubtitle,\n.boardSubtitle a {\n font-size: " + (parseInt(_conf["Font Size"], 10) - 1) + "px;\n}\nbody,\nbutton,\ninput,\ntextarea {\n font-family: " + _conf["Font"] + ";\n}\nbody {\n padding: 0 " + (parseInt(_conf["Right Thread Padding"], 10) + editSpace["right"]) + "px 0 " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["left"]) + "px;\n}\n.board > .thread {\n margin: " + (parseInt(_conf["Top Thread Padding"], 10)) + "px 0 " + (parseInt(_conf["Bottom Thread Padding"], 10)) + "px 0;\n}\n.post,\n.summary {\n margin-bottom: " + Conf["Post Spacing"] + "px;\n}\n.thread > .threadContainer:last-of-type {\n margin-bottom: -" + Conf["Post Spacing"] + "px;\n}\n.thread > .replyContainer > .reply.post {\n border-width: " + (_conf['Post Spacing'] === "0" ? "1px 1px 0 1px" : '1px') + ";\n}\n#post-preview,\n.postMessage {\n margin: " + _conf['Vertical Post Padding'] + "px " + _conf['Horizontal Post Padding'] + "px;\n}\n:root:not(fourchan-ss-navigation):not(.pagination-on-side) .pagelist,\n:root:not(fourchan-ss-navigation) #header-bar {\n margin-left: " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["right"]) + "px;\n margin-right: " + (parseInt(_conf["Right Thread Padding"], 10) + editSpace["left"]) + "px;\n}\n/* Emoji */\na.useremail:last-of-type::before {\n margin-right: " + (parseInt(_conf['Emoji Spacing'])) + "px;\n}\na.useremail:last-of-type::after {\n margin-left: " + (parseInt(_conf['Emoji Spacing'])) + "px;\n}\n#mascot {\n opacity: " + Conf['Mascot Opacity'] + ";\n}"; }, theme: function(theme) { - var background, backgroundC, bgColor, replybg; + var background, backgroundC, bgColor, replyRGB, replybg; bgColor = new Style.color(Style.colorToHex(backgroundC = theme["Background Color"]) || 'aaaaaa'); replybg = new Style.color(Style.colorToHex(theme["Reply Background"])); + replyRGB = "rgb(" + (replybg.shiftRGB(parseInt(Conf['Silhouette Contrast'], 10), true)) + ")"; Style.lightTheme = bgColor.isLight(); - Style.svg.innerHTML = "\n\n\n"; + Style.svg.innerHTML = "\n\n\n"; return (".hide_thread_button span > span,\n.hide_reply_button span > span {\n background-color: " + theme["Links"] + ";\n}\n#mascot_hide label {\n border-bottom: 1px solid " + theme["Reply Border"] + ";\n}\n#content .thumb {\n box-shadow: 0 0 5px " + theme["Reply Border"] + ";\n}\n.export-button,\n.mascotname,\n#mascot-options {\n background: " + theme["Dialog Background"] + ";\n border: 1px solid " + theme["Buttons Border"] + ";\n}\n.highlight-you .opContainer.quotesYou,\n.highlight-own .opContainer.yourPost,\n.opContainer.filter-highlight {\n box-shadow: inset 5px 0 " + theme["Backlinked Reply Outline"] + ";\n}\n.highlight-you .quotesYou > .reply,\n.highlight-own .yourPost > .reply,\n.filter-highlight > .reply {\n box-shadow: -5px 0 " + theme["Backlinked Reply Outline"] + ";\n}\nhr {\n border-bottom: 1px solid " + theme["Reply Border"] + ";\n}\nhr#unread-line {\n border-bottom: 1px solid " + theme["Reply Background"] + ";\n visibility: visible;\n}\n.threadContainer {\n border-color: " + theme["Reply Border"] + " !important;\n}\nhtml {\n background: " + (backgroundC || '') + ";\n background-image: " + (theme["Background Image"] || '') + ";\n background-repeat: " + (theme["Background Repeat"] || '') + ";\n background-attachment: " + (theme["Background Attachment"] || '') + ";\n background-position: " + (theme["Background Position"] || '') + ";\n}\n.panel,\n.section-container,\n#exlinks-options-content,\n#themecontent {\n background: " + backgroundC + ";\n border: 1px solid " + theme["Reply Border"] + ";\n}\n.sections-list > a.tab-selected {\n background: " + backgroundC + ";\n border-color: " + theme["Reply Border"] + ";\n}\n.captcha-img img {\n filter: url(\"#captcha-filter\");\n}\n#boardTitle {\n text-shadow:\n 1px 1px " + backgroundC + ",\n -1px -1px " + backgroundC + ",\n 1px -1px " + backgroundC + ",\n -1px 1px " + backgroundC + ";\n}\n.sidebar-glow #boardTitle {\n text-shadow:\n 1px 1px 1px " + backgroundC + ",\n -1px -1px 1px " + backgroundC + ",\n 1px -1px 1px " + backgroundC + ",\n -1px 1px 1px " + backgroundC + ",\n 0 2px 4px rgba(0,0,0,.6),\n 0 0 10px rgba(0,0,0,.6);\n}\n#exlinks-options,\n#appchanx-settings,\n#qrtab,\ninput[type=\"submit\"],\ninput[value=\"Report\"],\nspan[style=\"left: 5px; position: absolute;\"] a {\n background: " + theme["Buttons Background"] + ";\n border: 1px solid " + theme["Buttons Border"] + ";\n}\n.enabled .mascotcontainer {\n background: " + theme["Buttons Background"] + ";\n border-color: " + theme["Buttons Border"] + ";\n}\n#dump,\n#qr-filename-container,\n#appchanx-settings input,\n.captcha-img,\n.dump #dump,\n.qr-preview,\n.selectrice,\nbutton,\ninput,\ntextarea {\n background: " + theme["Input Background"] + ";\n border: 1px solid " + theme["Input Border"] + ";\n}\n.has-file #qr-extras-container {\n background: " + theme["Input Background"] + ";\n}\n#dump:hover,\n#qr-filename-container:hover,\n.selectrice:hover,\n#selectrice li:hover,\n#selectrice li:nth-of-type(2n+1):hover,\ninput:hover,\ntextarea:hover {\n background: " + theme["Hovered Input Background"] + ";\n border-color: " + theme["Hovered Input Border"] + ";\n}\n.has-file #qr-filename-container:hover #qr-extras-container {\n background: " + theme["Hovered Input Background"] + ";\n}\n#dump:active,\n#dump:focus,\n#selectrice li:focus,\n.selectrice:focus,\n#qr-filename-container:active,\n#qr-filename-container:focus,\ninput:focus,\ntextarea:focus,\ntextarea.field:focus {\n background: " + theme["Focused Input Background"] + ";\n border-color: " + theme["Focused Input Border"] + ";\n color: " + theme["Inputs"] + ";\n}\n.has-file #qr-filename-container:active #qr-extras-container,\n.has-file #qr-filename-container:focus #qr-extras-container {\n background: " + theme["Focused Input Background"] + ";\n}\n#ft,\n#mouseover,\n#post-preview,\n#qp .post,\n#threads > .thread,\n#xupdater,\n.box-outer,\n.reply.post {\n border-width: 1px;\n border-style: solid;\n border-color: " + theme["Reply Border"] + ";\n background: " + theme["Reply Background"] + ";\n}\n.exblock.reply,\n.reply.post.highlight,\n.reply.post:target {\n background: " + theme["Highlighted Reply Background"] + ";\n border: 1px solid " + theme["Highlighted Reply Border"] + ";\n}\n#header-bar,\n.pagelist {\n background: " + theme["Navigation Background"] + ";\n border-color: " + theme["Navigation Border"] + ";\n}\n#doc,\n#threads,\n.board > .thread {\n background: " + theme["Thread Wrapper Background"] + ";\n border: 1px solid " + theme["Thread Wrapper Border"] + ";\n}\n#boardNavDesktopFoot,\n#mascot_hide,\n#menu,\n#selectrice,\n#themeConf,\n#watcher,\n#watcher:hover,\n.announcements-slideout #globalMessage,\n.dialog,\n.post-form-style-float #qr,\n.post-form-decorations #qr,\n.submenu {\n background: " + theme["Dialog Background"] + ";\n border: 1px solid " + theme["Dialog Border"] + ";\n}\n#qp.dialog {\n border: none;\n}\n.watch-thread-link {\n background-image: url(\"data:image/svg+xml,\");\n} \n.deleteform::before,\n.deleteform,\n#qr .warning {\n background: " + theme["Input Background"] + ";\n border-color: " + theme["Input Border"] + ";\n}\n.disabledwarning,\n.warning {\n color: " + theme["Warnings"] + ";\n}\n#charCount {\n color: " + (Style.lightTheme ? "rgba(0,0,0,0.7)" : "rgba(255,255,255,0.7)") + ";\n}\n.postNum a {\n color: " + theme["Post Numbers"] + ";\n}\n.subject {\n color: " + theme["Subjects"] + " !important;\n}\n.dateTime,\n.post-ago {\n color: " + theme["Timestamps"] + " !important;\n}\n#fs_status a,\n#updater #update-status:not(.new)::after,\n#showQR,\n.abbr,\n.boxbar,\n.boxcontent,\n.deleteform::before,\n.pages strong,\n.pln,\n.reply,\n.reply.highlight,\n.summary,\nbody,\nbutton,\nspan[style=\"left: 5px; position: absolute;\"] a,\ninput,\ntextarea {\n color: " + theme["Text"] + ";\n}\n#exlinks-options-content > table,\n#appchanx-settings fieldset,\n#selectrice {\n border-bottom: 1px solid " + theme["Reply Border"] + ";\n box-shadow: inset " + theme["Shadow Color"] + " 0 0 5px;\n}\n.quote + .spoiler:hover,\n.quote {\n color: " + theme["Greentext"] + ";\n}\n.forwardlink {\n border-bottom: 1px dashed " + theme["Backlinks"] + ";\n}\n.container::before {\n color: " + theme["Timestamps"] + ";\n}\n.quote-shadows #menu,\n.quote-shadows #post-preview,\n.quote-shadows #qp .opContainer,\n.quote-shadows #qp .replyContainer,\n.quote-shadows .submenu {\n box-shadow: 5px 5px 5px " + theme['Shadow Color'] + ";\n}\n.rice {\n background: " + theme["Checkbox Background"] + ";\n border: 1px solid " + theme["Checkbox Border"] + ";\n}\n.selectrice::before {\n border-left: 1px solid " + theme["Input Border"] + ";\n}\n.selectrice::after {\n border-top: .45em solid " + theme["Inputs"] + ";\n}\n.bd {\n background: " + theme["Buttons Background"] + ";\n border: 1px solid " + theme["Buttons Border"] + ";\n}\n.pages a,\n#header-bar a {\n color: " + theme["Navigation Links"] + ";\n}\ninput[type=checkbox]:checked + .rice::after {\n border-color: " + theme["Inputs"] + ";\n}\n#addReply,\n#dump,\n.button,\n.entry,\n.replylink,\na {\n color: " + theme["Links"] + ";\n}\n.backlink {\n color: " + theme["Backlinks"] + ";\n}\n.qiQuote,\n.quotelink {\n color: " + theme["Quotelinks"] + ";\n}\n#addReply:hover,\n#dump:hover,\n.entry:hover,\n.replylink:hover,\n.qiQuote:hover,\n.quotelink:hover,\na .name:hover,\na .postertrip:hover,\na:hover {\n color: " + theme["Hovered Links"] + ";\n}\n#header-bar a:hover,\n#boardTitle a:hover {\n color: " + theme["Hovered Navigation Links"] + ";\n}\n#boardTitle {\n color: " + theme["Board Title"] + ";\n}\n.name,\n.post-author {\n color: " + theme["Names"] + " !important;\n}\n.post-tripcode,\n.postertrip,\n.trip {\n color: " + theme["Tripcodes"] + " !important;\n}\na .postertrip,\na .name {\n color: " + theme["Emails"] + ";\n}\n.post.reply.qphl,\n.post.op.qphl {\n border-color: " + theme["Backlinked Reply Outline"] + ";\n background: " + theme["Highlighted Reply Background"] + ";\n}\n.quote-shadows .inline .post {\n box-shadow: 5px 5px 5px " + theme['Shadow Color'] + ";\n}\n.placeholder,\n#qr input::placeholder,\n#qr textarea::placeholder {\n color: " + (Style.lightTheme ? "rgba(0,0,0,0.3)" : "rgba(255,255,255,0.2)") + " !important;\n}\n#qr input:placeholder,\n#qr textarea:placeholder,\n.placeholder {\n color: " + (Style.lightTheme ? "rgba(0,0,0,0.3)" : "rgba(255,255,255,0.2)") + " !important;\n}\n#appchanx-settings fieldset,\n.boxcontent dd,\n.selectrice ul {\n border-color: " + (Style.lightTheme ? "rgba(0,0,0,0.1)" : "rgba(255,255,255,0.1)") + ";\n}\n#appchanx-settings li,\n#selectrice li:not(:first-of-type) {\n border-top: 1px solid " + (Style.lightTheme ? "rgba(0,0,0,0.05)" : "rgba(255,255,255,0.025)") + ";\n}\n#navtopright .exlinksOptionsLink::after,\n#main-menu,\n.navLinks > a:first-of-type::after,\n#watcher::after,\n#globalMessage::after,\n#boardNavDesktopFoot::after,\n#img-controls,\n#catalog::after,\n#fappeTyme {\n " + (!Style.lightTheme ? "filter: url(\"#icons-filter\");" : "") + "\n}\n.alternate-post-colors #threads > .thread:nth-of-type(2n+1),\n.alternate-post-colors .replyContainer:nth-of-type(2n+1) .post {\n background-image: linear-gradient(" + (replybg ? "rgba(" + (replybg.shiftRGB(-4, false)) + ",0.8), rgba(" + (replybg.shiftRGB(-4, false)) + ",0.8)" : Style.lightTheme ? "rgba(0,0,0,0.05), rgba(0,0,0,0.05)" : "rgba(255,255,255,0.02), rgba(255,255,255,0.02)") + ");\n}\n.color-reply-headings .boxbar,\n.color-reply-headings .postInfo {\n background: " + (replybg ? "rgba(" + (replybg.shiftRGB(-12, false)) + ",0.8)" : "rgba(0,0,0,0.1)") + ";\n border-bottom: 1px solid " + theme["Reply Border"] + "\n}\n.color-file-info .file {\n background: " + (replybg ? "rgba(" + (replybg.shiftRGB(-8, false)) + ",0.8)" : "rgba(0,0,0,0.1)") + ";\n border-bottom: 1px solid " + theme["Reply Border"] + "\n border-top: 1px solid " + theme["Reply Border"] + "\n}\n.color-reply.headings.color-file-info {\n border-top: none;\n}\n.op-background .op.post {\n background: " + theme["Reply Background"] + ";\n border: 1px solid " + theme["Reply Border"] + ";\n}\n.op-background .op.post:target\n.op-background .op.post.highlight {\n background: " + theme["Highlighted Reply Background"] + ";\n border: 1px solid " + theme["Highlighted Reply Border"] + ";\n}\n.fourchan-banner-at-sidebar-top.icon-orientation-vertical body::after {\n background: " + backgroundC + ";\n}\n.fourchan-banner-at-sidebar-top.icon-orientation-vertical.fourchan-ss-sidebar body::after,\n.fourchan-banner-at-sidebar-top.fourchan-ss-sidebar body::before {\n background: rgba(" + ((background = new Style.color(Style.colorToHex(theme["Reply Background"]))) ? background.shiftRGB(-18) : void 0) + ", 0.8);\n}\n.fourchan-ss-sidebar.sidebar-location-right body::before {\n border-left: 2px solid " + backgroundC + ";\n box-shadow:\n inset 1px 0 0 " + theme["Reply Border"] + ",\n -1px 0 0 " + theme["Reply Border"] + ";\n}\n.fourchan-ss-sidebar.sidebar-location-left body::before {\n border-right: 2px solid " + backgroundC + ";\n box-shadow:\n 1px 0 0 " + theme["Reply Border"] + ",\n inset -1px 0 0 " + theme["Reply Border"] + ";\n}\n.sage-highlighting-text.sage-highlight-position-before a.useremail[href*=\"sage\"]:last-of-type::before,\n.sage-highlighting-text.sage-highlight-position-before a.useremail[href*=\"Sage\"]:last-of-type::before,\n.sage-highlighting-text.sage-highlight-position-before a.useremail[href*=\"SAGE\"]:last-of-type::before,\n.sage-highlighting-text.sage-highlight-position-after a.useremail[href*=\"sage\"]:last-of-type::after,\n.sage-highlighting-text.sage-highlight-position-after a.useremail[href*=\"Sage\"]:last-of-type::after,\n.sage-highlighting-text.sage-highlight-position-after a.useremail[href*=\"SAGE\"]:last-of-type::after {\n content: \" (sage) \";\n color: " + theme["Sage"] + ";\n}\n.quote-shadows #qr {\n box-shadow: 5px 5px 5px " + theme['Shadow Color'] + ";\n}\n" + theme["Custom CSS"]) + (Style.lightTheme ? ".prettyprint {\n background-color: #e7e7e7;\n border: 1px solid #dcdcdc;\n}\n.com {\n color: #dd0000;\n}\n.str,\n.atv {\n color: #7fa61b;\n}\n.pun {\n color: #61663a;\n}\n.tag {\n color: #117743;\n}\n.kwd {\n color: #5a6F9e;\n}\n.typ,\n.atn {\n color: #9474bd;\n}\n.lit {\n color: #368c72;\n}" : ".prettyprint {\n background-color: rgba(0,0,0,.1);\n border: 1px solid rgba(0,0,0,0.5);\n}\n.tag {\n color: #96562c;\n}\n.pun {\n color: #5b6f2a;\n}\n.com {\n color: #a34443;\n}\n.str,\n.atv {\n color: #8ba446;\n}\n.kwd {\n color: #987d3e;\n}\n.typ,\n.atn {\n color: #897399;\n}\n.lit {\n color: #558773;\n}"); }, iconPositions: function() { diff --git a/builds/crx/script.js b/builds/crx/script.js index b2a1f2ad4..fdecc9185 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* appchan x - Version 2.1.3 - 2013-07-05 +* appchan x - Version 2.1.3 - 2013-07-06 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE @@ -169,7 +169,6 @@ 'Page Count in Stats': [false, 'Display the page count in the thread stats as well.'], 'Updater and Stats in Header': [true, 'Places the thread updater and thread stats in the header instead of floating them.'], 'Thread Watcher': [true, 'Bookmark threads.'], - 'Toggleable Thread Watcher': [false, 'Adds a shortcut for the thread watcher, hides the watcher by default, and makes it scroll with the page.'], 'Auto Watch': [true, 'Automatically watch threads you start.'], 'Auto Watch Reply': [false, 'Automatically watch threads you reply to.'] }, @@ -276,7 +275,8 @@ 'Grayscale Mascots': [false, 'Force mascots to be monochrome.'], 'Mascot Opacity': ['1.00', 'Make Mascots transparent.', 'text'], 'Hide Mascots on Catalog': [false, 'Do not show mascots on the official catalog pages.'], - 'Silhouettize Mascots': [false, 'Apply a filter to mascots to try to turn them into silhouettes.'] + 'Silhouettize Mascots': [false, 'Apply a filter to mascots to try to turn them into silhouettes.'], + 'Silhouette Contrast': ['0', 'A number to increase the contrast of silhouettes. Suggested values: 0, 8, 16 ...', 'text'] }, Navigation: { 'Navigation Alignment': ['left', 'Change the text alignment of the navigation.', ['left', 'center', 'right']], @@ -11543,12 +11543,13 @@ return "#boardNavDesktopFoot a,\n#header-bar a,\n.deleteform::before,\n.field,\n.hide-navigation-decorations .pages a,\n.notification,\n.selectrice,\nbody,\nbutton,\ninput,\ntextarea {\n font-size: " + (parseInt(_conf["Font Size"], 10)) + "px;\n}\n#boardTitle,\n.boardTitle a {\n font-size: " + (parseInt(_conf["Font Size"], 10) + 10) + "px;\n}\n.boardSubtitle,\n.boardSubtitle a {\n font-size: " + (parseInt(_conf["Font Size"], 10) - 1) + "px;\n}\nbody,\nbutton,\ninput,\ntextarea {\n font-family: " + _conf["Font"] + ";\n}\nbody {\n padding: 0 " + (parseInt(_conf["Right Thread Padding"], 10) + editSpace["right"]) + "px 0 " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["left"]) + "px;\n}\n.board > .thread {\n margin: " + (parseInt(_conf["Top Thread Padding"], 10)) + "px 0 " + (parseInt(_conf["Bottom Thread Padding"], 10)) + "px 0;\n}\n.post,\n.summary {\n margin-bottom: " + Conf["Post Spacing"] + "px;\n}\n.thread > .threadContainer:last-of-type {\n margin-bottom: -" + Conf["Post Spacing"] + "px;\n}\n.thread > .replyContainer > .reply.post {\n border-width: " + (_conf['Post Spacing'] === "0" ? "1px 1px 0 1px" : '1px') + ";\n}\n#post-preview,\n.postMessage {\n margin: " + _conf['Vertical Post Padding'] + "px " + _conf['Horizontal Post Padding'] + "px;\n}\n:root:not(fourchan-ss-navigation):not(.pagination-on-side) .pagelist,\n:root:not(fourchan-ss-navigation) #header-bar {\n margin-left: " + (parseInt(_conf["Left Thread Padding"], 10) + editSpace["right"]) + "px;\n margin-right: " + (parseInt(_conf["Right Thread Padding"], 10) + editSpace["left"]) + "px;\n}\n/* Emoji */\na.useremail:last-of-type::before {\n margin-right: " + (parseInt(_conf['Emoji Spacing'])) + "px;\n}\na.useremail:last-of-type::after {\n margin-left: " + (parseInt(_conf['Emoji Spacing'])) + "px;\n}\n#mascot {\n opacity: " + Conf['Mascot Opacity'] + ";\n}"; }, theme: function(theme) { - var background, backgroundC, bgColor, replybg; + var background, backgroundC, bgColor, replyRGB, replybg; bgColor = new Style.color(Style.colorToHex(backgroundC = theme["Background Color"]) || 'aaaaaa'); replybg = new Style.color(Style.colorToHex(theme["Reply Background"])); + replyRGB = "rgb(" + (replybg.shiftRGB(parseInt(Conf['Silhouette Contrast'], 10), true)) + ")"; Style.lightTheme = bgColor.isLight(); - Style.svg.innerHTML = "\n\n\n"; + Style.svg.innerHTML = "\n\n\n"; return (".hide_thread_button span > span,\n.hide_reply_button span > span {\n background-color: " + theme["Links"] + ";\n}\n#mascot_hide label {\n border-bottom: 1px solid " + theme["Reply Border"] + ";\n}\n#content .thumb {\n box-shadow: 0 0 5px " + theme["Reply Border"] + ";\n}\n.export-button,\n.mascotname,\n#mascot-options {\n background: " + theme["Dialog Background"] + ";\n border: 1px solid " + theme["Buttons Border"] + ";\n}\n.highlight-you .opContainer.quotesYou,\n.highlight-own .opContainer.yourPost,\n.opContainer.filter-highlight {\n box-shadow: inset 5px 0 " + theme["Backlinked Reply Outline"] + ";\n}\n.highlight-you .quotesYou > .reply,\n.highlight-own .yourPost > .reply,\n.filter-highlight > .reply {\n box-shadow: -5px 0 " + theme["Backlinked Reply Outline"] + ";\n}\nhr {\n border-bottom: 1px solid " + theme["Reply Border"] + ";\n}\nhr#unread-line {\n border-bottom: 1px solid " + theme["Reply Background"] + ";\n visibility: visible;\n}\n.threadContainer {\n border-color: " + theme["Reply Border"] + " !important;\n}\nhtml {\n background: " + (backgroundC || '') + ";\n background-image: " + (theme["Background Image"] || '') + ";\n background-repeat: " + (theme["Background Repeat"] || '') + ";\n background-attachment: " + (theme["Background Attachment"] || '') + ";\n background-position: " + (theme["Background Position"] || '') + ";\n}\n.panel,\n.section-container,\n#exlinks-options-content,\n#themecontent {\n background: " + backgroundC + ";\n border: 1px solid " + theme["Reply Border"] + ";\n}\n.sections-list > a.tab-selected {\n background: " + backgroundC + ";\n border-color: " + theme["Reply Border"] + ";\n}\n.captcha-img img {\n -webkit-filter: url(\"#captcha-filter\");\n}\n#boardTitle {\n text-shadow:\n 1px 1px " + backgroundC + ",\n -1px -1px " + backgroundC + ",\n 1px -1px " + backgroundC + ",\n -1px 1px " + backgroundC + ";\n}\n.sidebar-glow #boardTitle {\n text-shadow:\n 1px 1px 1px " + backgroundC + ",\n -1px -1px 1px " + backgroundC + ",\n 1px -1px 1px " + backgroundC + ",\n -1px 1px 1px " + backgroundC + ",\n 0 2px 4px rgba(0,0,0,.6),\n 0 0 10px rgba(0,0,0,.6);\n}\n#exlinks-options,\n#appchanx-settings,\n#qrtab,\ninput[type=\"submit\"],\ninput[value=\"Report\"],\nspan[style=\"left: 5px; position: absolute;\"] a {\n background: " + theme["Buttons Background"] + ";\n border: 1px solid " + theme["Buttons Border"] + ";\n}\n.enabled .mascotcontainer {\n background: " + theme["Buttons Background"] + ";\n border-color: " + theme["Buttons Border"] + ";\n}\n#dump,\n#qr-filename-container,\n#appchanx-settings input,\n.captcha-img,\n.dump #dump,\n.qr-preview,\n.selectrice,\nbutton,\ninput,\ntextarea {\n background: " + theme["Input Background"] + ";\n border: 1px solid " + theme["Input Border"] + ";\n}\n.has-file #qr-extras-container {\n background: " + theme["Input Background"] + ";\n}\n#dump:hover,\n#qr-filename-container:hover,\n.selectrice:hover,\n#selectrice li:hover,\n#selectrice li:nth-of-type(2n+1):hover,\ninput:hover,\ntextarea:hover {\n background: " + theme["Hovered Input Background"] + ";\n border-color: " + theme["Hovered Input Border"] + ";\n}\n.has-file #qr-filename-container:hover #qr-extras-container {\n background: " + theme["Hovered Input Background"] + ";\n}\n#dump:active,\n#dump:focus,\n#selectrice li:focus,\n.selectrice:focus,\n#qr-filename-container:active,\n#qr-filename-container:focus,\ninput:focus,\ntextarea:focus,\ntextarea.field:focus {\n background: " + theme["Focused Input Background"] + ";\n border-color: " + theme["Focused Input Border"] + ";\n color: " + theme["Inputs"] + ";\n}\n.has-file #qr-filename-container:active #qr-extras-container,\n.has-file #qr-filename-container:focus #qr-extras-container {\n background: " + theme["Focused Input Background"] + ";\n}\n#ft,\n#mouseover,\n#post-preview,\n#qp .post,\n#threads > .thread,\n#xupdater,\n.box-outer,\n.reply.post {\n border-width: 1px;\n border-style: solid;\n border-color: " + theme["Reply Border"] + ";\n background: " + theme["Reply Background"] + ";\n}\n.exblock.reply,\n.reply.post.highlight,\n.reply.post:target {\n background: " + theme["Highlighted Reply Background"] + ";\n border: 1px solid " + theme["Highlighted Reply Border"] + ";\n}\n#header-bar,\n.pagelist {\n background: " + theme["Navigation Background"] + ";\n border-color: " + theme["Navigation Border"] + ";\n}\n#doc,\n#threads,\n.board > .thread {\n background: " + theme["Thread Wrapper Background"] + ";\n border: 1px solid " + theme["Thread Wrapper Border"] + ";\n}\n#boardNavDesktopFoot,\n#mascot_hide,\n#menu,\n#selectrice,\n#themeConf,\n#watcher,\n#watcher:hover,\n.announcements-slideout #globalMessage,\n.dialog,\n.post-form-style-float #qr,\n.post-form-decorations #qr,\n.submenu {\n background: " + theme["Dialog Background"] + ";\n border: 1px solid " + theme["Dialog Border"] + ";\n}\n#qp.dialog {\n border: none;\n}\n.watch-thread-link {\n background-image: url(\"data:image/svg+xml,\");\n} \n.deleteform::before,\n.deleteform,\n#qr .warning {\n background: " + theme["Input Background"] + ";\n border-color: " + theme["Input Border"] + ";\n}\n.disabledwarning,\n.warning {\n color: " + theme["Warnings"] + ";\n}\n#charCount {\n color: " + (Style.lightTheme ? "rgba(0,0,0,0.7)" : "rgba(255,255,255,0.7)") + ";\n}\n.postNum a {\n color: " + theme["Post Numbers"] + ";\n}\n.subject {\n color: " + theme["Subjects"] + " !important;\n}\n.dateTime,\n.post-ago {\n color: " + theme["Timestamps"] + " !important;\n}\n#fs_status a,\n#updater #update-status:not(.new)::after,\n#showQR,\n.abbr,\n.boxbar,\n.boxcontent,\n.deleteform::before,\n.pages strong,\n.pln,\n.reply,\n.reply.highlight,\n.summary,\nbody,\nbutton,\nspan[style=\"left: 5px; position: absolute;\"] a,\ninput,\ntextarea {\n color: " + theme["Text"] + ";\n}\n#exlinks-options-content > table,\n#appchanx-settings fieldset,\n#selectrice {\n border-bottom: 1px solid " + theme["Reply Border"] + ";\n box-shadow: inset " + theme["Shadow Color"] + " 0 0 5px;\n}\n.quote + .spoiler:hover,\n.quote {\n color: " + theme["Greentext"] + ";\n}\n.forwardlink {\n border-bottom: 1px dashed " + theme["Backlinks"] + ";\n}\n.container::before {\n color: " + theme["Timestamps"] + ";\n}\n.quote-shadows #menu,\n.quote-shadows #post-preview,\n.quote-shadows #qp .opContainer,\n.quote-shadows #qp .replyContainer,\n.quote-shadows .submenu {\n box-shadow: 5px 5px 5px " + theme['Shadow Color'] + ";\n}\n.rice {\n background: " + theme["Checkbox Background"] + ";\n border: 1px solid " + theme["Checkbox Border"] + ";\n}\n.selectrice::before {\n border-left: 1px solid " + theme["Input Border"] + ";\n}\n.selectrice::after {\n border-top: .45em solid " + theme["Inputs"] + ";\n}\n.bd {\n background: " + theme["Buttons Background"] + ";\n border: 1px solid " + theme["Buttons Border"] + ";\n}\n.pages a,\n#header-bar a {\n color: " + theme["Navigation Links"] + ";\n}\ninput[type=checkbox]:checked + .rice::after {\n border-color: " + theme["Inputs"] + ";\n}\n#addReply,\n#dump,\n.button,\n.entry,\n.replylink,\na {\n color: " + theme["Links"] + ";\n}\n.backlink {\n color: " + theme["Backlinks"] + ";\n}\n.qiQuote,\n.quotelink {\n color: " + theme["Quotelinks"] + ";\n}\n#addReply:hover,\n#dump:hover,\n.entry:hover,\n.replylink:hover,\n.qiQuote:hover,\n.quotelink:hover,\na .name:hover,\na .postertrip:hover,\na:hover {\n color: " + theme["Hovered Links"] + ";\n}\n#header-bar a:hover,\n#boardTitle a:hover {\n color: " + theme["Hovered Navigation Links"] + ";\n}\n#boardTitle {\n color: " + theme["Board Title"] + ";\n}\n.name,\n.post-author {\n color: " + theme["Names"] + " !important;\n}\n.post-tripcode,\n.postertrip,\n.trip {\n color: " + theme["Tripcodes"] + " !important;\n}\na .postertrip,\na .name {\n color: " + theme["Emails"] + ";\n}\n.post.reply.qphl,\n.post.op.qphl {\n border-color: " + theme["Backlinked Reply Outline"] + ";\n background: " + theme["Highlighted Reply Background"] + ";\n}\n.quote-shadows .inline .post {\n box-shadow: 5px 5px 5px " + theme['Shadow Color'] + ";\n}\n.placeholder,\n#qr input::placeholder,\n#qr textarea::placeholder {\n color: " + (Style.lightTheme ? "rgba(0,0,0,0.3)" : "rgba(255,255,255,0.2)") + " !important;\n}\n#qr input:placeholder,\n#qr textarea:placeholder,\n.placeholder {\n color: " + (Style.lightTheme ? "rgba(0,0,0,0.3)" : "rgba(255,255,255,0.2)") + " !important;\n}\n#appchanx-settings fieldset,\n.boxcontent dd,\n.selectrice ul {\n border-color: " + (Style.lightTheme ? "rgba(0,0,0,0.1)" : "rgba(255,255,255,0.1)") + ";\n}\n#appchanx-settings li,\n#selectrice li:not(:first-of-type) {\n border-top: 1px solid " + (Style.lightTheme ? "rgba(0,0,0,0.05)" : "rgba(255,255,255,0.025)") + ";\n}\n#navtopright .exlinksOptionsLink::after,\n#main-menu,\n.navLinks > a:first-of-type::after,\n#watcher::after,\n#globalMessage::after,\n#boardNavDesktopFoot::after,\n#img-controls,\n#catalog::after,\n#fappeTyme {\n " + (!Style.lightTheme ? "-webkit-filter: url(\"#icons-filter\");" : "") + "\n}\n.alternate-post-colors #threads > .thread:nth-of-type(2n+1),\n.alternate-post-colors .replyContainer:nth-of-type(2n+1) .post {\n background-image: linear-gradient(" + (replybg ? "rgba(" + (replybg.shiftRGB(-4, false)) + ",0.8), rgba(" + (replybg.shiftRGB(-4, false)) + ",0.8)" : Style.lightTheme ? "rgba(0,0,0,0.05), rgba(0,0,0,0.05)" : "rgba(255,255,255,0.02), rgba(255,255,255,0.02)") + ");\n}\n.color-reply-headings .boxbar,\n.color-reply-headings .postInfo {\n background: " + (replybg ? "rgba(" + (replybg.shiftRGB(-12, false)) + ",0.8)" : "rgba(0,0,0,0.1)") + ";\n border-bottom: 1px solid " + theme["Reply Border"] + "\n}\n.color-file-info .file {\n background: " + (replybg ? "rgba(" + (replybg.shiftRGB(-8, false)) + ",0.8)" : "rgba(0,0,0,0.1)") + ";\n border-bottom: 1px solid " + theme["Reply Border"] + "\n border-top: 1px solid " + theme["Reply Border"] + "\n}\n.color-reply.headings.color-file-info {\n border-top: none;\n}\n.op-background .op.post {\n background: " + theme["Reply Background"] + ";\n border: 1px solid " + theme["Reply Border"] + ";\n}\n.op-background .op.post:target\n.op-background .op.post.highlight {\n background: " + theme["Highlighted Reply Background"] + ";\n border: 1px solid " + theme["Highlighted Reply Border"] + ";\n}\n.fourchan-banner-at-sidebar-top.icon-orientation-vertical body::after {\n background: " + backgroundC + ";\n}\n.fourchan-banner-at-sidebar-top.icon-orientation-vertical.fourchan-ss-sidebar body::after,\n.fourchan-banner-at-sidebar-top.fourchan-ss-sidebar body::before {\n background: rgba(" + ((background = new Style.color(Style.colorToHex(theme["Reply Background"]))) ? background.shiftRGB(-18) : void 0) + ", 0.8);\n}\n.fourchan-ss-sidebar.sidebar-location-right body::before {\n border-left: 2px solid " + backgroundC + ";\n box-shadow:\n inset 1px 0 0 " + theme["Reply Border"] + ",\n -1px 0 0 " + theme["Reply Border"] + ";\n}\n.fourchan-ss-sidebar.sidebar-location-left body::before {\n border-right: 2px solid " + backgroundC + ";\n box-shadow:\n 1px 0 0 " + theme["Reply Border"] + ",\n inset -1px 0 0 " + theme["Reply Border"] + ";\n}\n.sage-highlighting-text.sage-highlight-position-before a.useremail[href*=\"sage\"]:last-of-type::before,\n.sage-highlighting-text.sage-highlight-position-before a.useremail[href*=\"Sage\"]:last-of-type::before,\n.sage-highlighting-text.sage-highlight-position-before a.useremail[href*=\"SAGE\"]:last-of-type::before,\n.sage-highlighting-text.sage-highlight-position-after a.useremail[href*=\"sage\"]:last-of-type::after,\n.sage-highlighting-text.sage-highlight-position-after a.useremail[href*=\"Sage\"]:last-of-type::after,\n.sage-highlighting-text.sage-highlight-position-after a.useremail[href*=\"SAGE\"]:last-of-type::after {\n content: \" (sage) \";\n color: " + theme["Sage"] + ";\n}\n.quote-shadows #qr {\n box-shadow: 5px 5px 5px " + theme['Shadow Color'] + ";\n}\n" + theme["Custom CSS"]) + (Style.lightTheme ? ".prettyprint {\n background-color: #e7e7e7;\n border: 1px solid #dcdcdc;\n}\n.com {\n color: #dd0000;\n}\n.str,\n.atv {\n color: #7fa61b;\n}\n.pun {\n color: #61663a;\n}\n.tag {\n color: #117743;\n}\n.kwd {\n color: #5a6F9e;\n}\n.typ,\n.atn {\n color: #9474bd;\n}\n.lit {\n color: #368c72;\n}" : ".prettyprint {\n background-color: rgba(0,0,0,.1);\n border: 1px solid rgba(0,0,0,0.5);\n}\n.tag {\n color: #96562c;\n}\n.pun {\n color: #5b6f2a;\n}\n.com {\n color: #a34443;\n}\n.str,\n.atv {\n color: #8ba446;\n}\n.kwd {\n color: #987d3e;\n}\n.typ,\n.atn {\n color: #897399;\n}\n.lit {\n color: #558773;\n}"); }, iconPositions: function() { diff --git a/src/General/Config.coffee b/src/General/Config.coffee index 1b2b90f63..acb4b766e 100644 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -235,10 +235,6 @@ Config = true 'Bookmark threads.' ] - 'Toggleable Thread Watcher': [ - false - 'Adds a shortcut for the thread watcher, hides the watcher by default, and makes it scroll with the page.' - ] 'Auto Watch': [ true 'Automatically watch threads you start.' @@ -648,6 +644,11 @@ Config = false 'Apply a filter to mascots to try to turn them into silhouettes.' ] + 'Silhouette Contrast': [ + '0' + 'A number to increase the contrast of silhouettes. Suggested values: 0, 8, 16 ...' + 'text' + ] Navigation: 'Navigation Alignment': [ diff --git a/src/Theming/Style.coffee b/src/Theming/Style.coffee index 20c33aa05..6841f62b9 100644 --- a/src/Theming/Style.coffee +++ b/src/Theming/Style.coffee @@ -171,12 +171,13 @@ Style = theme: (theme) -> bgColor = new Style.color(Style.colorToHex(backgroundC = theme["Background Color"]) or 'aaaaaa') replybg = new Style.color Style.colorToHex theme["Reply Background"] + replyRGB = "rgb(#{replybg.shiftRGB parseInt(Conf['Silhouette Contrast'], 10), true})" Style.lightTheme = bgColor.isLight() Style.svg.innerHTML = """ - + """