diff --git a/CHANGELOG.md b/CHANGELOG.md
index 13c90bf14..357c85e2a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,13 @@
Sometimes the changelog has notes (not comprehensive) acknowledging people's work. This does not mean the changes are their fault, only that their code was used. All changes to the script are chosen by and the fault of the maintainer (ccd0).
+### v1.11.20
+
+**v1.11.20.0** *(2015-12-07)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.20.0/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.20.0/builds/4chan-X-noupdate.crx "Chromium version")]
+- Based on v1.11.19.5.
+- Cosmetic fixes for blocked ads.
+- Add `Inline Cross-thread Quotes Only` option (default: off).
+
### v1.11.19
**v1.11.19.5** *(2015-12-06)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.19.5/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.19.5/builds/4chan-X-noupdate.crx "Chromium version")]
diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx
index aad8b91fb..57a5bed36 100644
Binary files a/builds/4chan-X-beta.crx and b/builds/4chan-X-beta.crx differ
diff --git a/builds/4chan-X-beta.meta.js b/builds/4chan-X-beta.meta.js
index 1d81e211c..5d716464f 100644
--- a/builds/4chan-X-beta.meta.js
+++ b/builds/4chan-X-beta.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X beta
-// @version 1.11.19.5
+// @version 1.11.20.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X-beta.user.js b/builds/4chan-X-beta.user.js
index a4174eb2a..e8ef23ee2 100644
--- a/builds/4chan-X-beta.user.js
+++ b/builds/4chan-X-beta.user.js
@@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X beta
-// @version 1.11.19.5
+// @version 1.11.20.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -254,6 +254,7 @@
'Quote Backlinks': [true, 'Add quote backlinks.'],
'OP Backlinks': [true, 'Add backlinks to the OP.', 1],
'Quote Inlining': [true, 'Inline quoted post on click.'],
+ 'Inline Cross-thread Quotes Only': [false, 'Only inline quote links when the posts are on another thread or board, or fetched from the archive.', 1],
'Quote Hash Navigation': [false, 'Include an extra link after quotes for autoscrolling to quoted posts.', 1],
'Forward Hiding': [true, 'Hide original posts of inlined backlinks.', 1],
'Quote Previewing': [true, 'Show quoted post on hover.'],
@@ -432,7 +433,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.19.5',
+ VERSION: '1.11.20.0',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -661,7 +662,7 @@
}
};
- $.onExists = function(root, selector, subtree, cb) {
+ $.onExists = function(root, selector, cb) {
var el, observer;
if (el = $(selector, root)) {
return cb(el);
@@ -670,7 +671,7 @@
$.asap((function() {
return d.readyState !== 'loading' || $(selector, root);
}), function() {
- return $.onExists(root, selector, subtree, cb);
+ return $.onExists(root, selector, cb);
});
return;
}
@@ -682,7 +683,7 @@
});
return observer.observe(root, {
childList: true,
- subtree: subtree
+ subtree: true
});
};
@@ -697,7 +698,7 @@
if (id != null) {
style.id = id;
}
- $.onExists(doc, test, true, function() {
+ $.onExists(doc, test, function() {
return $.add(d.head, style);
});
return style;
@@ -6196,7 +6197,7 @@
if (Conf['Quote Previewing']) {
$.on(link, 'mouseover', QuotePreview.mouseover);
}
- if (Conf['Quote Inlining']) {
+ if (Conf['Quote Inlining'] && !(Conf['Inline Cross-thread Quotes Only'] && link.getAttribute('href')[0] === '#')) {
$.on(link, 'click', QuoteInline.toggle);
if (Conf['Quote Hash Navigation']) {
hash = QuoteInline.qiQuote(link, $.hasClass(link, 'filtered'));
@@ -6272,14 +6273,6 @@
if (((ref = g.VIEW) !== 'index' && ref !== 'thread') || !Conf['Quote Inlining']) {
return;
}
- this.process = Conf['Quote Hash Navigation'] ? function(link, clone) {
- if (!clone) {
- $.after(link, QuoteInline.qiQuote(link, $.hasClass(link, 'filtered')));
- }
- return $.on(link, 'click', QuoteInline.toggle);
- } : function(link) {
- return $.on(link, 'click', QuoteInline.toggle);
- };
if (Conf['Comment Expansion']) {
ExpandComment.callbacks.push(this.node);
}
@@ -6303,6 +6296,17 @@
process(link, isClone);
}
},
+ process: function(link, clone) {
+ if (Conf['Inline Cross-thread Quotes Only'] && link.getAttribute('href')[0] === '#') {
+ return;
+ }
+ if (Conf['Quote Hash Navigation']) {
+ if (!clone) {
+ $.after(link, QuoteInline.qiQuote(link, $.hasClass(link, 'filtered')));
+ }
+ }
+ return $.on(link, 'click', QuoteInline.toggle);
+ },
qiQuote: function(link, hidden) {
var name;
name = "hashlink";
@@ -7957,7 +7961,7 @@
}
},
initMain: function() {
- return $.onExists(d.body, '#recaptcha-anchor', true, function(checkbox) {
+ return $.onExists(d.body, '#recaptcha-anchor', function(checkbox) {
var focus;
focus = function() {
if (d.hasFocus() && d.activeElement !== checkbox) {
@@ -8151,11 +8155,11 @@
}
if (Conf['captchaLanguage'].trim() || Conf['Captcha Fixes']) {
if (location.hostname === 'boards.4chan.org') {
- return $.onExists(doc, '#captchaFormPart', true, function(node) {
- return $.onExists(node, 'iframe', true, Captcha.replace.iframe);
+ return $.onExists(doc, '#captchaFormPart', function(node) {
+ return $.onExists(node, 'iframe', Captcha.replace.iframe);
});
} else {
- return $.onExists(doc, 'iframe', true, Captcha.replace.iframe);
+ return $.onExists(doc, 'iframe', Captcha.replace.iframe);
}
}
},
@@ -8219,7 +8223,7 @@
src: url
});
$.add(d.head, script);
- return $.onExists(d.body, 'iframe', true, Captcha.replace.autocopy);
+ return $.onExists(d.body, 'iframe', Captcha.replace.autocopy);
},
iframe: function(iframe) {
var lang, src;
@@ -16525,7 +16529,7 @@
Report.fit('body');
}
if (!Conf['Use Recaptcha v2 in Reports'] && Main.jsEnabled && d.cookie.indexOf('pass_enabled=1') < 0) {
- $.onExists(d.body, '#recaptcha_image', true, function(image) {
+ $.onExists(d.body, '#recaptcha_image', function(image) {
$.global(function() {
return document.getElementById('recaptcha_image').removeEventListener('click', window.onAltCaptchaClick, false);
});
@@ -16537,7 +16541,7 @@
}
});
});
- return $.onExists(d.body, '#recaptcha_response_field', true, function(field) {
+ return $.onExists(d.body, '#recaptcha_response_field', function(field) {
return $.on(field, 'keydown', function(e) {
if (e.keyCode === 8 && !field.value) {
return $.global(function() {
@@ -16752,7 +16756,7 @@
settings.disableAll = true;
return localStorage.setItem('4chan-settings', JSON.stringify(settings));
} else {
- return $.onExists(doc, 'body', false, function() {
+ return $.onExists(doc, 'body', function() {
return $.global(function() {
return window.Config.disableAll = true;
});
@@ -16855,8 +16859,8 @@
}
},
ads: function(cb) {
- return $.onExists(doc, '.ad-cnt', true, function(ad) {
- return $.onExists(ad, 'img', true, function() {
+ return $.onExists(doc, '.ad-cnt', function(ad) {
+ return $.onExists(ad, 'img', function() {
return cb($.el('li', {
innerHTML: "To protect yourself from malicious ads, you should block ads on 4chan."
}));
@@ -17661,7 +17665,7 @@
}
switch (hostname) {
case 'www.4chan.org':
- $.onExists(doc, 'body', false, function() {
+ $.onExists(doc, 'body', function() {
return $.addStyle(Main.cssWWW);
});
Captcha.replace.init();
@@ -17724,7 +17728,7 @@
}
g.threads = new SimpleDict();
g.posts = new SimpleDict();
- $.onExists(doc, 'body', false, Main.initStyle);
+ $.onExists(doc, 'body', Main.initStyle);
ref2 = Main.features;
for (k = 0, len1 = ref2.length; k < len1; k++) {
ref3 = ref2[k], name = ref3[0], feature = ref3[1];
@@ -17753,6 +17757,11 @@
if ($.engine) {
$.addClass(doc, $.engine);
}
+ $.onExists(doc, '.ad-cnt', function(ad) {
+ return $.onExists(ad, 'img', function() {
+ return $.addClass(doc, 'ads-loaded');
+ });
+ });
$.addStyle(Main.css, 'fourchanx-css');
keyboard = false;
$.on(d, 'mousedown', function() {
@@ -18694,9 +18703,6 @@
" border-radius: 3px;\n" +
" padding: 0px 2px;\n" +
"}\n" +
-".ad-plea {\n" +
-" display: none;\n" +
-"}\n" +
"/* 4chan style fixes */\n" +
".opContainer, .op {\n" +
" display: block !important;\n" +
@@ -18713,9 +18719,6 @@
"[hidden] {\n" +
" display: none !important;\n" +
"}\n" +
-"hr + div.center:not(.ad-cnt):not(.topad):not(.middlead):not(.bottomad) {\n" +
-" display: none !important;\n" +
-"}\n" +
".page-num {\n" +
" margin-right: -8px;\n" +
"}\n" +
@@ -18744,6 +18747,16 @@
"body > div[style*=\" top: -10000px;\"] {\n" +
" visibility: hidden !important;\n" +
"}\n" +
+"/* Ads */\n" +
+":root:not(.ads-loaded) .ad-cnt,\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" +
+" display: none !important;\n" +
+"}\n" +
"/* Anti-autoplay */\n" +
"audio.controls-added {\n" +
" display: block;\n" +
diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx
index 4b4f3a942..baab7b5ea 100644
Binary files a/builds/4chan-X-noupdate.crx and b/builds/4chan-X-noupdate.crx differ
diff --git a/builds/4chan-X-noupdate.user.js b/builds/4chan-X-noupdate.user.js
index e895063e6..e7e028219 100644
--- a/builds/4chan-X-noupdate.user.js
+++ b/builds/4chan-X-noupdate.user.js
@@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
-// @version 1.11.19.5
+// @version 1.11.20.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -254,6 +254,7 @@
'Quote Backlinks': [true, 'Add quote backlinks.'],
'OP Backlinks': [true, 'Add backlinks to the OP.', 1],
'Quote Inlining': [true, 'Inline quoted post on click.'],
+ 'Inline Cross-thread Quotes Only': [false, 'Only inline quote links when the posts are on another thread or board, or fetched from the archive.', 1],
'Quote Hash Navigation': [false, 'Include an extra link after quotes for autoscrolling to quoted posts.', 1],
'Forward Hiding': [true, 'Hide original posts of inlined backlinks.', 1],
'Quote Previewing': [true, 'Show quoted post on hover.'],
@@ -432,7 +433,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.19.5',
+ VERSION: '1.11.20.0',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -661,7 +662,7 @@
}
};
- $.onExists = function(root, selector, subtree, cb) {
+ $.onExists = function(root, selector, cb) {
var el, observer;
if (el = $(selector, root)) {
return cb(el);
@@ -670,7 +671,7 @@
$.asap((function() {
return d.readyState !== 'loading' || $(selector, root);
}), function() {
- return $.onExists(root, selector, subtree, cb);
+ return $.onExists(root, selector, cb);
});
return;
}
@@ -682,7 +683,7 @@
});
return observer.observe(root, {
childList: true,
- subtree: subtree
+ subtree: true
});
};
@@ -697,7 +698,7 @@
if (id != null) {
style.id = id;
}
- $.onExists(doc, test, true, function() {
+ $.onExists(doc, test, function() {
return $.add(d.head, style);
});
return style;
@@ -6196,7 +6197,7 @@
if (Conf['Quote Previewing']) {
$.on(link, 'mouseover', QuotePreview.mouseover);
}
- if (Conf['Quote Inlining']) {
+ if (Conf['Quote Inlining'] && !(Conf['Inline Cross-thread Quotes Only'] && link.getAttribute('href')[0] === '#')) {
$.on(link, 'click', QuoteInline.toggle);
if (Conf['Quote Hash Navigation']) {
hash = QuoteInline.qiQuote(link, $.hasClass(link, 'filtered'));
@@ -6272,14 +6273,6 @@
if (((ref = g.VIEW) !== 'index' && ref !== 'thread') || !Conf['Quote Inlining']) {
return;
}
- this.process = Conf['Quote Hash Navigation'] ? function(link, clone) {
- if (!clone) {
- $.after(link, QuoteInline.qiQuote(link, $.hasClass(link, 'filtered')));
- }
- return $.on(link, 'click', QuoteInline.toggle);
- } : function(link) {
- return $.on(link, 'click', QuoteInline.toggle);
- };
if (Conf['Comment Expansion']) {
ExpandComment.callbacks.push(this.node);
}
@@ -6303,6 +6296,17 @@
process(link, isClone);
}
},
+ process: function(link, clone) {
+ if (Conf['Inline Cross-thread Quotes Only'] && link.getAttribute('href')[0] === '#') {
+ return;
+ }
+ if (Conf['Quote Hash Navigation']) {
+ if (!clone) {
+ $.after(link, QuoteInline.qiQuote(link, $.hasClass(link, 'filtered')));
+ }
+ }
+ return $.on(link, 'click', QuoteInline.toggle);
+ },
qiQuote: function(link, hidden) {
var name;
name = "hashlink";
@@ -7957,7 +7961,7 @@
}
},
initMain: function() {
- return $.onExists(d.body, '#recaptcha-anchor', true, function(checkbox) {
+ return $.onExists(d.body, '#recaptcha-anchor', function(checkbox) {
var focus;
focus = function() {
if (d.hasFocus() && d.activeElement !== checkbox) {
@@ -8151,11 +8155,11 @@
}
if (Conf['captchaLanguage'].trim() || Conf['Captcha Fixes']) {
if (location.hostname === 'boards.4chan.org') {
- return $.onExists(doc, '#captchaFormPart', true, function(node) {
- return $.onExists(node, 'iframe', true, Captcha.replace.iframe);
+ return $.onExists(doc, '#captchaFormPart', function(node) {
+ return $.onExists(node, 'iframe', Captcha.replace.iframe);
});
} else {
- return $.onExists(doc, 'iframe', true, Captcha.replace.iframe);
+ return $.onExists(doc, 'iframe', Captcha.replace.iframe);
}
}
},
@@ -8219,7 +8223,7 @@
src: url
});
$.add(d.head, script);
- return $.onExists(d.body, 'iframe', true, Captcha.replace.autocopy);
+ return $.onExists(d.body, 'iframe', Captcha.replace.autocopy);
},
iframe: function(iframe) {
var lang, src;
@@ -16525,7 +16529,7 @@
Report.fit('body');
}
if (!Conf['Use Recaptcha v2 in Reports'] && Main.jsEnabled && d.cookie.indexOf('pass_enabled=1') < 0) {
- $.onExists(d.body, '#recaptcha_image', true, function(image) {
+ $.onExists(d.body, '#recaptcha_image', function(image) {
$.global(function() {
return document.getElementById('recaptcha_image').removeEventListener('click', window.onAltCaptchaClick, false);
});
@@ -16537,7 +16541,7 @@
}
});
});
- return $.onExists(d.body, '#recaptcha_response_field', true, function(field) {
+ return $.onExists(d.body, '#recaptcha_response_field', function(field) {
return $.on(field, 'keydown', function(e) {
if (e.keyCode === 8 && !field.value) {
return $.global(function() {
@@ -16752,7 +16756,7 @@
settings.disableAll = true;
return localStorage.setItem('4chan-settings', JSON.stringify(settings));
} else {
- return $.onExists(doc, 'body', false, function() {
+ return $.onExists(doc, 'body', function() {
return $.global(function() {
return window.Config.disableAll = true;
});
@@ -16855,8 +16859,8 @@
}
},
ads: function(cb) {
- return $.onExists(doc, '.ad-cnt', true, function(ad) {
- return $.onExists(ad, 'img', true, function() {
+ return $.onExists(doc, '.ad-cnt', function(ad) {
+ return $.onExists(ad, 'img', function() {
return cb($.el('li', {
innerHTML: "To protect yourself from malicious ads, you should block ads on 4chan."
}));
@@ -17661,7 +17665,7 @@
}
switch (hostname) {
case 'www.4chan.org':
- $.onExists(doc, 'body', false, function() {
+ $.onExists(doc, 'body', function() {
return $.addStyle(Main.cssWWW);
});
Captcha.replace.init();
@@ -17724,7 +17728,7 @@
}
g.threads = new SimpleDict();
g.posts = new SimpleDict();
- $.onExists(doc, 'body', false, Main.initStyle);
+ $.onExists(doc, 'body', Main.initStyle);
ref2 = Main.features;
for (k = 0, len1 = ref2.length; k < len1; k++) {
ref3 = ref2[k], name = ref3[0], feature = ref3[1];
@@ -17753,6 +17757,11 @@
if ($.engine) {
$.addClass(doc, $.engine);
}
+ $.onExists(doc, '.ad-cnt', function(ad) {
+ return $.onExists(ad, 'img', function() {
+ return $.addClass(doc, 'ads-loaded');
+ });
+ });
$.addStyle(Main.css, 'fourchanx-css');
keyboard = false;
$.on(d, 'mousedown', function() {
@@ -18694,9 +18703,6 @@
" border-radius: 3px;\n" +
" padding: 0px 2px;\n" +
"}\n" +
-".ad-plea {\n" +
-" display: none;\n" +
-"}\n" +
"/* 4chan style fixes */\n" +
".opContainer, .op {\n" +
" display: block !important;\n" +
@@ -18713,9 +18719,6 @@
"[hidden] {\n" +
" display: none !important;\n" +
"}\n" +
-"hr + div.center:not(.ad-cnt):not(.topad):not(.middlead):not(.bottomad) {\n" +
-" display: none !important;\n" +
-"}\n" +
".page-num {\n" +
" margin-right: -8px;\n" +
"}\n" +
@@ -18744,6 +18747,16 @@
"body > div[style*=\" top: -10000px;\"] {\n" +
" visibility: hidden !important;\n" +
"}\n" +
+"/* Ads */\n" +
+":root:not(.ads-loaded) .ad-cnt,\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" +
+" display: none !important;\n" +
+"}\n" +
"/* Anti-autoplay */\n" +
"audio.controls-added {\n" +
" display: block;\n" +
diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx
index 4aa0d60ba..fe4812a74 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 325f34769..b1d7c05dd 100644
--- a/builds/4chan-X.meta.js
+++ b/builds/4chan-X.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.11.19.5
+// @version 1.11.20.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js
index 39eee42a7..7f5d0c273 100644
--- a/builds/4chan-X.user.js
+++ b/builds/4chan-X.user.js
@@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
-// @version 1.11.19.5
+// @version 1.11.20.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -254,6 +254,7 @@
'Quote Backlinks': [true, 'Add quote backlinks.'],
'OP Backlinks': [true, 'Add backlinks to the OP.', 1],
'Quote Inlining': [true, 'Inline quoted post on click.'],
+ 'Inline Cross-thread Quotes Only': [false, 'Only inline quote links when the posts are on another thread or board, or fetched from the archive.', 1],
'Quote Hash Navigation': [false, 'Include an extra link after quotes for autoscrolling to quoted posts.', 1],
'Forward Hiding': [true, 'Hide original posts of inlined backlinks.', 1],
'Quote Previewing': [true, 'Show quoted post on hover.'],
@@ -432,7 +433,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.19.5',
+ VERSION: '1.11.20.0',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -661,7 +662,7 @@
}
};
- $.onExists = function(root, selector, subtree, cb) {
+ $.onExists = function(root, selector, cb) {
var el, observer;
if (el = $(selector, root)) {
return cb(el);
@@ -670,7 +671,7 @@
$.asap((function() {
return d.readyState !== 'loading' || $(selector, root);
}), function() {
- return $.onExists(root, selector, subtree, cb);
+ return $.onExists(root, selector, cb);
});
return;
}
@@ -682,7 +683,7 @@
});
return observer.observe(root, {
childList: true,
- subtree: subtree
+ subtree: true
});
};
@@ -697,7 +698,7 @@
if (id != null) {
style.id = id;
}
- $.onExists(doc, test, true, function() {
+ $.onExists(doc, test, function() {
return $.add(d.head, style);
});
return style;
@@ -6196,7 +6197,7 @@
if (Conf['Quote Previewing']) {
$.on(link, 'mouseover', QuotePreview.mouseover);
}
- if (Conf['Quote Inlining']) {
+ if (Conf['Quote Inlining'] && !(Conf['Inline Cross-thread Quotes Only'] && link.getAttribute('href')[0] === '#')) {
$.on(link, 'click', QuoteInline.toggle);
if (Conf['Quote Hash Navigation']) {
hash = QuoteInline.qiQuote(link, $.hasClass(link, 'filtered'));
@@ -6272,14 +6273,6 @@
if (((ref = g.VIEW) !== 'index' && ref !== 'thread') || !Conf['Quote Inlining']) {
return;
}
- this.process = Conf['Quote Hash Navigation'] ? function(link, clone) {
- if (!clone) {
- $.after(link, QuoteInline.qiQuote(link, $.hasClass(link, 'filtered')));
- }
- return $.on(link, 'click', QuoteInline.toggle);
- } : function(link) {
- return $.on(link, 'click', QuoteInline.toggle);
- };
if (Conf['Comment Expansion']) {
ExpandComment.callbacks.push(this.node);
}
@@ -6303,6 +6296,17 @@
process(link, isClone);
}
},
+ process: function(link, clone) {
+ if (Conf['Inline Cross-thread Quotes Only'] && link.getAttribute('href')[0] === '#') {
+ return;
+ }
+ if (Conf['Quote Hash Navigation']) {
+ if (!clone) {
+ $.after(link, QuoteInline.qiQuote(link, $.hasClass(link, 'filtered')));
+ }
+ }
+ return $.on(link, 'click', QuoteInline.toggle);
+ },
qiQuote: function(link, hidden) {
var name;
name = "hashlink";
@@ -7957,7 +7961,7 @@
}
},
initMain: function() {
- return $.onExists(d.body, '#recaptcha-anchor', true, function(checkbox) {
+ return $.onExists(d.body, '#recaptcha-anchor', function(checkbox) {
var focus;
focus = function() {
if (d.hasFocus() && d.activeElement !== checkbox) {
@@ -8151,11 +8155,11 @@
}
if (Conf['captchaLanguage'].trim() || Conf['Captcha Fixes']) {
if (location.hostname === 'boards.4chan.org') {
- return $.onExists(doc, '#captchaFormPart', true, function(node) {
- return $.onExists(node, 'iframe', true, Captcha.replace.iframe);
+ return $.onExists(doc, '#captchaFormPart', function(node) {
+ return $.onExists(node, 'iframe', Captcha.replace.iframe);
});
} else {
- return $.onExists(doc, 'iframe', true, Captcha.replace.iframe);
+ return $.onExists(doc, 'iframe', Captcha.replace.iframe);
}
}
},
@@ -8219,7 +8223,7 @@
src: url
});
$.add(d.head, script);
- return $.onExists(d.body, 'iframe', true, Captcha.replace.autocopy);
+ return $.onExists(d.body, 'iframe', Captcha.replace.autocopy);
},
iframe: function(iframe) {
var lang, src;
@@ -16525,7 +16529,7 @@
Report.fit('body');
}
if (!Conf['Use Recaptcha v2 in Reports'] && Main.jsEnabled && d.cookie.indexOf('pass_enabled=1') < 0) {
- $.onExists(d.body, '#recaptcha_image', true, function(image) {
+ $.onExists(d.body, '#recaptcha_image', function(image) {
$.global(function() {
return document.getElementById('recaptcha_image').removeEventListener('click', window.onAltCaptchaClick, false);
});
@@ -16537,7 +16541,7 @@
}
});
});
- return $.onExists(d.body, '#recaptcha_response_field', true, function(field) {
+ return $.onExists(d.body, '#recaptcha_response_field', function(field) {
return $.on(field, 'keydown', function(e) {
if (e.keyCode === 8 && !field.value) {
return $.global(function() {
@@ -16752,7 +16756,7 @@
settings.disableAll = true;
return localStorage.setItem('4chan-settings', JSON.stringify(settings));
} else {
- return $.onExists(doc, 'body', false, function() {
+ return $.onExists(doc, 'body', function() {
return $.global(function() {
return window.Config.disableAll = true;
});
@@ -16855,8 +16859,8 @@
}
},
ads: function(cb) {
- return $.onExists(doc, '.ad-cnt', true, function(ad) {
- return $.onExists(ad, 'img', true, function() {
+ return $.onExists(doc, '.ad-cnt', function(ad) {
+ return $.onExists(ad, 'img', function() {
return cb($.el('li', {
innerHTML: "To protect yourself from malicious ads, you should block ads on 4chan."
}));
@@ -17661,7 +17665,7 @@
}
switch (hostname) {
case 'www.4chan.org':
- $.onExists(doc, 'body', false, function() {
+ $.onExists(doc, 'body', function() {
return $.addStyle(Main.cssWWW);
});
Captcha.replace.init();
@@ -17724,7 +17728,7 @@
}
g.threads = new SimpleDict();
g.posts = new SimpleDict();
- $.onExists(doc, 'body', false, Main.initStyle);
+ $.onExists(doc, 'body', Main.initStyle);
ref2 = Main.features;
for (k = 0, len1 = ref2.length; k < len1; k++) {
ref3 = ref2[k], name = ref3[0], feature = ref3[1];
@@ -17753,6 +17757,11 @@
if ($.engine) {
$.addClass(doc, $.engine);
}
+ $.onExists(doc, '.ad-cnt', function(ad) {
+ return $.onExists(ad, 'img', function() {
+ return $.addClass(doc, 'ads-loaded');
+ });
+ });
$.addStyle(Main.css, 'fourchanx-css');
keyboard = false;
$.on(d, 'mousedown', function() {
@@ -18694,9 +18703,6 @@
" border-radius: 3px;\n" +
" padding: 0px 2px;\n" +
"}\n" +
-".ad-plea {\n" +
-" display: none;\n" +
-"}\n" +
"/* 4chan style fixes */\n" +
".opContainer, .op {\n" +
" display: block !important;\n" +
@@ -18713,9 +18719,6 @@
"[hidden] {\n" +
" display: none !important;\n" +
"}\n" +
-"hr + div.center:not(.ad-cnt):not(.topad):not(.middlead):not(.bottomad) {\n" +
-" display: none !important;\n" +
-"}\n" +
".page-num {\n" +
" margin-right: -8px;\n" +
"}\n" +
@@ -18744,6 +18747,16 @@
"body > div[style*=\" top: -10000px;\"] {\n" +
" visibility: hidden !important;\n" +
"}\n" +
+"/* Ads */\n" +
+":root:not(.ads-loaded) .ad-cnt,\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" +
+" display: none !important;\n" +
+"}\n" +
"/* Anti-autoplay */\n" +
"audio.controls-added {\n" +
" display: block;\n" +
diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip
index 0acf82cc0..34492be37 100644
Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ
diff --git a/builds/updates-beta.xml b/builds/updates-beta.xml
index 007be902c..d7a13f717 100644
--- a/builds/updates-beta.xml
+++ b/builds/updates-beta.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/builds/updates.xml b/builds/updates.xml
index 415d7c8bd..8ca26d84d 100644
--- a/builds/updates.xml
+++ b/builds/updates.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/version.json b/version.json
index 059a0ccff..259aa83e3 100644
--- a/version.json
+++ b/version.json
@@ -1,4 +1,4 @@
{
- "version": "1.11.19.5",
- "date": "2015-12-06T23:42:45.212Z"
+ "version": "1.11.20.0",
+ "date": "2015-12-07T09:32:57.887Z"
}