Tag:
%gLiteral %: %%
"
});
ref = $$('.warning', section);
for (j = 0, len = ref.length; j < len; j++) {
@@ -14274,7 +14317,7 @@ Linkify = (function() {
if (!Linkify.regString.test(this.info.comment)) {
return;
}
- ref = $$('a[href^="http://i.4cdn.org/"], a[href^="https://i.4cdn.org/"]', this.nodes.comment);
+ ref = $$('a[href^="http://i.4cdn.org/"], a[href^="https://i.4cdn.org/"], a[href^="http://is.4chan.org/"], a[href^="https://is.4chan.org/"]', this.nodes.comment);
for (j = 0, len = ref.length; j < len; j++) {
link = ref[j];
$.addClass(link, 'linkify');
@@ -18922,20 +18965,23 @@ Unread = (function() {
titleDead = Unread.thread.isDead ? Unread.title.replace('-', (Unread.thread.isArchived ? '- Archived -' : '- 404 -')) : Unread.title;
d.title = "" + titleQuotingYou + titleCount + titleDead;
}
- $.forceSync('Remember Last Read Post');
- if (Conf['Remember Last Read Post'] && (!Unread.thread.isDead || Unread.thread.isArchived)) {
- ThreadWatcher.update(Unread.thread.board.ID, Unread.thread.ID, {
- isDead: Unread.thread.isDead,
- unread: count,
- quotingYou: countQuotingYou
- });
- }
+ Unread.saveThreadWatcherCount();
if (Conf['Unread Favicon']) {
isDead = Unread.thread.isDead;
Favicon.el.href = countQuotingYou ? Favicon[isDead ? 'unreadDeadY' : 'unreadY'] : count ? Favicon[isDead ? 'unreadDead' : 'unread'] : Favicon[isDead ? 'dead' : 'default'];
return $.add(d.head, Favicon.el);
}
- }
+ },
+ saveThreadWatcherCount: $.debounce(2 * $.SECOND, function() {
+ $.forceSync('Remember Last Read Post');
+ if (Conf['Remember Last Read Post'] && (!Unread.thread.isDead || Unread.thread.isArchived)) {
+ return ThreadWatcher.update(Unread.thread.board.ID, Unread.thread.ID, {
+ isDead: Unread.thread.isDead,
+ unread: Unread.posts.size,
+ quotingYou: Unread.postsQuotingYou.size
+ });
+ }
+ })
};
return Unread;
@@ -21676,12 +21722,13 @@ QR = (function() {
};
_Class.prototype.save = function(input) {
- var name, ref;
+ var name, prev, ref;
if (input.type === 'checkbox') {
this.spoiler = input.checked;
return;
}
name = input.dataset.name;
+ prev = this[name];
this[name] = input.value || input.dataset["default"] || null;
switch (name) {
case 'thread':
@@ -21700,7 +21747,9 @@ QR = (function() {
this.saveFilename();
return this.updateFilename();
case 'name':
- return QR.persona.set(this);
+ if (this.name !== prev) {
+ return QR.persona.set(this);
+ }
}
};
@@ -23167,6 +23216,7 @@ Main = (function() {
}
return;
case 'i.4cdn.org':
+ case 'is.4chan.org':
if (!(pathname[2] && !/s\.jpg$/.test(pathname[2]))) {
return;
}
@@ -23234,8 +23284,8 @@ Main = (function() {
if ($.engine) {
$.addClass(doc, "ua-" + $.engine);
}
- $.onExists(doc, '.ad-cnt', function(ad) {
- return $.onExists(ad, 'img', function() {
+ $.onExists(doc, '.ad-cnt, .adg-rects', function(ad) {
+ return $.onExists(ad, 'img, iframe', function() {
return $.addClass(doc, 'ads-loaded');
});
});
diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx
index 1aeef2bd6..09ebb78fd 100644
Binary files a/builds/4chan-X.crx and b/builds/4chan-X.crx differ
diff --git a/builds/4chan-X.meta.js b/builds/4chan-X.meta.js
index 84ce3806a..f94c9d2a1 100644
--- a/builds/4chan-X.meta.js
+++ b/builds/4chan-X.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.13.0.9
+// @version 1.13.0.17
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -14,6 +14,8 @@
// @include https://www.4chan.org/*
// @include http://i.4cdn.org/*
// @include https://i.4cdn.org/*
+// @include http://is.4chan.org/*
+// @include https://is.4chan.org/*
// @include https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
// @include https://www.google.com/recaptcha/api2/frame?*&k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
// @include http://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
@@ -22,7 +24,16 @@
// @exclude https://www.4chan.org/pass
// @exclude http://www.4chan.org/pass?*
// @exclude https://www.4chan.org/pass?*
+// @exclude http://www.4chan.org/advertise
+// @exclude https://www.4chan.org/advertise
+// @exclude http://www.4chan.org/advertise?*
+// @exclude https://www.4chan.org/advertise?*
+// @exclude http://www.4chan.org/donate
+// @exclude https://www.4chan.org/donate
+// @exclude http://www.4chan.org/donate?*
+// @exclude https://www.4chan.org/donate?*
// @connect i.4cdn.org
+// @connect is.4chan.org
// @connect *
// @grant GM_getValue
// @grant GM_setValue
diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js
index 21ef907b8..0bfd0ed3d 100644
--- a/builds/4chan-X.user.js
+++ b/builds/4chan-X.user.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.13.0.9
+// @version 1.13.0.17
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -14,6 +14,8 @@
// @include https://www.4chan.org/*
// @include http://i.4cdn.org/*
// @include https://i.4cdn.org/*
+// @include http://is.4chan.org/*
+// @include https://is.4chan.org/*
// @include https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
// @include https://www.google.com/recaptcha/api2/frame?*&k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
// @include http://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
@@ -22,7 +24,16 @@
// @exclude https://www.4chan.org/pass
// @exclude http://www.4chan.org/pass?*
// @exclude https://www.4chan.org/pass?*
+// @exclude http://www.4chan.org/advertise
+// @exclude https://www.4chan.org/advertise
+// @exclude http://www.4chan.org/advertise?*
+// @exclude https://www.4chan.org/advertise?*
+// @exclude http://www.4chan.org/donate
+// @exclude https://www.4chan.org/donate
+// @exclude http://www.4chan.org/donate?*
+// @exclude https://www.4chan.org/donate?*
// @connect i.4cdn.org
+// @connect is.4chan.org
// @connect *
// @grant GM_getValue
// @grant GM_setValue
@@ -136,7 +147,7 @@ docSet = function() {
};
g = {
- VERSION: '1.13.0.9',
+ VERSION: '1.13.0.17',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -1303,15 +1314,18 @@ body > div[style*=\" top: -10000px;\"] {\n\
max-width: calc(100vw - 50px);\n\
}\n\
/* Ads */\n\
-:root:not(.ads-loaded) .ad-cnt > * {\n\
- height: auto;\n\
+.ad-cnt > *, .adg-rects > * {\n\
+ height: auto !important;\n\
}\n\
:root:not(.ads-loaded) .ad-plea,\n\
:root:not(.ads-loaded) hr.abovePostForm,\n\
:root:not(.ads-loaded) .ad-plea-bottom + hr {\n\
display: none;\n\
}\n\
-hr + div.center:not(.ad-cnt):not(.topad):not(.middlead):not(.bottomad) {\n\
+:root:not(.ads-loaded) .adg-rects {\n\
+ margin: 0;\n\
+}\n\
+div.center[style] {\n\
display: none !important;\n\
}\n\
/* Anti-autoplay */\n\
@@ -1888,6 +1902,8 @@ div[data-checked=\"false\"] > .suboption-list {\n\
}\n\
.catalog-thread {\n\
display: inline-block;\n\
+ -moz-box-sizing: border-box;\n\
+ box-sizing: border-box;\n\
border: 1px solid transparent;\n\
word-wrap: break-word;\n\
vertical-align: top;\n\
@@ -1898,12 +1914,12 @@ div[data-checked=\"false\"] > .suboption-list {\n\
margin: 4px;\n\
}\n\
.catalog-small > .catalog-thread {\n\
- width: 165px;\n\
- height: 320px;\n\
+ width: 167px;\n\
+ height: 322px;\n\
}\n\
.catalog-large > .catalog-thread {\n\
- width: 270px;\n\
- height: 410px;\n\
+ width: 272px;\n\
+ height: 412px;\n\
}\n\
:root.catalog-hover-expand .catalog-thread:hover {\n\
z-index: 1;\n\
@@ -1996,9 +2012,11 @@ div[data-checked=\"false\"] > .suboption-list {\n\
.catalog-container:not(:hover) > * > .file,\n\
.catalog-container:not(:hover) > * > .postInfo > :not(.subject),\n\
.catalog-container:not(:hover) > * > .catalog-replies,\n\
+.catalog-container:not(:hover) .extra-linebreak,\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\
.catalog-thread > .catalog-container > :not(.catalog-post),\n\
.catalog-post > .file > :not(.fileText),\n\
.catalog-post > * > .fileText > :not(:first-child),\n\
@@ -2049,11 +2067,15 @@ div[data-checked=\"false\"] > .suboption-list {\n\
:root.catalog-hover-expand .catalog-container:hover > * > .postMessage:not(:empty) {\n\
padding-top: .3em;\n\
}\n\
+.catalog-post .extra-linebreak {\n\
+ content: ''; /* makes this work in Blink/WebKit */\n\
+ display: block;\n\
+ margin-top: .3em;\n\
+}\n\
.catalog-reply {\n\
text-align: left;\n\
white-space: nowrap;\n\
- margin: -1px;\n\
- border: 1px solid transparent;\n\
+ border-top: 1px solid transparent;\n\
display: -webkit-flex;\n\
display: flex;\n\
-webkit-flex-direction: row;\n\
@@ -2497,10 +2519,10 @@ input[name=\"Default Volume\"] {\n\
box-shadow: 0 0 3px 3px rgba(255, 0, 0, .5);\n\
}\n\
:root:not(.werkTyme) .catalog-thread.watched .catalog-thumb,\n\
-:root.werkTyme .catalog-thread.watched:not(:hover),\n\
-:root.werkTyme:not(.catalog-hover-expand) .catalog-thread.watched,\n\
+:root:root.werkTyme .catalog-thread.watched:not(:hover),\n\
+:root:root.werkTyme:not(.catalog-hover-expand) .catalog-thread.watched,\n\
:root.werkTyme.catalog-hover-expand .catalog-thread.watched > .catalog-container:hover > .catalog-post {\n\
- outline: 2px solid rgba(255, 0, 0, .75);\n\
+ border: 2px solid rgba(255, 0, 0, .75);\n\
}\n\
/* Spoiler text */\n\
:root.reveal-spoilers s,\n\
@@ -3833,7 +3855,7 @@ a:only-of-type > .remove {\n\
:root.tomorrow.werkTyme .catalog-thread.watched:not(:hover),\n\
:root.tomorrow.werkTyme:not(.catalog-hover-expand) .catalog-thread.watched,\n\
:root.tomorrow.werkTyme.catalog-hover-expand .catalog-thread.watched > .catalog-container:hover > .catalog-post {\n\
- outline: 2px solid rgb(64, 192, 255);\n\
+ border: 2px solid rgb(64, 192, 255);\n\
}\n\
/* QR */\n\
.tomorrow #dump-list::-webkit-scrollbar-thumb {\n\
@@ -4107,6 +4129,11 @@ www:
}\n\
:root:not(.js-enabled) #form {\n\
display: block;\n\
+}\n\
+#bd > div[style], #bd > div[style] > * {\n\
+ height: auto !important;\n\
+ margin: 0 !important;\n\
+ font-size: 0;\n\
}\n"
};
@@ -5975,6 +6002,9 @@ Post = (function() {
return;
}
fileText = fileRoot.firstElementChild;
+ if (link.hostname === 'is.4chan.org') {
+ link.hostname = 'i.4cdn.org';
+ }
this.file = {
text: fileText,
link: link,
@@ -5993,6 +6023,9 @@ Post = (function() {
}
this.file.sizeInBytes = size;
if ((thumb = $('a.fileThumb > [data-md5]', fileRoot))) {
+ if (thumb.parentNode.hostname === 'is.4chan.org') {
+ thumb.parentNode.hostname = 'i.4cdn.org';
+ }
return $.extend(this.file, {
thumb: thumb,
thumbLink: thumb.parentNode,
@@ -6145,17 +6178,17 @@ Post = (function() {
node.id = Post.Clone.prefix + node.id;
}
Post.Clone.prefix++;
- this.nodes = this.parseNodes(root);
- ref2 = $$('.inline', this.nodes.post);
+ ref2 = $$('.inline', root);
for (k = 0, len2 = ref2.length; k < len2; k++) {
inline = ref2[k];
$.rm(inline);
}
- ref3 = $$('.inlined', this.nodes.post);
+ ref3 = $$('.inlined', root);
for (l = 0, len3 = ref3.length; l < len3; l++) {
inlined = ref3[l];
$.rmClass(inlined, 'inlined');
}
+ this.nodes = this.parseNodes(root);
root.hidden = false;
$.rmClass(root, 'forwarded');
$.rmClass(this.nodes.post, 'highlight');
@@ -8163,7 +8196,7 @@ Build = (function() {
return root;
},
catalogThread: function(thread, data, pageCount) {
- var container, cssText, fileCount, gifIcon, imgClass, postCount, ratio, root, spoilerRange, src, staticPath, tn_h, tn_w;
+ var br, container, cssText, fileCount, gifIcon, i, imgClass, len, postCount, ratio, ref, root, spoilerRange, src, staticPath, tn_h, tn_w;
staticPath = Build.staticPath, gifIcon = Build.gifIcon;
tn_w = data.tn_w, tn_h = data.tn_h;
if (data.spoiler && !Conf['Reveal Spoiler Thumbnails']) {
@@ -8191,6 +8224,13 @@ Build = (function() {
innerHTML: "

" + E(postCount) + " / " + E(fileCount) + " / " + E(pageCount) + "" + ((thread.isSticky) ? "
" : "") + ((thread.isClosed) ? "
" : "") + " "
});
$.before(thread.OP.nodes.info, slice.call(container.childNodes));
+ ref = $$('br', thread.OP.nodes.comment);
+ for (i = 0, len = ref.length; i < len; i++) {
+ br = ref[i];
+ if (br.previousSibling && br.previousSibling.nodeName === 'BR') {
+ $.addClass(br, 'extra-linebreak');
+ }
+ }
root = $.el('div', {
className: 'thread catalog-thread',
id: "t" + thread
@@ -10184,6 +10224,9 @@ Index = (function() {
searchMatch: function(obj, keywords) {
var file, info, k, key, keyword, l, len, len1, ref, text;
info = obj.info, file = obj.file;
+ if (info.comment == null) {
+ info.comment = Build.parseComment(info.commentHTML.innerHTML);
+ }
text = [];
ref = ['comment', 'subject', 'name', 'tripcode'];
for (k = 0, len = ref.length; k < len; k++) {
@@ -10394,8 +10437,8 @@ Settings = (function() {
}
},
ads: function(cb) {
- return $.onExists(doc, '.ad-cnt', function(ad) {
- return $.onExists(ad, 'img', function() {
+ return $.onExists(doc, '.ad-cnt, .adg-rects', function(ad) {
+ return $.onExists(ad, 'img, iframe', function() {
var url;
url = Redirect.to('thread', {
boardID: 'qa',
@@ -10948,7 +10991,7 @@ Settings = (function() {
advanced: function(section) {
var applyCSS, boardSelect, customCSS, event, input, inputs, interval, items, itemsArchive, j, k, l, len, len1, len2, len3, m, name, ref, ref1, ref2, ref3, table, updateArchives, warning;
$.extend(section, {
- innerHTML: "