diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d39ce747..f4ba97092 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.14.1 + +**v1.14.1.0** *(2018-05-17)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.1.0/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.1.0/builds/4chan-X-noupdate.crx)] +- Based on v1.14.0.15. +- Allow the Quick Reply to be used on pages without an original post form such as archived threads. #242 +- Only autorefresh thread watcher from current tab. + ## v1.14.0 **v1.14.0.15** *(2018-05-05)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.0.15/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.0.15/builds/4chan-X-noupdate.crx)] diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index fb4aebf35..d02c59843 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 0f1cf7d59..ac4368b69 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.14.0.15 +// @version 1.14.1.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 f735b0c82..9c22f6134 100644 --- a/builds/4chan-X-beta.user.js +++ b/builds/4chan-X-beta.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X beta -// @version 1.14.0.15 +// @version 1.14.1.0 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -157,7 +157,7 @@ docSet = function() { }; g = { - VERSION: '1.14.0.15', + VERSION: '1.14.1.0', NAMESPACE: '4chan X.', boards: {} }; @@ -7516,13 +7516,12 @@ Redirect = (function() { { "uid": 8, "name": "Rebecca Black Tech", "domain": "archive.rebeccablacktech.com", "http": false, "https": true, "software": "foolfuuka", "boards": [ "cgl", "g", "mu" ], "files": [ "cgl", "g", "mu" ], "reports": true }, { "uid": 10, "name": "warosu", "domain": "warosu.org", "http": false, "https": true, "software": "fuuka", "boards": [ "3", "biz", "cgl", "ck", "diy", "fa", "g", "ic", "jp", "lit", "sci", "tg", "vr" ], "files": [ "3", "biz", "cgl", "ck", "diy", "fa", "g", "ic", "jp", "lit", "sci", "tg", "vr" ] }, { "uid": 23, "name": "Desuarchive", "domain": "desuarchive.org", "http": true, "https": true, "software": "foolfuuka", "boards": [ "a", "aco", "an", "c", "co", "d", "fit", "gif", "his", "int", "k", "m", "mlp", "qa", "r9k", "tg", "trash", "vr", "wsg" ], "files": [ "a", "aco", "an", "c", "co", "d", "fit", "gif", "his", "int", "k", "m", "mlp", "qa", "r9k", "tg", "trash", "vr", "wsg" ], "reports": true }, - { "uid": 24, "name": "fireden.net", "domain": "boards.fireden.net", "http": false, "https": true, "software": "foolfuuka", "boards": [ "a", "cm", "ic", "sci", "tg", "v", "vg", "y" ], "files": [ "a", "cm", "ic", "sci", "tg", "v", "vg", "y" ] }, + { "uid": 24, "name": "fireden.net", "domain": "boards.fireden.net", "http": false, "https": true, "software": "foolfuuka", "boards": [ "a", "cm", "co", "ic", "sci", "tg", "v", "vg", "vip", "y" ], "files": [ "a", "cm", "co", "ic", "sci", "tg", "v", "vg", "vip", "y" ] }, { "uid": 25, "name": "arch.b4k.co", "domain": "arch.b4k.co", "http": true, "https": true, "software": "foolfuuka", "boards": [ "g", "jp", "mlp", "v" ], "files": [] }, { "uid": 28, "name": "bstats", "domain": "archive.b-stats.org", "http": false, "https": true, "software": "foolfuuka", "boards": [ "f", "cm", "hm", "lgbt", "news", "qst", "trash", "y" ], "files": [] }, { "uid": 29, "name": "Archived.Moe", "domain": "archived.moe", "http": true, "https": true, "software": "foolfuuka", "boards": [ "3", "a", "aco", "adv", "an", "asp", "b", "bant", "biz", "c", "can", "cgl", "ck", "cm", "co", "cock", "d", "diy", "e", "f", "fa", "fap", "fit", "fitlit", "g", "gd", "gif", "h", "hc", "his", "hm", "hr", "i", "ic", "int", "jp", "k", "lgbt", "lit", "m", "mlp", "mlpol", "mo", "mtv", "mu", "n", "news", "o", "out", "outsoc", "p", "po", "pol", "qa", "qst", "r", "r9k", "s", "s4s", "sci", "soc", "sp", "spa", "t", "tg", "toy", "trash", "trv", "tv", "u", "v", "vg", "vint", "vip", "vp", "vr", "w", "wg", "wsg", "wsr", "x", "y" ], "files": [ "can", "cock", "fap", "fitlit", "gd", "mlpol", "mo", "mtv", "outsoc", "po", "qst", "spa", "vint", "vip" ], "search": [ "aco", "adv", "an", "asp", "b", "bant", "c", "can", "cgl", "ck", "cm", "cock", "con", "d", "diy", "e", "f", "fap", "fitlit", "gd", "gif", "h", "hc", "his", "hm", "hr", "i", "ic", "lgbt", "lit", "mlpol", "mo", "mtv", "n", "news", "o", "out", "outsoc", "p", "po", "q", "qa", "qst", "r", "s", "soc", "spa", "trv", "u", "vint", "vip", "w", "wg", "wsg", "wsr", "x", "y" ], "reports": true }, { "uid": 30, "name": "TheBArchive.com", "domain": "thebarchive.com", "http": true, "https": true, "software": "foolfuuka", "boards": [ "b", "bant" ], "files": [ "b", "bant" ], "reports": true }, - { "uid": 31, "name": "Archive Of Sins", "domain": "archiveofsins.com", "http": true, "https": true, "software": "foolfuuka", "boards": [ "h", "hc", "hm", "r", "s", "soc" ], "files": [ "h", "hc", "hm", "r", "s", "soc" ], "reports": true }, - { "uid": 33, "name": "YEET Archive", "domain": "archive.yeet.net", "http": true, "https": true, "software": "foolfuuka", "boards": [ "g", "k", "qa", "s4s" ] } + { "uid": 31, "name": "Archive Of Sins", "domain": "archiveofsins.com", "http": true, "https": true, "software": "foolfuuka", "boards": [ "h", "hc", "hm", "i", "lgbt", "r", "s", "soc", "t", "u" ], "files": [ "h", "hc", "hm", "i", "lgbt", "r", "s", "soc", "t", "u" ], "reports": true } ], init: function() { var now, ref; @@ -19520,6 +19519,9 @@ ThreadWatcher = (function() { } Header.addShortcut('watcher', sc, 510); ThreadWatcher.fetchAuto(); + $.on(window, 'visibilitychange focus', function() { + return $.queueTask(ThreadWatcher.fetchAuto); + }); if (Conf['Menu'] && Index.enabled) { Menu.menu.addEntry({ el: $.el('a', { @@ -19777,7 +19779,7 @@ ThreadWatcher = (function() { db = ThreadWatcher.db; interval = ThreadWatcher.unreadEnabled && Conf['Show Unread Count'] ? 5 * $.MINUTE : 2 * $.HOUR; now = Date.now(); - if (!((now - interval < (ref = db.data.lastChecked || 0) && ref <= now))) { + if (!((now - interval < (ref = db.data.lastChecked || 0) && ref <= now) || d.hidden || !d.hasFocus())) { ThreadWatcher.fetchAllStatus(); db.setLastChecked(); } @@ -20940,7 +20942,7 @@ Captcha = {}; if (d.cookie.indexOf('pass_enabled=1') >= 0) { return; } - if (!(this.isEnabled = !!$('#g-recaptcha, #captcha-forced-noscript'))) { + if (!(this.isEnabled = !!$('#g-recaptcha, #captcha-forced-noscript') || !$.id('postForm'))) { return; } if ((this.noscript = Conf['Force Noscript Captcha'] || !Main.jsEnabled)) { @@ -21063,7 +21065,7 @@ Captcha = {}; }, setupJS: function() { return $.global(function() { - var cbNative, render; + var cbNative, render, script; render = function() { var classList, container; classList = document.documentElement.classList; @@ -21082,10 +21084,15 @@ Captcha = {}; return render(); } else { cbNative = window.onRecaptchaLoaded; - return window.onRecaptchaLoaded = function() { + window.onRecaptchaLoaded = function() { render(); return cbNative(); }; + if (!document.head.querySelector('script[src^="https://www.google.com/recaptcha/api.js"]')) { + script = document.createElement('script'); + script.src = 'https://www.google.com/recaptcha/api.js?onload=onRecaptchaLoaded&render=explicit'; + return document.head.appendChild(script); + } } }); }, @@ -21305,9 +21312,6 @@ QR = (function() { return; } this.posts = []; - if (g.VIEW === 'archive') { - return; - } this.captcha = Captcha.v2; $.on(d, '4chanXInitFinished', function() { return BoardConfig.ready(QR.initReady); @@ -21337,10 +21341,7 @@ QR = (function() { }, initReady: function() { var config, link, linkBot, navLinksBot, origToggle, prop; - QR.postingIsEnabled = !!$.id('postForm'); - if (!QR.postingIsEnabled) { - return; - } + QR.postingIsEnabled = true; config = g.BOARD.config; prop = function(key, def) { var ref; @@ -21356,17 +21357,21 @@ QR = (function() { QR.max_duration_video = prop('max_webm_duration', 120); QR.forcedAnon = !!config.forced_anon; QR.spoiler = !!config.spoilers; - link = $.el('h1', { - className: "qr-link-container" - }); - $.extend(link, { - innerHTML: "" + ((g.VIEW === "thread") ? "Reply to Thread" : "Start a Thread") + "" - }); - QR.link = link.firstElementChild; - $.on(link.firstChild, 'click', function() { - QR.open(); - return QR.nodes.com.focus(); - }); + if ((origToggle = $.id('togglePostFormLink'))) { + link = $.el('h1', { + className: "qr-link-container" + }); + $.extend(link, { + innerHTML: "" + ((g.VIEW === "thread") ? "Reply to Thread" : "Start a Thread") + "" + }); + QR.link = link.firstElementChild; + $.on(link.firstChild, 'click', function() { + QR.open(); + return QR.nodes.com.focus(); + }); + $.before(origToggle, link); + origToggle.firstElementChild.textContent = 'Original Form'; + } if (g.VIEW === 'thread') { linkBot = $.el('div', { className: "brackets-wrap qr-link-container-bottom" @@ -21382,9 +21387,6 @@ QR = (function() { $.prepend(navLinksBot, linkBot); } } - origToggle = $.id('togglePostFormLink'); - $.before(origToggle, link); - origToggle.firstElementChild.textContent = 'Original Form'; $.on(d, 'QRGetFile', QR.getFile); $.on(d, 'QRSetFile', QR.setFile); $.on(d, 'paste', QR.paste); diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index f152535de..3d2dc591e 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 8d2d00687..475564409 100644 --- a/builds/4chan-X-noupdate.user.js +++ b/builds/4chan-X-noupdate.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.14.0.15 +// @version 1.14.1.0 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -157,7 +157,7 @@ docSet = function() { }; g = { - VERSION: '1.14.0.15', + VERSION: '1.14.1.0', NAMESPACE: '4chan X.', boards: {} }; @@ -7516,13 +7516,12 @@ Redirect = (function() { { "uid": 8, "name": "Rebecca Black Tech", "domain": "archive.rebeccablacktech.com", "http": false, "https": true, "software": "foolfuuka", "boards": [ "cgl", "g", "mu" ], "files": [ "cgl", "g", "mu" ], "reports": true }, { "uid": 10, "name": "warosu", "domain": "warosu.org", "http": false, "https": true, "software": "fuuka", "boards": [ "3", "biz", "cgl", "ck", "diy", "fa", "g", "ic", "jp", "lit", "sci", "tg", "vr" ], "files": [ "3", "biz", "cgl", "ck", "diy", "fa", "g", "ic", "jp", "lit", "sci", "tg", "vr" ] }, { "uid": 23, "name": "Desuarchive", "domain": "desuarchive.org", "http": true, "https": true, "software": "foolfuuka", "boards": [ "a", "aco", "an", "c", "co", "d", "fit", "gif", "his", "int", "k", "m", "mlp", "qa", "r9k", "tg", "trash", "vr", "wsg" ], "files": [ "a", "aco", "an", "c", "co", "d", "fit", "gif", "his", "int", "k", "m", "mlp", "qa", "r9k", "tg", "trash", "vr", "wsg" ], "reports": true }, - { "uid": 24, "name": "fireden.net", "domain": "boards.fireden.net", "http": false, "https": true, "software": "foolfuuka", "boards": [ "a", "cm", "ic", "sci", "tg", "v", "vg", "y" ], "files": [ "a", "cm", "ic", "sci", "tg", "v", "vg", "y" ] }, + { "uid": 24, "name": "fireden.net", "domain": "boards.fireden.net", "http": false, "https": true, "software": "foolfuuka", "boards": [ "a", "cm", "co", "ic", "sci", "tg", "v", "vg", "vip", "y" ], "files": [ "a", "cm", "co", "ic", "sci", "tg", "v", "vg", "vip", "y" ] }, { "uid": 25, "name": "arch.b4k.co", "domain": "arch.b4k.co", "http": true, "https": true, "software": "foolfuuka", "boards": [ "g", "jp", "mlp", "v" ], "files": [] }, { "uid": 28, "name": "bstats", "domain": "archive.b-stats.org", "http": false, "https": true, "software": "foolfuuka", "boards": [ "f", "cm", "hm", "lgbt", "news", "qst", "trash", "y" ], "files": [] }, { "uid": 29, "name": "Archived.Moe", "domain": "archived.moe", "http": true, "https": true, "software": "foolfuuka", "boards": [ "3", "a", "aco", "adv", "an", "asp", "b", "bant", "biz", "c", "can", "cgl", "ck", "cm", "co", "cock", "d", "diy", "e", "f", "fa", "fap", "fit", "fitlit", "g", "gd", "gif", "h", "hc", "his", "hm", "hr", "i", "ic", "int", "jp", "k", "lgbt", "lit", "m", "mlp", "mlpol", "mo", "mtv", "mu", "n", "news", "o", "out", "outsoc", "p", "po", "pol", "qa", "qst", "r", "r9k", "s", "s4s", "sci", "soc", "sp", "spa", "t", "tg", "toy", "trash", "trv", "tv", "u", "v", "vg", "vint", "vip", "vp", "vr", "w", "wg", "wsg", "wsr", "x", "y" ], "files": [ "can", "cock", "fap", "fitlit", "gd", "mlpol", "mo", "mtv", "outsoc", "po", "qst", "spa", "vint", "vip" ], "search": [ "aco", "adv", "an", "asp", "b", "bant", "c", "can", "cgl", "ck", "cm", "cock", "con", "d", "diy", "e", "f", "fap", "fitlit", "gd", "gif", "h", "hc", "his", "hm", "hr", "i", "ic", "lgbt", "lit", "mlpol", "mo", "mtv", "n", "news", "o", "out", "outsoc", "p", "po", "q", "qa", "qst", "r", "s", "soc", "spa", "trv", "u", "vint", "vip", "w", "wg", "wsg", "wsr", "x", "y" ], "reports": true }, { "uid": 30, "name": "TheBArchive.com", "domain": "thebarchive.com", "http": true, "https": true, "software": "foolfuuka", "boards": [ "b", "bant" ], "files": [ "b", "bant" ], "reports": true }, - { "uid": 31, "name": "Archive Of Sins", "domain": "archiveofsins.com", "http": true, "https": true, "software": "foolfuuka", "boards": [ "h", "hc", "hm", "r", "s", "soc" ], "files": [ "h", "hc", "hm", "r", "s", "soc" ], "reports": true }, - { "uid": 33, "name": "YEET Archive", "domain": "archive.yeet.net", "http": true, "https": true, "software": "foolfuuka", "boards": [ "g", "k", "qa", "s4s" ] } + { "uid": 31, "name": "Archive Of Sins", "domain": "archiveofsins.com", "http": true, "https": true, "software": "foolfuuka", "boards": [ "h", "hc", "hm", "i", "lgbt", "r", "s", "soc", "t", "u" ], "files": [ "h", "hc", "hm", "i", "lgbt", "r", "s", "soc", "t", "u" ], "reports": true } ], init: function() { var now, ref; @@ -19520,6 +19519,9 @@ ThreadWatcher = (function() { } Header.addShortcut('watcher', sc, 510); ThreadWatcher.fetchAuto(); + $.on(window, 'visibilitychange focus', function() { + return $.queueTask(ThreadWatcher.fetchAuto); + }); if (Conf['Menu'] && Index.enabled) { Menu.menu.addEntry({ el: $.el('a', { @@ -19777,7 +19779,7 @@ ThreadWatcher = (function() { db = ThreadWatcher.db; interval = ThreadWatcher.unreadEnabled && Conf['Show Unread Count'] ? 5 * $.MINUTE : 2 * $.HOUR; now = Date.now(); - if (!((now - interval < (ref = db.data.lastChecked || 0) && ref <= now))) { + if (!((now - interval < (ref = db.data.lastChecked || 0) && ref <= now) || d.hidden || !d.hasFocus())) { ThreadWatcher.fetchAllStatus(); db.setLastChecked(); } @@ -20940,7 +20942,7 @@ Captcha = {}; if (d.cookie.indexOf('pass_enabled=1') >= 0) { return; } - if (!(this.isEnabled = !!$('#g-recaptcha, #captcha-forced-noscript'))) { + if (!(this.isEnabled = !!$('#g-recaptcha, #captcha-forced-noscript') || !$.id('postForm'))) { return; } if ((this.noscript = Conf['Force Noscript Captcha'] || !Main.jsEnabled)) { @@ -21063,7 +21065,7 @@ Captcha = {}; }, setupJS: function() { return $.global(function() { - var cbNative, render; + var cbNative, render, script; render = function() { var classList, container; classList = document.documentElement.classList; @@ -21082,10 +21084,15 @@ Captcha = {}; return render(); } else { cbNative = window.onRecaptchaLoaded; - return window.onRecaptchaLoaded = function() { + window.onRecaptchaLoaded = function() { render(); return cbNative(); }; + if (!document.head.querySelector('script[src^="https://www.google.com/recaptcha/api.js"]')) { + script = document.createElement('script'); + script.src = 'https://www.google.com/recaptcha/api.js?onload=onRecaptchaLoaded&render=explicit'; + return document.head.appendChild(script); + } } }); }, @@ -21305,9 +21312,6 @@ QR = (function() { return; } this.posts = []; - if (g.VIEW === 'archive') { - return; - } this.captcha = Captcha.v2; $.on(d, '4chanXInitFinished', function() { return BoardConfig.ready(QR.initReady); @@ -21337,10 +21341,7 @@ QR = (function() { }, initReady: function() { var config, link, linkBot, navLinksBot, origToggle, prop; - QR.postingIsEnabled = !!$.id('postForm'); - if (!QR.postingIsEnabled) { - return; - } + QR.postingIsEnabled = true; config = g.BOARD.config; prop = function(key, def) { var ref; @@ -21356,17 +21357,21 @@ QR = (function() { QR.max_duration_video = prop('max_webm_duration', 120); QR.forcedAnon = !!config.forced_anon; QR.spoiler = !!config.spoilers; - link = $.el('h1', { - className: "qr-link-container" - }); - $.extend(link, { - innerHTML: "" + ((g.VIEW === "thread") ? "Reply to Thread" : "Start a Thread") + "" - }); - QR.link = link.firstElementChild; - $.on(link.firstChild, 'click', function() { - QR.open(); - return QR.nodes.com.focus(); - }); + if ((origToggle = $.id('togglePostFormLink'))) { + link = $.el('h1', { + className: "qr-link-container" + }); + $.extend(link, { + innerHTML: "" + ((g.VIEW === "thread") ? "Reply to Thread" : "Start a Thread") + "" + }); + QR.link = link.firstElementChild; + $.on(link.firstChild, 'click', function() { + QR.open(); + return QR.nodes.com.focus(); + }); + $.before(origToggle, link); + origToggle.firstElementChild.textContent = 'Original Form'; + } if (g.VIEW === 'thread') { linkBot = $.el('div', { className: "brackets-wrap qr-link-container-bottom" @@ -21382,9 +21387,6 @@ QR = (function() { $.prepend(navLinksBot, linkBot); } } - origToggle = $.id('togglePostFormLink'); - $.before(origToggle, link); - origToggle.firstElementChild.textContent = 'Original Form'; $.on(d, 'QRGetFile', QR.getFile); $.on(d, 'QRSetFile', QR.setFile); $.on(d, 'paste', QR.paste); diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index ee8f2fa6a..9760ff7d5 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 4feb88346..eb806940f 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.14.0.15 +// @version 1.14.1.0 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index eab593f98..8c9560b41 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.14.0.15 +// @version 1.14.1.0 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -157,7 +157,7 @@ docSet = function() { }; g = { - VERSION: '1.14.0.15', + VERSION: '1.14.1.0', NAMESPACE: '4chan X.', boards: {} }; @@ -7516,13 +7516,12 @@ Redirect = (function() { { "uid": 8, "name": "Rebecca Black Tech", "domain": "archive.rebeccablacktech.com", "http": false, "https": true, "software": "foolfuuka", "boards": [ "cgl", "g", "mu" ], "files": [ "cgl", "g", "mu" ], "reports": true }, { "uid": 10, "name": "warosu", "domain": "warosu.org", "http": false, "https": true, "software": "fuuka", "boards": [ "3", "biz", "cgl", "ck", "diy", "fa", "g", "ic", "jp", "lit", "sci", "tg", "vr" ], "files": [ "3", "biz", "cgl", "ck", "diy", "fa", "g", "ic", "jp", "lit", "sci", "tg", "vr" ] }, { "uid": 23, "name": "Desuarchive", "domain": "desuarchive.org", "http": true, "https": true, "software": "foolfuuka", "boards": [ "a", "aco", "an", "c", "co", "d", "fit", "gif", "his", "int", "k", "m", "mlp", "qa", "r9k", "tg", "trash", "vr", "wsg" ], "files": [ "a", "aco", "an", "c", "co", "d", "fit", "gif", "his", "int", "k", "m", "mlp", "qa", "r9k", "tg", "trash", "vr", "wsg" ], "reports": true }, - { "uid": 24, "name": "fireden.net", "domain": "boards.fireden.net", "http": false, "https": true, "software": "foolfuuka", "boards": [ "a", "cm", "ic", "sci", "tg", "v", "vg", "y" ], "files": [ "a", "cm", "ic", "sci", "tg", "v", "vg", "y" ] }, + { "uid": 24, "name": "fireden.net", "domain": "boards.fireden.net", "http": false, "https": true, "software": "foolfuuka", "boards": [ "a", "cm", "co", "ic", "sci", "tg", "v", "vg", "vip", "y" ], "files": [ "a", "cm", "co", "ic", "sci", "tg", "v", "vg", "vip", "y" ] }, { "uid": 25, "name": "arch.b4k.co", "domain": "arch.b4k.co", "http": true, "https": true, "software": "foolfuuka", "boards": [ "g", "jp", "mlp", "v" ], "files": [] }, { "uid": 28, "name": "bstats", "domain": "archive.b-stats.org", "http": false, "https": true, "software": "foolfuuka", "boards": [ "f", "cm", "hm", "lgbt", "news", "qst", "trash", "y" ], "files": [] }, { "uid": 29, "name": "Archived.Moe", "domain": "archived.moe", "http": true, "https": true, "software": "foolfuuka", "boards": [ "3", "a", "aco", "adv", "an", "asp", "b", "bant", "biz", "c", "can", "cgl", "ck", "cm", "co", "cock", "d", "diy", "e", "f", "fa", "fap", "fit", "fitlit", "g", "gd", "gif", "h", "hc", "his", "hm", "hr", "i", "ic", "int", "jp", "k", "lgbt", "lit", "m", "mlp", "mlpol", "mo", "mtv", "mu", "n", "news", "o", "out", "outsoc", "p", "po", "pol", "qa", "qst", "r", "r9k", "s", "s4s", "sci", "soc", "sp", "spa", "t", "tg", "toy", "trash", "trv", "tv", "u", "v", "vg", "vint", "vip", "vp", "vr", "w", "wg", "wsg", "wsr", "x", "y" ], "files": [ "can", "cock", "fap", "fitlit", "gd", "mlpol", "mo", "mtv", "outsoc", "po", "qst", "spa", "vint", "vip" ], "search": [ "aco", "adv", "an", "asp", "b", "bant", "c", "can", "cgl", "ck", "cm", "cock", "con", "d", "diy", "e", "f", "fap", "fitlit", "gd", "gif", "h", "hc", "his", "hm", "hr", "i", "ic", "lgbt", "lit", "mlpol", "mo", "mtv", "n", "news", "o", "out", "outsoc", "p", "po", "q", "qa", "qst", "r", "s", "soc", "spa", "trv", "u", "vint", "vip", "w", "wg", "wsg", "wsr", "x", "y" ], "reports": true }, { "uid": 30, "name": "TheBArchive.com", "domain": "thebarchive.com", "http": true, "https": true, "software": "foolfuuka", "boards": [ "b", "bant" ], "files": [ "b", "bant" ], "reports": true }, - { "uid": 31, "name": "Archive Of Sins", "domain": "archiveofsins.com", "http": true, "https": true, "software": "foolfuuka", "boards": [ "h", "hc", "hm", "r", "s", "soc" ], "files": [ "h", "hc", "hm", "r", "s", "soc" ], "reports": true }, - { "uid": 33, "name": "YEET Archive", "domain": "archive.yeet.net", "http": true, "https": true, "software": "foolfuuka", "boards": [ "g", "k", "qa", "s4s" ] } + { "uid": 31, "name": "Archive Of Sins", "domain": "archiveofsins.com", "http": true, "https": true, "software": "foolfuuka", "boards": [ "h", "hc", "hm", "i", "lgbt", "r", "s", "soc", "t", "u" ], "files": [ "h", "hc", "hm", "i", "lgbt", "r", "s", "soc", "t", "u" ], "reports": true } ], init: function() { var now, ref; @@ -19520,6 +19519,9 @@ ThreadWatcher = (function() { } Header.addShortcut('watcher', sc, 510); ThreadWatcher.fetchAuto(); + $.on(window, 'visibilitychange focus', function() { + return $.queueTask(ThreadWatcher.fetchAuto); + }); if (Conf['Menu'] && Index.enabled) { Menu.menu.addEntry({ el: $.el('a', { @@ -19777,7 +19779,7 @@ ThreadWatcher = (function() { db = ThreadWatcher.db; interval = ThreadWatcher.unreadEnabled && Conf['Show Unread Count'] ? 5 * $.MINUTE : 2 * $.HOUR; now = Date.now(); - if (!((now - interval < (ref = db.data.lastChecked || 0) && ref <= now))) { + if (!((now - interval < (ref = db.data.lastChecked || 0) && ref <= now) || d.hidden || !d.hasFocus())) { ThreadWatcher.fetchAllStatus(); db.setLastChecked(); } @@ -20940,7 +20942,7 @@ Captcha = {}; if (d.cookie.indexOf('pass_enabled=1') >= 0) { return; } - if (!(this.isEnabled = !!$('#g-recaptcha, #captcha-forced-noscript'))) { + if (!(this.isEnabled = !!$('#g-recaptcha, #captcha-forced-noscript') || !$.id('postForm'))) { return; } if ((this.noscript = Conf['Force Noscript Captcha'] || !Main.jsEnabled)) { @@ -21063,7 +21065,7 @@ Captcha = {}; }, setupJS: function() { return $.global(function() { - var cbNative, render; + var cbNative, render, script; render = function() { var classList, container; classList = document.documentElement.classList; @@ -21082,10 +21084,15 @@ Captcha = {}; return render(); } else { cbNative = window.onRecaptchaLoaded; - return window.onRecaptchaLoaded = function() { + window.onRecaptchaLoaded = function() { render(); return cbNative(); }; + if (!document.head.querySelector('script[src^="https://www.google.com/recaptcha/api.js"]')) { + script = document.createElement('script'); + script.src = 'https://www.google.com/recaptcha/api.js?onload=onRecaptchaLoaded&render=explicit'; + return document.head.appendChild(script); + } } }); }, @@ -21305,9 +21312,6 @@ QR = (function() { return; } this.posts = []; - if (g.VIEW === 'archive') { - return; - } this.captcha = Captcha.v2; $.on(d, '4chanXInitFinished', function() { return BoardConfig.ready(QR.initReady); @@ -21337,10 +21341,7 @@ QR = (function() { }, initReady: function() { var config, link, linkBot, navLinksBot, origToggle, prop; - QR.postingIsEnabled = !!$.id('postForm'); - if (!QR.postingIsEnabled) { - return; - } + QR.postingIsEnabled = true; config = g.BOARD.config; prop = function(key, def) { var ref; @@ -21356,17 +21357,21 @@ QR = (function() { QR.max_duration_video = prop('max_webm_duration', 120); QR.forcedAnon = !!config.forced_anon; QR.spoiler = !!config.spoilers; - link = $.el('h1', { - className: "qr-link-container" - }); - $.extend(link, { - innerHTML: "" + ((g.VIEW === "thread") ? "Reply to Thread" : "Start a Thread") + "" - }); - QR.link = link.firstElementChild; - $.on(link.firstChild, 'click', function() { - QR.open(); - return QR.nodes.com.focus(); - }); + if ((origToggle = $.id('togglePostFormLink'))) { + link = $.el('h1', { + className: "qr-link-container" + }); + $.extend(link, { + innerHTML: "" + ((g.VIEW === "thread") ? "Reply to Thread" : "Start a Thread") + "" + }); + QR.link = link.firstElementChild; + $.on(link.firstChild, 'click', function() { + QR.open(); + return QR.nodes.com.focus(); + }); + $.before(origToggle, link); + origToggle.firstElementChild.textContent = 'Original Form'; + } if (g.VIEW === 'thread') { linkBot = $.el('div', { className: "brackets-wrap qr-link-container-bottom" @@ -21382,9 +21387,6 @@ QR = (function() { $.prepend(navLinksBot, linkBot); } } - origToggle = $.id('togglePostFormLink'); - $.before(origToggle, link); - origToggle.firstElementChild.textContent = 'Original Form'; $.on(d, 'QRGetFile', QR.getFile); $.on(d, 'QRSetFile', QR.setFile); $.on(d, 'paste', QR.paste); diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index 93662f01f..d0e280085 100644 Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ diff --git a/builds/updates-beta.json b/builds/updates-beta.json index a21908bed..794970093 100644 --- a/builds/updates-beta.json +++ b/builds/updates-beta.json @@ -3,7 +3,7 @@ "4chan-x@4chan-x.net": { "updates": [ { - "version": "1.14.0.15", + "version": "1.14.1.0", "update_link": "https://www.4chan-x.net/builds/4chan-X-beta.crx" } ] diff --git a/builds/updates-beta.xml b/builds/updates-beta.xml index d84b159ba..7726d6869 100644 --- a/builds/updates-beta.xml +++ b/builds/updates-beta.xml @@ -1,7 +1,7 @@ - + diff --git a/builds/updates.json b/builds/updates.json index 74d955e21..0908ac57d 100644 --- a/builds/updates.json +++ b/builds/updates.json @@ -3,7 +3,7 @@ "4chan-x@4chan-x.net": { "updates": [ { - "version": "1.14.0.15", + "version": "1.14.1.0", "update_link": "https://www.4chan-x.net/builds/4chan-X.crx" } ] diff --git a/builds/updates.xml b/builds/updates.xml index f361512d1..892245d8a 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/version.json b/version.json index c2cf3e2fc..fbc989574 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "version": "1.14.0.15", - "date": "2018-05-05T22:44:48.373Z" + "version": "1.14.1.0", + "date": "2018-05-17T06:35:55.533Z" } \ No newline at end of file