Merge branch 'next' into multisite
This commit is contained in:
commit
b24e9bd906
@ -4,6 +4,13 @@
|
||||
|
||||
## v1.13.0
|
||||
|
||||
**v1.13.0.20** *(2016-11-05)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.0.20/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.0.20/builds/4chan-X-noupdate.crx)]
|
||||
- Bugfix: Don't add embedding window to error pages.
|
||||
- Hide EXIF data in /p/ catalog except on hover.
|
||||
|
||||
**v1.13.0.19** *(2016-10-31)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.0.19/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.0.19/builds/4chan-X-noupdate.crx)]
|
||||
- Bring back CSS tweaks for Halloween theme.
|
||||
|
||||
**v1.13.0.18** *(2016-10-31)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.0.18/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.0.18/builds/4chan-X-noupdate.crx)]
|
||||
- Improve robustness against invalid settings data, including thread watcher timestamps from future.
|
||||
|
||||
|
||||
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name 4chan X beta
|
||||
// @version 1.13.0.18
|
||||
// @version 1.13.0.20
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name 4chan X beta
|
||||
// @version 1.13.0.18
|
||||
// @version 1.13.0.20
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
@ -147,7 +147,7 @@ docSet = function() {
|
||||
};
|
||||
|
||||
g = {
|
||||
VERSION: '1.13.0.18',
|
||||
VERSION: '1.13.0.20',
|
||||
NAMESPACE: '4chan X.',
|
||||
boards: {}
|
||||
};
|
||||
@ -2013,10 +2013,12 @@ div[data-checked=\"false\"] > .suboption-list {\n\
|
||||
.catalog-container:not(:hover) > * > .postInfo > :not(.subject),\n\
|
||||
.catalog-container:not(:hover) > * > .catalog-replies,\n\
|
||||
.catalog-container:not(:hover) .extra-linebreak,\n\
|
||||
.catalog-container:not(:hover) .abbr,\n\
|
||||
:root:not(.catalog-hover-expand) .catalog-container > * > .file,\n\
|
||||
:root:not(.catalog-hover-expand) .catalog-container > * > .postInfo > :not(.subject),\n\
|
||||
:root:not(.catalog-hover-expand) .catalog-container > * > .catalog-replies,\n\
|
||||
:root:not(.catalog-hover-expand) .catalog-container .extra-linebreak,\n\
|
||||
:root:not(.catalog-hover-expand) .catalog-container .abbr,\n\
|
||||
.catalog-thread > .catalog-container > :not(.catalog-post),\n\
|
||||
.catalog-post > .file > :not(.fileText),\n\
|
||||
.catalog-post > * > .fileText > :not(:first-child),\n\
|
||||
@ -2104,10 +2106,14 @@ div[data-checked=\"false\"] > .suboption-list {\n\
|
||||
.catalog-post .MathJax_Display {\n\
|
||||
text-align: center !important;\n\
|
||||
}\n\
|
||||
.catalog-container:not(:hover) .exif,\n\
|
||||
:root:not(.catalog-hover-expand) .catalog-container .exif {\n\
|
||||
display: none !important;\n\
|
||||
}\n\
|
||||
.catalog-post > * > .exif {\n\
|
||||
border-collapse: collapse;\n\
|
||||
}\n\
|
||||
.catalog-post > * > .exif[style*=\"display: block;\"] {\n\
|
||||
:root.catalog-hover-expand .catalog-container:hover .exif[style*=\"display: block;\"] {\n\
|
||||
display: inline-block !important;\n\
|
||||
}\n\
|
||||
.catalog-post > * > .exif,\n\
|
||||
@ -4017,6 +4023,156 @@ a:only-of-type > .remove {\n\
|
||||
{\n\
|
||||
background-image: url(\"data:image/svg+xml,<svg viewBox='0 0 26 26' preserveAspectRatio='true' xmlns='http://www.w3.org/2000/svg'><path fill='rgb(51,51,51)' d='M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z'/></svg>\");\n\
|
||||
}\n\
|
||||
/* General */\n\
|
||||
:root.spooky .dialog {\n\
|
||||
background-color: #171526;\n\
|
||||
border-color: #707070;\n\
|
||||
}\n\
|
||||
:root.spooky .field:focus,\n\
|
||||
:root.spooky .field.focus {\n\
|
||||
border-color: #98E;\n\
|
||||
}\n\
|
||||
/* Header */\n\
|
||||
:root.spooky #header-bar.dialog {\n\
|
||||
background-color: rgba(23,21,38,0.98);\n\
|
||||
}\n\
|
||||
:root.spooky:not(.fixed) #header-bar, :root.spooky #notifications {\n\
|
||||
font-size: 9pt;\n\
|
||||
}\n\
|
||||
:root.spooky #header-bar, :root.spooky #notifications {\n\
|
||||
color: #C49756;\n\
|
||||
}\n\
|
||||
:root.spooky #board-list a, :root.spooky #shortcuts a {\n\
|
||||
color: #FE9600;\n\
|
||||
}\n\
|
||||
:root.spooky.shortcut-icons .native-settings {\n\
|
||||
background-image: url('//s.4cdn.org/image/favicon-ws.ico');\n\
|
||||
}\n\
|
||||
/* Settings */\n\
|
||||
:root.spooky #fourchanx-settings fieldset, :root.spooky .section-main div::before {\n\
|
||||
border-color: #707070;\n\
|
||||
}\n\
|
||||
:root.spooky .suboption-list > div:last-of-type {\n\
|
||||
background-color: #171526;\n\
|
||||
}\n\
|
||||
/* Catalog */\n\
|
||||
:root.spooky.catalog-hover-expand .catalog-container:hover > .post {\n\
|
||||
background-color: #171526;\n\
|
||||
}\n\
|
||||
:root.spooky.werkTyme .catalog-thread:not(:hover),\n\
|
||||
:root.spooky.werkTyme:not(.catalog-hover-expand) .catalog-thread,\n\
|
||||
:root.spooky.catalog-hover-expand .catalog-container:hover > .post,\n\
|
||||
:root.spooky.catalog-hover-expand .catalog-container:hover .catalog-reply {\n\
|
||||
border-color: #707070;\n\
|
||||
}\n\
|
||||
/* Quote */\n\
|
||||
:root.spooky #arc-list span.quote {\n\
|
||||
color: #634C2C;\n\
|
||||
}\n\
|
||||
:root.spooky .backlink.deadlink {\n\
|
||||
color: #FE9600 !important;\n\
|
||||
}\n\
|
||||
:root.spooky .inline {\n\
|
||||
border-color: #707070;\n\
|
||||
background-color: rgba(255, 255, 255, .14);\n\
|
||||
}\n\
|
||||
/* Fappe and Werk Tyme */\n\
|
||||
:root.spooky .indicator {\n\
|
||||
color: #171526;\n\
|
||||
}\n\
|
||||
/* Highlighting */\n\
|
||||
:root.spooky .qphl {\n\
|
||||
outline: 2px solid rgba(145, 182, 214, .8);\n\
|
||||
}\n\
|
||||
:root.spooky.highlight-you .quotesYou.opContainer,\n\
|
||||
:root.spooky.highlight-you .quotesYou > .reply {\n\
|
||||
border-left: 3px solid rgba(145, 182, 214, .8);\n\
|
||||
}\n\
|
||||
:root.spooky.highlight-own .yourPost.opContainer,\n\
|
||||
:root.spooky.highlight-own .yourPost > .reply {\n\
|
||||
border-left: 3px dashed rgba(145, 182, 214, .8);\n\
|
||||
}\n\
|
||||
:root.spooky .opContainer.filter-highlight,\n\
|
||||
:root.spooky .filter-highlight > .reply {\n\
|
||||
box-shadow: inset 5px 0 rgba(145, 182, 214, .5);\n\
|
||||
}\n\
|
||||
:root.spooky.highlight-own .yourPost > div.sideArrows,\n\
|
||||
:root.spooky.highlight-you .quotesYou > div.sideArrows,\n\
|
||||
:root.spooky .filter-highlight > div.sideArrows {\n\
|
||||
color: rgb(155, 185, 210);\n\
|
||||
}\n\
|
||||
/* QR */\n\
|
||||
.spooky #dump-list::-webkit-scrollbar-thumb {\n\
|
||||
background-color: #171526;\n\
|
||||
border-color: #707070;\n\
|
||||
}\n\
|
||||
:root.spooky .qr-preview {\n\
|
||||
background-color: rgba(0, 0, 0, .15);\n\
|
||||
}\n\
|
||||
:root.spooky #qr .field {\n\
|
||||
background-color: rgb(26, 27, 29);\n\
|
||||
color: rgb(197,200,198);\n\
|
||||
border-color: rgb(40, 41, 42);\n\
|
||||
}\n\
|
||||
:root.spooky #qr .field:focus,\n\
|
||||
:root.spooky #qr .field.focus {\n\
|
||||
border-color: rgb(254, 150, 0) !important;\n\
|
||||
background-color: rgb(30,32,36);\n\
|
||||
}\n\
|
||||
:root.spooky .persona button {\n\
|
||||
background: linear-gradient(to bottom, #2E3035, #222427) no-repeat;\n\
|
||||
color: rgb(197,200,198);\n\
|
||||
border-color: rgb(40, 41, 42);\n\
|
||||
outline: none;\n\
|
||||
}\n\
|
||||
:root.spooky .persona button::-moz-focus-inner {\n\
|
||||
border: none;\n\
|
||||
}\n\
|
||||
:root.spooky .persona button:focus {\n\
|
||||
border-color: rgb(254, 150, 0);\n\
|
||||
}\n\
|
||||
:root.spooky #qr.sjis-preview #sjis-toggle,\n\
|
||||
:root.spooky #qr.tex-preview #tex-preview-button {\n\
|
||||
background: rgb(26, 27, 29);\n\
|
||||
}\n\
|
||||
:root.spooky #qr select,\n\
|
||||
:root.spooky #file-n-submit > input,\n\
|
||||
:root.spooky #qr-draw-button {\n\
|
||||
border-color: rgb(40, 41, 42);\n\
|
||||
}\n\
|
||||
:root.spooky #qr-filename {\n\
|
||||
color: rgb(197,200,198);\n\
|
||||
}\n\
|
||||
:root.spooky .qr-link {\n\
|
||||
border-color: rgb(8, 6, 23) rgb(8, 6, 23) rgb(0, 0, 8);\n\
|
||||
background: linear-gradient(#262435, #171526) repeat scroll 0% 0% transparent;\n\
|
||||
}\n\
|
||||
:root.spooky .qr-link:hover {\n\
|
||||
background: #1A1829;\n\
|
||||
}\n\
|
||||
/* Menu */\n\
|
||||
:root.spooky #menu {\n\
|
||||
color: #FE9600;\n\
|
||||
}\n\
|
||||
:root.spooky .entry {\n\
|
||||
font-size: 10pt;\n\
|
||||
}\n\
|
||||
:root.spooky .focused.entry {\n\
|
||||
background: rgba(255, 255, 255, .33);\n\
|
||||
}\n\
|
||||
/* Unread */\n\
|
||||
:root.spooky #unread-line {\n\
|
||||
border-color: rgb(197, 200, 198);\n\
|
||||
}\n\
|
||||
/* Thread Watcher */\n\
|
||||
:root.spooky .replies-quoting-you > a, :root.spooky #watcher-link.replies-quoting-you {\n\
|
||||
color: #F00 !important;\n\
|
||||
}\n\
|
||||
/* Watcher Favicon */\n\
|
||||
:root.spooky .watch-thread-link\n\
|
||||
{\n\
|
||||
background-image: url(\"data:image/svg+xml,<svg viewBox='0 0 26 26' preserveAspectRatio='true' xmlns='http://www.w3.org/2000/svg'><path fill='rgb(254,150,0)' d='M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z'/></svg>\");\n\
|
||||
}\n\
|
||||
/* Link Title Favicons */\n\
|
||||
.linkify.audio::before {\n\
|
||||
content: \"\";\n\
|
||||
@ -13760,6 +13916,9 @@ Embedding = (function() {
|
||||
}
|
||||
},
|
||||
ready: function() {
|
||||
if (!Main.isThisPageLegit()) {
|
||||
return;
|
||||
}
|
||||
$.addClass(Embedding.dialog, 'empty');
|
||||
$.on($('.close', Embedding.dialog), 'click', Embedding.closeFloat);
|
||||
$.on($('.move', Embedding.dialog), 'mousedown', Embedding.dragEmbed);
|
||||
@ -19799,7 +19958,7 @@ Captcha = {};
|
||||
container = document.querySelector('#qr .captcha-container');
|
||||
return container.dataset.widgetID = window.grecaptcha.render(container, {
|
||||
sitekey: '6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc',
|
||||
theme: classList.contains('tomorrow') || classList.contains('dark-captcha') ? 'dark' : 'light',
|
||||
theme: classList.contains('tomorrow') || classList.contains('spooky') || classList.contains('dark-captcha') ? 'dark' : 'light',
|
||||
callback: function(response) {
|
||||
return window.dispatchEvent(new CustomEvent('captcha:success', {
|
||||
detail: response
|
||||
@ -23326,7 +23485,14 @@ Main = (function() {
|
||||
return Main.setClass();
|
||||
},
|
||||
setClass: function() {
|
||||
var mainStyleSheet, setStyle, style, styleSheets;
|
||||
var mainStyleSheet, setStyle, spooky, style, styleSheets;
|
||||
if ((spooky = $('link[rel="stylesheet"][href^="//s.4cdn.org/css/spooky."]', d.head))) {
|
||||
spooky.removeAttribute('media');
|
||||
if (getComputedStyle(d.body).color === 'rgb(196, 151, 86)') {
|
||||
$.addClass(doc, 'spooky');
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (g.VIEW === 'catalog') {
|
||||
$.addClass(doc, $.id('base-css').href.match(/catalog_(\w+)/)[1].replace('_new', '').replace(/_+/g, '-'));
|
||||
return;
|
||||
|
||||
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.13.0.18
|
||||
// @version 1.13.0.20
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
@ -147,7 +147,7 @@ docSet = function() {
|
||||
};
|
||||
|
||||
g = {
|
||||
VERSION: '1.13.0.18',
|
||||
VERSION: '1.13.0.20',
|
||||
NAMESPACE: '4chan X.',
|
||||
boards: {}
|
||||
};
|
||||
@ -2013,10 +2013,12 @@ div[data-checked=\"false\"] > .suboption-list {\n\
|
||||
.catalog-container:not(:hover) > * > .postInfo > :not(.subject),\n\
|
||||
.catalog-container:not(:hover) > * > .catalog-replies,\n\
|
||||
.catalog-container:not(:hover) .extra-linebreak,\n\
|
||||
.catalog-container:not(:hover) .abbr,\n\
|
||||
:root:not(.catalog-hover-expand) .catalog-container > * > .file,\n\
|
||||
:root:not(.catalog-hover-expand) .catalog-container > * > .postInfo > :not(.subject),\n\
|
||||
:root:not(.catalog-hover-expand) .catalog-container > * > .catalog-replies,\n\
|
||||
:root:not(.catalog-hover-expand) .catalog-container .extra-linebreak,\n\
|
||||
:root:not(.catalog-hover-expand) .catalog-container .abbr,\n\
|
||||
.catalog-thread > .catalog-container > :not(.catalog-post),\n\
|
||||
.catalog-post > .file > :not(.fileText),\n\
|
||||
.catalog-post > * > .fileText > :not(:first-child),\n\
|
||||
@ -2104,10 +2106,14 @@ div[data-checked=\"false\"] > .suboption-list {\n\
|
||||
.catalog-post .MathJax_Display {\n\
|
||||
text-align: center !important;\n\
|
||||
}\n\
|
||||
.catalog-container:not(:hover) .exif,\n\
|
||||
:root:not(.catalog-hover-expand) .catalog-container .exif {\n\
|
||||
display: none !important;\n\
|
||||
}\n\
|
||||
.catalog-post > * > .exif {\n\
|
||||
border-collapse: collapse;\n\
|
||||
}\n\
|
||||
.catalog-post > * > .exif[style*=\"display: block;\"] {\n\
|
||||
:root.catalog-hover-expand .catalog-container:hover .exif[style*=\"display: block;\"] {\n\
|
||||
display: inline-block !important;\n\
|
||||
}\n\
|
||||
.catalog-post > * > .exif,\n\
|
||||
@ -4017,6 +4023,156 @@ a:only-of-type > .remove {\n\
|
||||
{\n\
|
||||
background-image: url(\"data:image/svg+xml,<svg viewBox='0 0 26 26' preserveAspectRatio='true' xmlns='http://www.w3.org/2000/svg'><path fill='rgb(51,51,51)' d='M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z'/></svg>\");\n\
|
||||
}\n\
|
||||
/* General */\n\
|
||||
:root.spooky .dialog {\n\
|
||||
background-color: #171526;\n\
|
||||
border-color: #707070;\n\
|
||||
}\n\
|
||||
:root.spooky .field:focus,\n\
|
||||
:root.spooky .field.focus {\n\
|
||||
border-color: #98E;\n\
|
||||
}\n\
|
||||
/* Header */\n\
|
||||
:root.spooky #header-bar.dialog {\n\
|
||||
background-color: rgba(23,21,38,0.98);\n\
|
||||
}\n\
|
||||
:root.spooky:not(.fixed) #header-bar, :root.spooky #notifications {\n\
|
||||
font-size: 9pt;\n\
|
||||
}\n\
|
||||
:root.spooky #header-bar, :root.spooky #notifications {\n\
|
||||
color: #C49756;\n\
|
||||
}\n\
|
||||
:root.spooky #board-list a, :root.spooky #shortcuts a {\n\
|
||||
color: #FE9600;\n\
|
||||
}\n\
|
||||
:root.spooky.shortcut-icons .native-settings {\n\
|
||||
background-image: url('//s.4cdn.org/image/favicon-ws.ico');\n\
|
||||
}\n\
|
||||
/* Settings */\n\
|
||||
:root.spooky #fourchanx-settings fieldset, :root.spooky .section-main div::before {\n\
|
||||
border-color: #707070;\n\
|
||||
}\n\
|
||||
:root.spooky .suboption-list > div:last-of-type {\n\
|
||||
background-color: #171526;\n\
|
||||
}\n\
|
||||
/* Catalog */\n\
|
||||
:root.spooky.catalog-hover-expand .catalog-container:hover > .post {\n\
|
||||
background-color: #171526;\n\
|
||||
}\n\
|
||||
:root.spooky.werkTyme .catalog-thread:not(:hover),\n\
|
||||
:root.spooky.werkTyme:not(.catalog-hover-expand) .catalog-thread,\n\
|
||||
:root.spooky.catalog-hover-expand .catalog-container:hover > .post,\n\
|
||||
:root.spooky.catalog-hover-expand .catalog-container:hover .catalog-reply {\n\
|
||||
border-color: #707070;\n\
|
||||
}\n\
|
||||
/* Quote */\n\
|
||||
:root.spooky #arc-list span.quote {\n\
|
||||
color: #634C2C;\n\
|
||||
}\n\
|
||||
:root.spooky .backlink.deadlink {\n\
|
||||
color: #FE9600 !important;\n\
|
||||
}\n\
|
||||
:root.spooky .inline {\n\
|
||||
border-color: #707070;\n\
|
||||
background-color: rgba(255, 255, 255, .14);\n\
|
||||
}\n\
|
||||
/* Fappe and Werk Tyme */\n\
|
||||
:root.spooky .indicator {\n\
|
||||
color: #171526;\n\
|
||||
}\n\
|
||||
/* Highlighting */\n\
|
||||
:root.spooky .qphl {\n\
|
||||
outline: 2px solid rgba(145, 182, 214, .8);\n\
|
||||
}\n\
|
||||
:root.spooky.highlight-you .quotesYou.opContainer,\n\
|
||||
:root.spooky.highlight-you .quotesYou > .reply {\n\
|
||||
border-left: 3px solid rgba(145, 182, 214, .8);\n\
|
||||
}\n\
|
||||
:root.spooky.highlight-own .yourPost.opContainer,\n\
|
||||
:root.spooky.highlight-own .yourPost > .reply {\n\
|
||||
border-left: 3px dashed rgba(145, 182, 214, .8);\n\
|
||||
}\n\
|
||||
:root.spooky .opContainer.filter-highlight,\n\
|
||||
:root.spooky .filter-highlight > .reply {\n\
|
||||
box-shadow: inset 5px 0 rgba(145, 182, 214, .5);\n\
|
||||
}\n\
|
||||
:root.spooky.highlight-own .yourPost > div.sideArrows,\n\
|
||||
:root.spooky.highlight-you .quotesYou > div.sideArrows,\n\
|
||||
:root.spooky .filter-highlight > div.sideArrows {\n\
|
||||
color: rgb(155, 185, 210);\n\
|
||||
}\n\
|
||||
/* QR */\n\
|
||||
.spooky #dump-list::-webkit-scrollbar-thumb {\n\
|
||||
background-color: #171526;\n\
|
||||
border-color: #707070;\n\
|
||||
}\n\
|
||||
:root.spooky .qr-preview {\n\
|
||||
background-color: rgba(0, 0, 0, .15);\n\
|
||||
}\n\
|
||||
:root.spooky #qr .field {\n\
|
||||
background-color: rgb(26, 27, 29);\n\
|
||||
color: rgb(197,200,198);\n\
|
||||
border-color: rgb(40, 41, 42);\n\
|
||||
}\n\
|
||||
:root.spooky #qr .field:focus,\n\
|
||||
:root.spooky #qr .field.focus {\n\
|
||||
border-color: rgb(254, 150, 0) !important;\n\
|
||||
background-color: rgb(30,32,36);\n\
|
||||
}\n\
|
||||
:root.spooky .persona button {\n\
|
||||
background: linear-gradient(to bottom, #2E3035, #222427) no-repeat;\n\
|
||||
color: rgb(197,200,198);\n\
|
||||
border-color: rgb(40, 41, 42);\n\
|
||||
outline: none;\n\
|
||||
}\n\
|
||||
:root.spooky .persona button::-moz-focus-inner {\n\
|
||||
border: none;\n\
|
||||
}\n\
|
||||
:root.spooky .persona button:focus {\n\
|
||||
border-color: rgb(254, 150, 0);\n\
|
||||
}\n\
|
||||
:root.spooky #qr.sjis-preview #sjis-toggle,\n\
|
||||
:root.spooky #qr.tex-preview #tex-preview-button {\n\
|
||||
background: rgb(26, 27, 29);\n\
|
||||
}\n\
|
||||
:root.spooky #qr select,\n\
|
||||
:root.spooky #file-n-submit > input,\n\
|
||||
:root.spooky #qr-draw-button {\n\
|
||||
border-color: rgb(40, 41, 42);\n\
|
||||
}\n\
|
||||
:root.spooky #qr-filename {\n\
|
||||
color: rgb(197,200,198);\n\
|
||||
}\n\
|
||||
:root.spooky .qr-link {\n\
|
||||
border-color: rgb(8, 6, 23) rgb(8, 6, 23) rgb(0, 0, 8);\n\
|
||||
background: linear-gradient(#262435, #171526) repeat scroll 0% 0% transparent;\n\
|
||||
}\n\
|
||||
:root.spooky .qr-link:hover {\n\
|
||||
background: #1A1829;\n\
|
||||
}\n\
|
||||
/* Menu */\n\
|
||||
:root.spooky #menu {\n\
|
||||
color: #FE9600;\n\
|
||||
}\n\
|
||||
:root.spooky .entry {\n\
|
||||
font-size: 10pt;\n\
|
||||
}\n\
|
||||
:root.spooky .focused.entry {\n\
|
||||
background: rgba(255, 255, 255, .33);\n\
|
||||
}\n\
|
||||
/* Unread */\n\
|
||||
:root.spooky #unread-line {\n\
|
||||
border-color: rgb(197, 200, 198);\n\
|
||||
}\n\
|
||||
/* Thread Watcher */\n\
|
||||
:root.spooky .replies-quoting-you > a, :root.spooky #watcher-link.replies-quoting-you {\n\
|
||||
color: #F00 !important;\n\
|
||||
}\n\
|
||||
/* Watcher Favicon */\n\
|
||||
:root.spooky .watch-thread-link\n\
|
||||
{\n\
|
||||
background-image: url(\"data:image/svg+xml,<svg viewBox='0 0 26 26' preserveAspectRatio='true' xmlns='http://www.w3.org/2000/svg'><path fill='rgb(254,150,0)' d='M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z'/></svg>\");\n\
|
||||
}\n\
|
||||
/* Link Title Favicons */\n\
|
||||
.linkify.audio::before {\n\
|
||||
content: \"\";\n\
|
||||
@ -13760,6 +13916,9 @@ Embedding = (function() {
|
||||
}
|
||||
},
|
||||
ready: function() {
|
||||
if (!Main.isThisPageLegit()) {
|
||||
return;
|
||||
}
|
||||
$.addClass(Embedding.dialog, 'empty');
|
||||
$.on($('.close', Embedding.dialog), 'click', Embedding.closeFloat);
|
||||
$.on($('.move', Embedding.dialog), 'mousedown', Embedding.dragEmbed);
|
||||
@ -19799,7 +19958,7 @@ Captcha = {};
|
||||
container = document.querySelector('#qr .captcha-container');
|
||||
return container.dataset.widgetID = window.grecaptcha.render(container, {
|
||||
sitekey: '6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc',
|
||||
theme: classList.contains('tomorrow') || classList.contains('dark-captcha') ? 'dark' : 'light',
|
||||
theme: classList.contains('tomorrow') || classList.contains('spooky') || classList.contains('dark-captcha') ? 'dark' : 'light',
|
||||
callback: function(response) {
|
||||
return window.dispatchEvent(new CustomEvent('captcha:success', {
|
||||
detail: response
|
||||
@ -23326,7 +23485,14 @@ Main = (function() {
|
||||
return Main.setClass();
|
||||
},
|
||||
setClass: function() {
|
||||
var mainStyleSheet, setStyle, style, styleSheets;
|
||||
var mainStyleSheet, setStyle, spooky, style, styleSheets;
|
||||
if ((spooky = $('link[rel="stylesheet"][href^="//s.4cdn.org/css/spooky."]', d.head))) {
|
||||
spooky.removeAttribute('media');
|
||||
if (getComputedStyle(d.body).color === 'rgb(196, 151, 86)') {
|
||||
$.addClass(doc, 'spooky');
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (g.VIEW === 'catalog') {
|
||||
$.addClass(doc, $.id('base-css').href.match(/catalog_(\w+)/)[1].replace('_new', '').replace(/_+/g, '-'));
|
||||
return;
|
||||
|
||||
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.13.0.18
|
||||
// @version 1.13.0.20
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.13.0.18
|
||||
// @version 1.13.0.20
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
@ -147,7 +147,7 @@ docSet = function() {
|
||||
};
|
||||
|
||||
g = {
|
||||
VERSION: '1.13.0.18',
|
||||
VERSION: '1.13.0.20',
|
||||
NAMESPACE: '4chan X.',
|
||||
boards: {}
|
||||
};
|
||||
@ -2013,10 +2013,12 @@ div[data-checked=\"false\"] > .suboption-list {\n\
|
||||
.catalog-container:not(:hover) > * > .postInfo > :not(.subject),\n\
|
||||
.catalog-container:not(:hover) > * > .catalog-replies,\n\
|
||||
.catalog-container:not(:hover) .extra-linebreak,\n\
|
||||
.catalog-container:not(:hover) .abbr,\n\
|
||||
:root:not(.catalog-hover-expand) .catalog-container > * > .file,\n\
|
||||
:root:not(.catalog-hover-expand) .catalog-container > * > .postInfo > :not(.subject),\n\
|
||||
:root:not(.catalog-hover-expand) .catalog-container > * > .catalog-replies,\n\
|
||||
:root:not(.catalog-hover-expand) .catalog-container .extra-linebreak,\n\
|
||||
:root:not(.catalog-hover-expand) .catalog-container .abbr,\n\
|
||||
.catalog-thread > .catalog-container > :not(.catalog-post),\n\
|
||||
.catalog-post > .file > :not(.fileText),\n\
|
||||
.catalog-post > * > .fileText > :not(:first-child),\n\
|
||||
@ -2104,10 +2106,14 @@ div[data-checked=\"false\"] > .suboption-list {\n\
|
||||
.catalog-post .MathJax_Display {\n\
|
||||
text-align: center !important;\n\
|
||||
}\n\
|
||||
.catalog-container:not(:hover) .exif,\n\
|
||||
:root:not(.catalog-hover-expand) .catalog-container .exif {\n\
|
||||
display: none !important;\n\
|
||||
}\n\
|
||||
.catalog-post > * > .exif {\n\
|
||||
border-collapse: collapse;\n\
|
||||
}\n\
|
||||
.catalog-post > * > .exif[style*=\"display: block;\"] {\n\
|
||||
:root.catalog-hover-expand .catalog-container:hover .exif[style*=\"display: block;\"] {\n\
|
||||
display: inline-block !important;\n\
|
||||
}\n\
|
||||
.catalog-post > * > .exif,\n\
|
||||
@ -4017,6 +4023,156 @@ a:only-of-type > .remove {\n\
|
||||
{\n\
|
||||
background-image: url(\"data:image/svg+xml,<svg viewBox='0 0 26 26' preserveAspectRatio='true' xmlns='http://www.w3.org/2000/svg'><path fill='rgb(51,51,51)' d='M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z'/></svg>\");\n\
|
||||
}\n\
|
||||
/* General */\n\
|
||||
:root.spooky .dialog {\n\
|
||||
background-color: #171526;\n\
|
||||
border-color: #707070;\n\
|
||||
}\n\
|
||||
:root.spooky .field:focus,\n\
|
||||
:root.spooky .field.focus {\n\
|
||||
border-color: #98E;\n\
|
||||
}\n\
|
||||
/* Header */\n\
|
||||
:root.spooky #header-bar.dialog {\n\
|
||||
background-color: rgba(23,21,38,0.98);\n\
|
||||
}\n\
|
||||
:root.spooky:not(.fixed) #header-bar, :root.spooky #notifications {\n\
|
||||
font-size: 9pt;\n\
|
||||
}\n\
|
||||
:root.spooky #header-bar, :root.spooky #notifications {\n\
|
||||
color: #C49756;\n\
|
||||
}\n\
|
||||
:root.spooky #board-list a, :root.spooky #shortcuts a {\n\
|
||||
color: #FE9600;\n\
|
||||
}\n\
|
||||
:root.spooky.shortcut-icons .native-settings {\n\
|
||||
background-image: url('//s.4cdn.org/image/favicon-ws.ico');\n\
|
||||
}\n\
|
||||
/* Settings */\n\
|
||||
:root.spooky #fourchanx-settings fieldset, :root.spooky .section-main div::before {\n\
|
||||
border-color: #707070;\n\
|
||||
}\n\
|
||||
:root.spooky .suboption-list > div:last-of-type {\n\
|
||||
background-color: #171526;\n\
|
||||
}\n\
|
||||
/* Catalog */\n\
|
||||
:root.spooky.catalog-hover-expand .catalog-container:hover > .post {\n\
|
||||
background-color: #171526;\n\
|
||||
}\n\
|
||||
:root.spooky.werkTyme .catalog-thread:not(:hover),\n\
|
||||
:root.spooky.werkTyme:not(.catalog-hover-expand) .catalog-thread,\n\
|
||||
:root.spooky.catalog-hover-expand .catalog-container:hover > .post,\n\
|
||||
:root.spooky.catalog-hover-expand .catalog-container:hover .catalog-reply {\n\
|
||||
border-color: #707070;\n\
|
||||
}\n\
|
||||
/* Quote */\n\
|
||||
:root.spooky #arc-list span.quote {\n\
|
||||
color: #634C2C;\n\
|
||||
}\n\
|
||||
:root.spooky .backlink.deadlink {\n\
|
||||
color: #FE9600 !important;\n\
|
||||
}\n\
|
||||
:root.spooky .inline {\n\
|
||||
border-color: #707070;\n\
|
||||
background-color: rgba(255, 255, 255, .14);\n\
|
||||
}\n\
|
||||
/* Fappe and Werk Tyme */\n\
|
||||
:root.spooky .indicator {\n\
|
||||
color: #171526;\n\
|
||||
}\n\
|
||||
/* Highlighting */\n\
|
||||
:root.spooky .qphl {\n\
|
||||
outline: 2px solid rgba(145, 182, 214, .8);\n\
|
||||
}\n\
|
||||
:root.spooky.highlight-you .quotesYou.opContainer,\n\
|
||||
:root.spooky.highlight-you .quotesYou > .reply {\n\
|
||||
border-left: 3px solid rgba(145, 182, 214, .8);\n\
|
||||
}\n\
|
||||
:root.spooky.highlight-own .yourPost.opContainer,\n\
|
||||
:root.spooky.highlight-own .yourPost > .reply {\n\
|
||||
border-left: 3px dashed rgba(145, 182, 214, .8);\n\
|
||||
}\n\
|
||||
:root.spooky .opContainer.filter-highlight,\n\
|
||||
:root.spooky .filter-highlight > .reply {\n\
|
||||
box-shadow: inset 5px 0 rgba(145, 182, 214, .5);\n\
|
||||
}\n\
|
||||
:root.spooky.highlight-own .yourPost > div.sideArrows,\n\
|
||||
:root.spooky.highlight-you .quotesYou > div.sideArrows,\n\
|
||||
:root.spooky .filter-highlight > div.sideArrows {\n\
|
||||
color: rgb(155, 185, 210);\n\
|
||||
}\n\
|
||||
/* QR */\n\
|
||||
.spooky #dump-list::-webkit-scrollbar-thumb {\n\
|
||||
background-color: #171526;\n\
|
||||
border-color: #707070;\n\
|
||||
}\n\
|
||||
:root.spooky .qr-preview {\n\
|
||||
background-color: rgba(0, 0, 0, .15);\n\
|
||||
}\n\
|
||||
:root.spooky #qr .field {\n\
|
||||
background-color: rgb(26, 27, 29);\n\
|
||||
color: rgb(197,200,198);\n\
|
||||
border-color: rgb(40, 41, 42);\n\
|
||||
}\n\
|
||||
:root.spooky #qr .field:focus,\n\
|
||||
:root.spooky #qr .field.focus {\n\
|
||||
border-color: rgb(254, 150, 0) !important;\n\
|
||||
background-color: rgb(30,32,36);\n\
|
||||
}\n\
|
||||
:root.spooky .persona button {\n\
|
||||
background: linear-gradient(to bottom, #2E3035, #222427) no-repeat;\n\
|
||||
color: rgb(197,200,198);\n\
|
||||
border-color: rgb(40, 41, 42);\n\
|
||||
outline: none;\n\
|
||||
}\n\
|
||||
:root.spooky .persona button::-moz-focus-inner {\n\
|
||||
border: none;\n\
|
||||
}\n\
|
||||
:root.spooky .persona button:focus {\n\
|
||||
border-color: rgb(254, 150, 0);\n\
|
||||
}\n\
|
||||
:root.spooky #qr.sjis-preview #sjis-toggle,\n\
|
||||
:root.spooky #qr.tex-preview #tex-preview-button {\n\
|
||||
background: rgb(26, 27, 29);\n\
|
||||
}\n\
|
||||
:root.spooky #qr select,\n\
|
||||
:root.spooky #file-n-submit > input,\n\
|
||||
:root.spooky #qr-draw-button {\n\
|
||||
border-color: rgb(40, 41, 42);\n\
|
||||
}\n\
|
||||
:root.spooky #qr-filename {\n\
|
||||
color: rgb(197,200,198);\n\
|
||||
}\n\
|
||||
:root.spooky .qr-link {\n\
|
||||
border-color: rgb(8, 6, 23) rgb(8, 6, 23) rgb(0, 0, 8);\n\
|
||||
background: linear-gradient(#262435, #171526) repeat scroll 0% 0% transparent;\n\
|
||||
}\n\
|
||||
:root.spooky .qr-link:hover {\n\
|
||||
background: #1A1829;\n\
|
||||
}\n\
|
||||
/* Menu */\n\
|
||||
:root.spooky #menu {\n\
|
||||
color: #FE9600;\n\
|
||||
}\n\
|
||||
:root.spooky .entry {\n\
|
||||
font-size: 10pt;\n\
|
||||
}\n\
|
||||
:root.spooky .focused.entry {\n\
|
||||
background: rgba(255, 255, 255, .33);\n\
|
||||
}\n\
|
||||
/* Unread */\n\
|
||||
:root.spooky #unread-line {\n\
|
||||
border-color: rgb(197, 200, 198);\n\
|
||||
}\n\
|
||||
/* Thread Watcher */\n\
|
||||
:root.spooky .replies-quoting-you > a, :root.spooky #watcher-link.replies-quoting-you {\n\
|
||||
color: #F00 !important;\n\
|
||||
}\n\
|
||||
/* Watcher Favicon */\n\
|
||||
:root.spooky .watch-thread-link\n\
|
||||
{\n\
|
||||
background-image: url(\"data:image/svg+xml,<svg viewBox='0 0 26 26' preserveAspectRatio='true' xmlns='http://www.w3.org/2000/svg'><path fill='rgb(254,150,0)' d='M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z'/></svg>\");\n\
|
||||
}\n\
|
||||
/* Link Title Favicons */\n\
|
||||
.linkify.audio::before {\n\
|
||||
content: \"\";\n\
|
||||
@ -13760,6 +13916,9 @@ Embedding = (function() {
|
||||
}
|
||||
},
|
||||
ready: function() {
|
||||
if (!Main.isThisPageLegit()) {
|
||||
return;
|
||||
}
|
||||
$.addClass(Embedding.dialog, 'empty');
|
||||
$.on($('.close', Embedding.dialog), 'click', Embedding.closeFloat);
|
||||
$.on($('.move', Embedding.dialog), 'mousedown', Embedding.dragEmbed);
|
||||
@ -19799,7 +19958,7 @@ Captcha = {};
|
||||
container = document.querySelector('#qr .captcha-container');
|
||||
return container.dataset.widgetID = window.grecaptcha.render(container, {
|
||||
sitekey: '6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc',
|
||||
theme: classList.contains('tomorrow') || classList.contains('dark-captcha') ? 'dark' : 'light',
|
||||
theme: classList.contains('tomorrow') || classList.contains('spooky') || classList.contains('dark-captcha') ? 'dark' : 'light',
|
||||
callback: function(response) {
|
||||
return window.dispatchEvent(new CustomEvent('captcha:success', {
|
||||
detail: response
|
||||
@ -23326,7 +23485,14 @@ Main = (function() {
|
||||
return Main.setClass();
|
||||
},
|
||||
setClass: function() {
|
||||
var mainStyleSheet, setStyle, style, styleSheets;
|
||||
var mainStyleSheet, setStyle, spooky, style, styleSheets;
|
||||
if ((spooky = $('link[rel="stylesheet"][href^="//s.4cdn.org/css/spooky."]', d.head))) {
|
||||
spooky.removeAttribute('media');
|
||||
if (getComputedStyle(d.body).color === 'rgb(196, 151, 86)') {
|
||||
$.addClass(doc, 'spooky');
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (g.VIEW === 'catalog') {
|
||||
$.addClass(doc, $.id('base-css').href.match(/catalog_(\w+)/)[1].replace('_new', '').replace(/_+/g, '-'));
|
||||
return;
|
||||
|
||||
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X-beta.crx' version='1.13.0.18' />
|
||||
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X-beta.crx' version='1.13.0.20' />
|
||||
</app>
|
||||
</gupdate>
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X.crx' version='1.13.0.18' />
|
||||
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X.crx' version='1.13.0.20' />
|
||||
</app>
|
||||
</gupdate>
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ Build =
|
||||
url: if boardID is 'f'
|
||||
"#{location.protocol}//i.4cdn.org/#{boardID}/#{encodeURIComponent data.filename}#{data.ext}"
|
||||
else
|
||||
"#{location.protocol}//i.4cdn.org/#{boardID}/#{data.tim}#{data.ext}"
|
||||
"#{location.protocol}//#{if data.no % 3 then 'i.4cdn.org' else 'is.4chan.org'}/#{boardID}/#{data.tim}#{data.ext}"
|
||||
height: data.h
|
||||
width: data.w
|
||||
MD5: data.md5
|
||||
@ -76,6 +76,7 @@ Build =
|
||||
twidth: data.tn_w
|
||||
isSpoiler: !!data.spoiler
|
||||
tag: data.tag
|
||||
hasDownscale: !!data.m_img
|
||||
o.file.dimensions = "#{o.file.width}x#{o.file.height}" unless /\.pdf$/.test o.file.url
|
||||
o
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</a>
|
||||
(${file.size}, ${file.dimensions || "PDF"})
|
||||
</div>
|
||||
<a class="fileThumb?{file.isSpoiler}{ imgspoiler}{}" href="${fileURL}" target="_blank">
|
||||
<a class="fileThumb?{file.isSpoiler}{ imgspoiler}{}" href="${fileURL}" target="_blank"?{file.hasDownscale}{ data-m}>
|
||||
<img
|
||||
src="${fileThumb}"
|
||||
alt="${file.size}"
|
||||
|
||||
@ -194,7 +194,7 @@ Gallery =
|
||||
error: ->
|
||||
if @error?.code is MediaError.MEDIA_ERR_DECODE
|
||||
return new Notice 'error', 'Corrupt or unplayable video', 30
|
||||
return unless @src.split('/')[2] is 'i.4cdn.org'
|
||||
return if ImageCommon.isFromArchive @
|
||||
ImageCommon.error @, g.posts[@dataset.post], null, (url) =>
|
||||
return unless url
|
||||
Gallery.images[@dataset.id].href = url
|
||||
|
||||
@ -33,6 +33,9 @@ ImageCommon =
|
||||
message.textContent = 'Error: Corrupt or unplayable video'
|
||||
return true
|
||||
|
||||
isFromArchive: (file) ->
|
||||
file.src.split('/')[2] not in ['i.4cdn.org', 'is.4chan.org']
|
||||
|
||||
error: (file, post, delay, cb) ->
|
||||
src = post.file.url.split '/'
|
||||
URL = Redirect.to 'file', {
|
||||
@ -42,12 +45,12 @@ ImageCommon =
|
||||
unless Conf['404 Redirect'] and URL and Redirect.securityCheck URL
|
||||
URL = null
|
||||
|
||||
return cb URL if (post.isDead or post.file.isDead) and file.src.split('/')[2] is 'i.4cdn.org'
|
||||
return cb URL if (post.isDead or post.file.isDead) and not ImageCommon.isFromArchive file
|
||||
|
||||
timeoutID = setTimeout (-> cb URL), delay if delay?
|
||||
return if post.isDead or post.file.isDead
|
||||
redirect = ->
|
||||
if file.src.split('/')[2] is 'i.4cdn.org'
|
||||
unless ImageCommon.isFromArchive file
|
||||
clearTimeout timeoutID if delay?
|
||||
cb URL
|
||||
|
||||
|
||||
@ -268,7 +268,7 @@ ImageExpand =
|
||||
if ImageCommon.decodeError @, post
|
||||
return ImageExpand.contract post
|
||||
# Don't autoretry images from the archive.
|
||||
unless @src.split('/')[2] is 'i.4cdn.org'
|
||||
if ImageCommon.isFromArchive @
|
||||
return ImageExpand.contract post
|
||||
ImageCommon.error @, post, 10 * $.SECOND, (URL) ->
|
||||
if post.file.isExpanding or post.file.isExpanded
|
||||
|
||||
12
src/Images/ImageHost.coffee
Normal file
12
src/Images/ImageHost.coffee
Normal file
@ -0,0 +1,12 @@
|
||||
ImageHost =
|
||||
init: ->
|
||||
return unless Conf['Use Faster Image Host'] and g.VIEW in ['index', 'thread']
|
||||
Callbacks.Post.push
|
||||
name: 'Image Host Rewriting'
|
||||
cb: @node
|
||||
|
||||
node: ->
|
||||
return unless @file and not @isClone and (m = @file.url.match /^https?:\/\/is\.4chan\.org\/(.*)$/)
|
||||
@file.link.hostname = 'i.4cdn.org'
|
||||
@file.thumbLink.hostname = 'i.4cdn.org' if @file.thumbLink
|
||||
@file.url = @file.link.href
|
||||
@ -65,6 +65,7 @@ Embedding =
|
||||
$.on d, 'PostsInserted', autoEmbed
|
||||
|
||||
ready: ->
|
||||
return if !Main.isThisPageLegit()
|
||||
$.addClass Embedding.dialog, 'empty'
|
||||
$.on $('.close', Embedding.dialog), 'click', Embedding.closeFloat
|
||||
$.on $('.move', Embedding.dialog), 'mousedown', Embedding.dragEmbed
|
||||
|
||||
@ -109,7 +109,7 @@ Captcha.v2 =
|
||||
container = document.querySelector '#qr .captcha-container'
|
||||
container.dataset.widgetID = window.grecaptcha.render container,
|
||||
sitekey: '<%= meta.recaptchaKey %>'
|
||||
theme: if classList.contains('tomorrow') or classList.contains('dark-captcha') then 'dark' else 'light'
|
||||
theme: if classList.contains('tomorrow') or classList.contains('spooky') or classList.contains('dark-captcha') then 'dark' else 'light'
|
||||
callback: (response) ->
|
||||
window.dispatchEvent new CustomEvent('captcha:success', {detail: response})
|
||||
if window.grecaptcha
|
||||
|
||||
@ -175,7 +175,10 @@ class Fetcher
|
||||
o.file =
|
||||
name: data.media.media_filename
|
||||
url: data.media.media_link or data.media.remote_media_link or
|
||||
"#{location.protocol}//i.4cdn.org/#{@boardID}/#{encodeURIComponent data.media[if @boardID is 'f' then 'media_filename' else 'media_orig']}"
|
||||
if @boardID is 'f'
|
||||
"#{location.protocol}//i.4cdn.org/#{@boardID}/#{encodeURIComponent data.media.media_filename}"
|
||||
else
|
||||
"#{location.protocol}//#{if data.no % 3 then 'i.4cdn.org' else 'is.4chan.org'}/#{@boardID}/#{encodeURIComponent data.media.media_orig}"
|
||||
height: data.media.media_h
|
||||
width: data.media.media_w
|
||||
MD5: data.media.media_hash
|
||||
|
||||
@ -184,6 +184,10 @@ Config =
|
||||
]
|
||||
|
||||
'Images and Videos':
|
||||
'Use Faster Image Host': [
|
||||
true
|
||||
'Change is.4chan.org links to point to the faster i.4cdn.org host.'
|
||||
]
|
||||
'Image Expansion': [
|
||||
true
|
||||
'Expand images / videos.'
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
var inc = require['style'];
|
||||
var faCSS = read('/node_modules/font-awesome/css/font-awesome.css');
|
||||
var faWebFont = readBase64('/node_modules/font-awesome/fonts/fontawesome-webfont.woff');
|
||||
var mainCSS = ['font-awesome', 'style', 'yotsuba', 'yotsuba-b', 'futaba', 'burichan', 'tomorrow', 'photon'].map(x => read(`${x}.css`)).join('');
|
||||
var mainCSS = ['font-awesome', 'style', 'yotsuba', 'yotsuba-b', 'futaba', 'burichan', 'tomorrow', 'photon', 'spooky'].map(x => read(`${x}.css`)).join('');
|
||||
var iconNames = files.filter(f => /^linkify\.[^.]+\.png$/.test(f));
|
||||
var icons = iconNames.map(readBase64);
|
||||
%>CSS = {
|
||||
|
||||
163
src/css/spooky.css
Normal file
163
src/css/spooky.css
Normal file
@ -0,0 +1,163 @@
|
||||
/* 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.shortcut-icons .native-settings {
|
||||
background-image: url('//s.4cdn.org/image/favicon-ws.ico');
|
||||
}
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/* Catalog */
|
||||
:root.spooky.catalog-hover-expand .catalog-container:hover > .post {
|
||||
background-color: #171526;
|
||||
}
|
||||
:root.spooky.werkTyme .catalog-thread:not(:hover),
|
||||
:root.spooky.werkTyme:not(.catalog-hover-expand) .catalog-thread,
|
||||
:root.spooky.catalog-hover-expand .catalog-container:hover > .post,
|
||||
:root.spooky.catalog-hover-expand .catalog-container:hover .catalog-reply {
|
||||
border-color: #707070;
|
||||
}
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
/* Fappe and Werk Tyme */
|
||||
:root.spooky .indicator {
|
||||
color: #171526;
|
||||
}
|
||||
|
||||
/* Highlighting */
|
||||
:root.spooky .qphl {
|
||||
outline: 2px solid rgba(145, 182, 214, .8);
|
||||
}
|
||||
:root.spooky.highlight-you .quotesYou.opContainer,
|
||||
:root.spooky.highlight-you .quotesYou > .reply {
|
||||
border-left: 3px solid rgba(145, 182, 214, .8);
|
||||
}
|
||||
:root.spooky.highlight-own .yourPost.opContainer,
|
||||
:root.spooky.highlight-own .yourPost > .reply {
|
||||
border-left: 3px dashed rgba(145, 182, 214, .8);
|
||||
}
|
||||
:root.spooky .opContainer.filter-highlight,
|
||||
:root.spooky .filter-highlight > .reply {
|
||||
box-shadow: inset 5px 0 rgba(145, 182, 214, .5);
|
||||
}
|
||||
:root.spooky.highlight-own .yourPost > div.sideArrows,
|
||||
:root.spooky.highlight-you .quotesYou > div.sideArrows,
|
||||
:root.spooky .filter-highlight > div.sideArrows {
|
||||
color: rgb(155, 185, 210);
|
||||
}
|
||||
|
||||
/* 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.replies-quoting-you {
|
||||
color: #F00 !important;
|
||||
}
|
||||
|
||||
/* Watcher Favicon */
|
||||
:root.spooky .watch-thread-link
|
||||
{
|
||||
background-image: url("data:image/svg+xml,<svg viewBox='0 0 26 26' preserveAspectRatio='true' xmlns='http://www.w3.org/2000/svg'><path fill='rgb(254,150,0)' d='M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z'/></svg>");
|
||||
}
|
||||
@ -831,10 +831,12 @@ div[data-checked="false"] > .suboption-list {
|
||||
.catalog-container:not(:hover) > * > .postInfo > :not(.subject),
|
||||
.catalog-container:not(:hover) > * > .catalog-replies,
|
||||
.catalog-container:not(:hover) .extra-linebreak,
|
||||
.catalog-container:not(:hover) .abbr,
|
||||
:root:not(.catalog-hover-expand) .catalog-container > * > .file,
|
||||
:root:not(.catalog-hover-expand) .catalog-container > * > .postInfo > :not(.subject),
|
||||
:root:not(.catalog-hover-expand) .catalog-container > * > .catalog-replies,
|
||||
:root:not(.catalog-hover-expand) .catalog-container .extra-linebreak,
|
||||
:root:not(.catalog-hover-expand) .catalog-container .abbr,
|
||||
.catalog-thread > .catalog-container > :not(.catalog-post),
|
||||
.catalog-post > .file > :not(.fileText),
|
||||
.catalog-post > * > .fileText > :not(:first-child),
|
||||
@ -922,10 +924,14 @@ div[data-checked="false"] > .suboption-list {
|
||||
.catalog-post .MathJax_Display {
|
||||
text-align: center !important;
|
||||
}
|
||||
.catalog-container:not(:hover) .exif,
|
||||
:root:not(.catalog-hover-expand) .catalog-container .exif {
|
||||
display: none !important;
|
||||
}
|
||||
.catalog-post > * > .exif {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.catalog-post > * > .exif[style*="display: block;"] {
|
||||
:root.catalog-hover-expand .catalog-container:hover .exif[style*="display: block;"] {
|
||||
display: inline-block !important;
|
||||
}
|
||||
.catalog-post > * > .exif,
|
||||
|
||||
@ -133,7 +133,7 @@ Main =
|
||||
PostSuccessful.init()
|
||||
return
|
||||
when 'i.4cdn.org', 'is.4chan.org'
|
||||
return unless pathname[2] and not /s\.jpg$/.test(pathname[2])
|
||||
return unless pathname[2] and not /[sm]\.jpg$/.test(pathname[2])
|
||||
$.asap (-> d.readyState isnt 'loading'), ->
|
||||
if Conf['404 Redirect'] and d.title in ['4chan - Temporarily Offline', '4chan - 404 Not Found']
|
||||
Redirect.navigate 'file', {
|
||||
@ -208,6 +208,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
|
||||
@ -416,6 +422,7 @@ Main =
|
||||
['Board Configuration', BoardConfig]
|
||||
['Normalize URL', NormalizeURL]
|
||||
['Captcha Configuration', Captcha.replace]
|
||||
['Image Host Rewriting', ImageHost]
|
||||
['Redirect', Redirect]
|
||||
['Header', Header]
|
||||
['Catalog Links', CatalogLinks]
|
||||
|
||||
@ -78,16 +78,12 @@ SW.yotsuba =
|
||||
parseFile: (post, file) ->
|
||||
{text, link, thumb} = file
|
||||
return false if not (info = link.nextSibling?.textContent.match /\(([\d.]+ [KMG]?B).*\)/)
|
||||
# XXX full images on https://is.4chan.org don't load
|
||||
link.hostname = 'i.4cdn.org' if link.hostname is 'is.4chan.org'
|
||||
$.extend file,
|
||||
name: text.title or link.title or link.textContent
|
||||
size: info[1]
|
||||
dimensions: info[0].match(/\d+x\d+/)?[0]
|
||||
tag: info[0].match(/,[^,]*, ([a-z]+)\)/i)?[1]
|
||||
if thumb
|
||||
# XXX full images on https://is.4chan.org don't load
|
||||
thumb.parentNode.hostname = 'i.4cdn.org' if thumb.parentNode.hostname is 'is.4chan.org'
|
||||
$.extend file,
|
||||
thumbURL: if (m = link.href.match /\d+(?=\.\w+$)/) then "#{location.protocol}//i.4cdn.org/#{post.board}/#{m[0]}s.jpg"
|
||||
MD5: thumb.dataset.md5
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"version": "1.13.0.18",
|
||||
"date": "2016-10-31T02:53:57.311Z"
|
||||
"version": "1.13.0.20",
|
||||
"date": "2016-11-05T00:00:58.595Z"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user