diff --git a/src/General/Main.coffee b/src/General/Main.coffee index d9229a889..da7e55432 100755 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -180,6 +180,12 @@ Main = Main.setClass() setClass: -> + if (spooky = $ 'link[rel="stylesheet"][href^="//s.4cdn.org/css/spooky."]', d.head) + spooky.removeAttribute 'media' + if getComputedStyle(d.body).color is 'rgb(196, 151, 86)' # not blocked + $.addClass doc, 'spooky' + return + if g.VIEW is 'catalog' $.addClass doc, $.id('base-css').href.match(/catalog_(\w+)/)[1].replace('_new', '').replace /_+/g, '-' return @@ -361,7 +367,7 @@ Main = $.ready -> cb() if Main.isThisPageLegit() - css: `<%= importCSS('font-awesome', 'style', 'yotsuba', 'yotsuba-b', 'futaba', 'burichan', 'tomorrow', 'photon') %>` + css: `<%= importCSS('font-awesome', 'style', 'yotsuba', 'yotsuba-b', 'futaba', 'burichan', 'tomorrow', 'photon', 'spooky') %>` cssWWW: `<%= importCSS('www') %>` diff --git a/src/General/css/spooky.css b/src/General/css/spooky.css new file mode 100755 index 000000000..94898e321 --- /dev/null +++ b/src/General/css/spooky.css @@ -0,0 +1,132 @@ +/* General */ +:root.spooky .dialog { + background-color: #171526; + border-color: #707070; +} +:root.spooky .field:focus, +:root.spooky .field.focus { + border-color: #98E; +} + +/* Header */ +:root.spooky #header-bar.dialog { + background-color: rgba(23,21,38,0.98); +} +:root.spooky:not(.fixed) #header-bar, :root.spooky #notifications { + font-size: 9pt; +} +:root.spooky #header-bar, :root.spooky #notifications { + color: #C49756; +} +:root.spooky #board-list a, :root.spooky #shortcuts a { + color: #FE9600; +} +:root.spooky.fixed #custom-board-list .current:hover { + border-bottom-color: rgba(255,0,0,0.2); +} + +/* Settings */ +:root.spooky #fourchanx-settings fieldset, :root.spooky .section-main div::before { + border-color: #707070; +} +:root.spooky .suboption-list > div:last-of-type { + background-color: #171526; +} + +/* Quote */ +:root.spooky .catalog-thread > .comment > span.quote, :root.spooky #arc-list span.quote { + color: #634C2C; +} +:root.spooky .backlink.deadlink { + color: #FE9600 !important; +} +:root.spooky .inline { + border-color: #707070; + background-color: rgba(255, 255, 255, .14); +} + +/* QR */ +.spooky #dump-list::-webkit-scrollbar-thumb { + background-color: #171526; + border-color: #707070; +} +:root.spooky .qr-preview { + background-color: rgba(0, 0, 0, .15); +} + +:root.spooky #qr .field { + background-color: rgb(26, 27, 29); + color: rgb(197,200,198); + border-color: rgb(40, 41, 42); +} +:root.spooky #qr .field:focus, +:root.spooky #qr .field.focus { + border-color: rgb(254, 150, 0) !important; + background-color: rgb(30,32,36); +} +:root.spooky .persona button { + background: linear-gradient(to bottom, #2E3035, #222427) no-repeat; + color: rgb(197,200,198); + border-color: rgb(40, 41, 42); + outline: none; +} +:root.spooky .persona button::-moz-focus-inner { + border: none; +} +:root.spooky .persona button:focus { + border-color: rgb(254, 150, 0); +} +:root.spooky #qr.sjis-preview #sjis-toggle, +:root.spooky #qr.tex-preview #tex-preview-button { + background: rgb(26, 27, 29); +} +:root.spooky #qr select, +:root.spooky #file-n-submit > input, +:root.spooky #qr-draw-button { + border-color: rgb(40, 41, 42); +} +:root.spooky #qr-filename { + color: rgb(197,200,198); +} + +:root.spooky .qr-link { + border-color: rgb(8, 6, 23) rgb(8, 6, 23) rgb(0, 0, 8); + background: linear-gradient(#262435, #171526) repeat scroll 0% 0% transparent; +} +:root.spooky .qr-link:hover { + background: #1A1829; +} + + +/* Menu */ +:root.spooky #menu { + color: #FE9600; +} +:root.spooky .entry { + font-size: 10pt; +} +:root.spooky .focused.entry { + background: rgba(255, 255, 255, .33); +} + +/* Unread */ +:root.spooky #unread-line { + border-color: rgb(197, 200, 198); +} + +/* Thread Watcher */ +:root.spooky .replies-quoting-you > a, :root.spooky #watcher-link.disabled.replies-quoting-you { + color: #F00 !important; +} + +/* Watcher Favicon */ +:root.spooky .watch-thread-link +{ + background-image: url("data:image/svg+xml,"); +} + +/* Board Title */ +:root.spooky div.boardTitle { + font-family: sans-serif !important; + text-shadow: 1px 1px 1px rgba(105,10,15,0.6); +} diff --git a/src/Posting/Captcha.v2.coffee b/src/Posting/Captcha.v2.coffee index 92929ba00..059f7080c 100644 --- a/src/Posting/Captcha.v2.coffee +++ b/src/Posting/Captcha.v2.coffee @@ -112,7 +112,7 @@ Captcha.v2 = var container = document.querySelector("#qr .captcha-container"); container.dataset.widgetID = window.grecaptcha.render(container, { sitekey: '<%= meta.recaptchaKey %>', - theme: document.documentElement.classList.contains('tomorrow') ? 'dark' : 'light', + theme: (document.documentElement.classList.contains('tomorrow') || document.documentElement.classList.contains('spooky')) ? 'dark' : 'light', callback: function(response) { window.dispatchEvent(new CustomEvent("captcha:success", {detail: response})); }