diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b59a8b0a..82881312a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor ### v1.11.19 +**v1.11.19.3** *(2015-12-04)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.19.3/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.19.3/builds/4chan-X-noupdate.crx "Chromium version")] +- Support warnings formerly shown on every page load have been moved to the settings panel. The `Show Support Message` option has thus been retired. +- Add warning about the [ad situation](https://boards.4chan.org/qa/thread/362590). + **v1.11.19.2** *(2015-12-02)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.19.2/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.19.2/builds/4chan-X-noupdate.crx "Chromium version")] - Minor bug fixes. diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index fc627e288..1a38d5892 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 654983a06..10142d606 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.2 +// @version 1.11.19.3 // @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 f6662925a..9c16d4c84 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.2 +// @version 1.11.19.3 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -151,7 +151,6 @@ 'Color User IDs': [true, 'Assign unique colors to user IDs on boards that use them'], 'Remove Spoilers': [false, 'Remove all spoilers in text.'], 'Reveal Spoilers': [false, 'Indicate spoilers if Remove Spoilers is enabled, or make the text appear hovered if Remove Spoiler is disabled.'], - 'Show Support Message': [true, 'Warn if your browser or configuration is unsupported and may cause 4chan X to not operate correctly.'], 'Normalize URL': [true, 'Rewrite the URL of the current page, removing slugs and excess slashes, and changing /res/ to /thread/.'], 'Disable Autoplaying Sounds': [false, 'Prevent sounds on the page from autoplaying.'], 'Disable Native Extension': [true, '4chan X is NOT designed to work with the native extension.'], @@ -433,7 +432,7 @@ doc = d.documentElement; g = { - VERSION: '1.11.19.2', + VERSION: '1.11.19.3', NAMESPACE: '4chan X.', boards: {} }; @@ -16841,13 +16840,48 @@ section.scrollTop = 0; return $.event('OpenSettings', null, section); }, + warnings: { + localStorage: function(cb) { + var why; + if ($.cantSync) { + why = $.cantSet ? 'save your settings' : 'synchronize settings between tabs'; + return cb($.el('li', { + textContent: "4chan X needs local storage to " + why + ".\nEnable it on boards.4chan.org in your browser's privacy settings (may be listed as part of \"local data\" or \"cookies\")." + })); + } + }, + ads: function(cb) { + return $.onExists(doc, '.ad-cnt', true, function(ad) { + return $.onExists(ad, 'img', true, function() { + return cb($.el('li', { + innerHTML: "To protect yourself from malicious ads, you should block ads on 4chan." + })); + }); + }); + } + }, main: function(section) { - var arr, button, container, containers, description, div, fs, input, inputs, items, key, level, obj, ref; + var addWarning, arr, button, container, containers, description, div, fs, input, inputs, items, key, level, obj, ref, ref1, warning, warnings; + warnings = $.el('fieldset', { + hidden: true + }, { + innerHTML: "Warnings" + }); + addWarning = function(item) { + $.add($('ul', warnings), item); + return warnings.hidden = false; + }; + ref = Settings.warnings; + for (key in ref) { + warning = ref[key]; + warning(addWarning); + } + $.add(section, warnings); items = {}; inputs = {}; - ref = Config.main; - for (key in ref) { - obj = ref[key]; + ref1 = Config.main; + for (key in ref1) { + obj = ref1[key]; fs = $.el('fieldset', { innerHTML: "" + E(key) + "" }); @@ -16898,17 +16932,17 @@ hiddenThreads: {}, hiddenPosts: {} }, function(arg) { - var ID, board, hiddenNum, hiddenPosts, hiddenThreads, ref1, ref2, thread; + var ID, board, hiddenNum, hiddenPosts, hiddenThreads, ref2, ref3, thread; hiddenThreads = arg.hiddenThreads, hiddenPosts = arg.hiddenPosts; hiddenNum = 0; - ref1 = hiddenThreads.boards; - for (ID in ref1) { - board = ref1[ID]; - hiddenNum += Object.keys(board).length; - } - ref2 = hiddenPosts.boards; + ref2 = hiddenThreads.boards; for (ID in ref2) { board = ref2[ID]; + hiddenNum += Object.keys(board).length; + } + ref3 = hiddenPosts.boards; + for (ID in ref3) { + board = ref3[ID]; for (ID in board) { thread = board[ID]; hiddenNum += Object.keys(thread).length; @@ -17162,6 +17196,13 @@ changes['sauces'] = data['sauces'].replace(/(#?\s*)http:\/\/iqdb\.org\//g, '$1//iqdb.org/'); } } + if (compareString < '00001.00011.00019.00003' && !Settings.overlay) { + $.queueTask(function() { + return Settings.warnings.ads(function(item) { + return new Notice('warning', slice.call(item.childNodes)); + }); + }); + } return changes; }, loadSettings: function(data, cb) { @@ -17754,7 +17795,7 @@ }); }, initReady: function() { - var ref, ref1, why; + var ref, ref1; if (g.VIEW === 'thread' && (((ref = d.title) === '4chan - Temporarily Offline' || ref === '4chan - 404 Not Found') || ($('.board') && !$('.opContainer')))) { ThreadWatcher.set404(g.BOARD.ID, g.THREADID, function() { if (Conf['404 Redirect']) { @@ -17771,15 +17812,9 @@ return; } if (!(Conf['JSON Navigation'] && g.VIEW === 'index')) { - Main.initThread(); + return Main.initThread(); } else { - $.event('4chanXInitFinished'); - } - if (Conf['Show Support Message']) { - if ($.cantSync) { - why = $.cantSet ? 'save your settings' : 'synchronize settings between tabs'; - return new Notice('warning', "4chan X needs local storage to " + why + ".\nEnable it on boards.4chan.org in your browser's privacy settings\n(may be listed as part of \"local data\" or \"cookies\")."); - } + return $.event('4chanXInitFinished'); } }, initThread: function() { @@ -18859,7 +18894,7 @@ ".fixed.bottom-header #header-bar #scroll-marker {\n" + " bottom: 100%;\n" + "}\n" + -"#header-bar a:not(.entry):not(.close) {\n" + +"#board-list a, #shortcuts a:not(.entry) {\n" + " text-decoration: none;\n" + " padding: 1px;\n" + "}\n" + @@ -19016,6 +19051,9 @@ " overflow: auto;\n" + " white-space: pre-line;\n" + "}\n" + +".message a {\n" + +" text-decoration: underline;\n" + +"}\n" + "/* Settings */\n" + ":root.fourchan-x body {\n" + " -moz-box-sizing: border-box;\n" + @@ -19090,6 +19128,17 @@ ".section-advanced li {\n" + " padding-left: 4px;\n" + "}\n" + +".section-main ul {\n" + +" margin: 0;\n" + +" padding: 0 0 0 16px;\n" + +"}\n" + +".section-main li {\n" + +" white-space: pre-line;\n" + +" list-style: disc;\n" + +"}\n" + +".section-main li:not(:first-of-type) {\n" + +" margin-top: 4px;\n" + +"}\n" + ".section-main label {\n" + " text-decoration: underline;\n" + "}\n" + @@ -19132,7 +19181,7 @@ ".section-filter textarea {\n" + " height: 500px;\n" + "}\n" + -".section-filter a, .section-advanced a {\n" + +".section-main a, .section-filter a, .section-advanced a {\n" + " text-decoration: underline;\n" + "}\n" + ".section-sauce textarea {\n" + diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index eaf08ece2..1041731d0 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 d52647e54..a7adc20b7 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.2 +// @version 1.11.19.3 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -151,7 +151,6 @@ 'Color User IDs': [true, 'Assign unique colors to user IDs on boards that use them'], 'Remove Spoilers': [false, 'Remove all spoilers in text.'], 'Reveal Spoilers': [false, 'Indicate spoilers if Remove Spoilers is enabled, or make the text appear hovered if Remove Spoiler is disabled.'], - 'Show Support Message': [true, 'Warn if your browser or configuration is unsupported and may cause 4chan X to not operate correctly.'], 'Normalize URL': [true, 'Rewrite the URL of the current page, removing slugs and excess slashes, and changing /res/ to /thread/.'], 'Disable Autoplaying Sounds': [false, 'Prevent sounds on the page from autoplaying.'], 'Disable Native Extension': [true, '4chan X is NOT designed to work with the native extension.'], @@ -433,7 +432,7 @@ doc = d.documentElement; g = { - VERSION: '1.11.19.2', + VERSION: '1.11.19.3', NAMESPACE: '4chan X.', boards: {} }; @@ -16841,13 +16840,48 @@ section.scrollTop = 0; return $.event('OpenSettings', null, section); }, + warnings: { + localStorage: function(cb) { + var why; + if ($.cantSync) { + why = $.cantSet ? 'save your settings' : 'synchronize settings between tabs'; + return cb($.el('li', { + textContent: "4chan X needs local storage to " + why + ".\nEnable it on boards.4chan.org in your browser's privacy settings (may be listed as part of \"local data\" or \"cookies\")." + })); + } + }, + ads: function(cb) { + return $.onExists(doc, '.ad-cnt', true, function(ad) { + return $.onExists(ad, 'img', true, function() { + return cb($.el('li', { + innerHTML: "To protect yourself from malicious ads, you should block ads on 4chan." + })); + }); + }); + } + }, main: function(section) { - var arr, button, container, containers, description, div, fs, input, inputs, items, key, level, obj, ref; + var addWarning, arr, button, container, containers, description, div, fs, input, inputs, items, key, level, obj, ref, ref1, warning, warnings; + warnings = $.el('fieldset', { + hidden: true + }, { + innerHTML: "Warnings" + }); + addWarning = function(item) { + $.add($('ul', warnings), item); + return warnings.hidden = false; + }; + ref = Settings.warnings; + for (key in ref) { + warning = ref[key]; + warning(addWarning); + } + $.add(section, warnings); items = {}; inputs = {}; - ref = Config.main; - for (key in ref) { - obj = ref[key]; + ref1 = Config.main; + for (key in ref1) { + obj = ref1[key]; fs = $.el('fieldset', { innerHTML: "" + E(key) + "" }); @@ -16898,17 +16932,17 @@ hiddenThreads: {}, hiddenPosts: {} }, function(arg) { - var ID, board, hiddenNum, hiddenPosts, hiddenThreads, ref1, ref2, thread; + var ID, board, hiddenNum, hiddenPosts, hiddenThreads, ref2, ref3, thread; hiddenThreads = arg.hiddenThreads, hiddenPosts = arg.hiddenPosts; hiddenNum = 0; - ref1 = hiddenThreads.boards; - for (ID in ref1) { - board = ref1[ID]; - hiddenNum += Object.keys(board).length; - } - ref2 = hiddenPosts.boards; + ref2 = hiddenThreads.boards; for (ID in ref2) { board = ref2[ID]; + hiddenNum += Object.keys(board).length; + } + ref3 = hiddenPosts.boards; + for (ID in ref3) { + board = ref3[ID]; for (ID in board) { thread = board[ID]; hiddenNum += Object.keys(thread).length; @@ -17162,6 +17196,13 @@ changes['sauces'] = data['sauces'].replace(/(#?\s*)http:\/\/iqdb\.org\//g, '$1//iqdb.org/'); } } + if (compareString < '00001.00011.00019.00003' && !Settings.overlay) { + $.queueTask(function() { + return Settings.warnings.ads(function(item) { + return new Notice('warning', slice.call(item.childNodes)); + }); + }); + } return changes; }, loadSettings: function(data, cb) { @@ -17754,7 +17795,7 @@ }); }, initReady: function() { - var ref, ref1, why; + var ref, ref1; if (g.VIEW === 'thread' && (((ref = d.title) === '4chan - Temporarily Offline' || ref === '4chan - 404 Not Found') || ($('.board') && !$('.opContainer')))) { ThreadWatcher.set404(g.BOARD.ID, g.THREADID, function() { if (Conf['404 Redirect']) { @@ -17771,15 +17812,9 @@ return; } if (!(Conf['JSON Navigation'] && g.VIEW === 'index')) { - Main.initThread(); + return Main.initThread(); } else { - $.event('4chanXInitFinished'); - } - if (Conf['Show Support Message']) { - if ($.cantSync) { - why = $.cantSet ? 'save your settings' : 'synchronize settings between tabs'; - return new Notice('warning', "4chan X needs local storage to " + why + ".\nEnable it on boards.4chan.org in your browser's privacy settings\n(may be listed as part of \"local data\" or \"cookies\")."); - } + return $.event('4chanXInitFinished'); } }, initThread: function() { @@ -18859,7 +18894,7 @@ ".fixed.bottom-header #header-bar #scroll-marker {\n" + " bottom: 100%;\n" + "}\n" + -"#header-bar a:not(.entry):not(.close) {\n" + +"#board-list a, #shortcuts a:not(.entry) {\n" + " text-decoration: none;\n" + " padding: 1px;\n" + "}\n" + @@ -19016,6 +19051,9 @@ " overflow: auto;\n" + " white-space: pre-line;\n" + "}\n" + +".message a {\n" + +" text-decoration: underline;\n" + +"}\n" + "/* Settings */\n" + ":root.fourchan-x body {\n" + " -moz-box-sizing: border-box;\n" + @@ -19090,6 +19128,17 @@ ".section-advanced li {\n" + " padding-left: 4px;\n" + "}\n" + +".section-main ul {\n" + +" margin: 0;\n" + +" padding: 0 0 0 16px;\n" + +"}\n" + +".section-main li {\n" + +" white-space: pre-line;\n" + +" list-style: disc;\n" + +"}\n" + +".section-main li:not(:first-of-type) {\n" + +" margin-top: 4px;\n" + +"}\n" + ".section-main label {\n" + " text-decoration: underline;\n" + "}\n" + @@ -19132,7 +19181,7 @@ ".section-filter textarea {\n" + " height: 500px;\n" + "}\n" + -".section-filter a, .section-advanced a {\n" + +".section-main a, .section-filter a, .section-advanced a {\n" + " text-decoration: underline;\n" + "}\n" + ".section-sauce textarea {\n" + diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index a7cffc40a..768d71d27 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 e68400c6b..64b626a88 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.2 +// @version 1.11.19.3 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 161564d70..866b0d26a 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.2 +// @version 1.11.19.3 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -151,7 +151,6 @@ 'Color User IDs': [true, 'Assign unique colors to user IDs on boards that use them'], 'Remove Spoilers': [false, 'Remove all spoilers in text.'], 'Reveal Spoilers': [false, 'Indicate spoilers if Remove Spoilers is enabled, or make the text appear hovered if Remove Spoiler is disabled.'], - 'Show Support Message': [true, 'Warn if your browser or configuration is unsupported and may cause 4chan X to not operate correctly.'], 'Normalize URL': [true, 'Rewrite the URL of the current page, removing slugs and excess slashes, and changing /res/ to /thread/.'], 'Disable Autoplaying Sounds': [false, 'Prevent sounds on the page from autoplaying.'], 'Disable Native Extension': [true, '4chan X is NOT designed to work with the native extension.'], @@ -433,7 +432,7 @@ doc = d.documentElement; g = { - VERSION: '1.11.19.2', + VERSION: '1.11.19.3', NAMESPACE: '4chan X.', boards: {} }; @@ -16841,13 +16840,48 @@ section.scrollTop = 0; return $.event('OpenSettings', null, section); }, + warnings: { + localStorage: function(cb) { + var why; + if ($.cantSync) { + why = $.cantSet ? 'save your settings' : 'synchronize settings between tabs'; + return cb($.el('li', { + textContent: "4chan X needs local storage to " + why + ".\nEnable it on boards.4chan.org in your browser's privacy settings (may be listed as part of \"local data\" or \"cookies\")." + })); + } + }, + ads: function(cb) { + return $.onExists(doc, '.ad-cnt', true, function(ad) { + return $.onExists(ad, 'img', true, function() { + return cb($.el('li', { + innerHTML: "To protect yourself from malicious ads, you should block ads on 4chan." + })); + }); + }); + } + }, main: function(section) { - var arr, button, container, containers, description, div, fs, input, inputs, items, key, level, obj, ref; + var addWarning, arr, button, container, containers, description, div, fs, input, inputs, items, key, level, obj, ref, ref1, warning, warnings; + warnings = $.el('fieldset', { + hidden: true + }, { + innerHTML: "Warnings" + }); + addWarning = function(item) { + $.add($('ul', warnings), item); + return warnings.hidden = false; + }; + ref = Settings.warnings; + for (key in ref) { + warning = ref[key]; + warning(addWarning); + } + $.add(section, warnings); items = {}; inputs = {}; - ref = Config.main; - for (key in ref) { - obj = ref[key]; + ref1 = Config.main; + for (key in ref1) { + obj = ref1[key]; fs = $.el('fieldset', { innerHTML: "" + E(key) + "" }); @@ -16898,17 +16932,17 @@ hiddenThreads: {}, hiddenPosts: {} }, function(arg) { - var ID, board, hiddenNum, hiddenPosts, hiddenThreads, ref1, ref2, thread; + var ID, board, hiddenNum, hiddenPosts, hiddenThreads, ref2, ref3, thread; hiddenThreads = arg.hiddenThreads, hiddenPosts = arg.hiddenPosts; hiddenNum = 0; - ref1 = hiddenThreads.boards; - for (ID in ref1) { - board = ref1[ID]; - hiddenNum += Object.keys(board).length; - } - ref2 = hiddenPosts.boards; + ref2 = hiddenThreads.boards; for (ID in ref2) { board = ref2[ID]; + hiddenNum += Object.keys(board).length; + } + ref3 = hiddenPosts.boards; + for (ID in ref3) { + board = ref3[ID]; for (ID in board) { thread = board[ID]; hiddenNum += Object.keys(thread).length; @@ -17162,6 +17196,13 @@ changes['sauces'] = data['sauces'].replace(/(#?\s*)http:\/\/iqdb\.org\//g, '$1//iqdb.org/'); } } + if (compareString < '00001.00011.00019.00003' && !Settings.overlay) { + $.queueTask(function() { + return Settings.warnings.ads(function(item) { + return new Notice('warning', slice.call(item.childNodes)); + }); + }); + } return changes; }, loadSettings: function(data, cb) { @@ -17754,7 +17795,7 @@ }); }, initReady: function() { - var ref, ref1, why; + var ref, ref1; if (g.VIEW === 'thread' && (((ref = d.title) === '4chan - Temporarily Offline' || ref === '4chan - 404 Not Found') || ($('.board') && !$('.opContainer')))) { ThreadWatcher.set404(g.BOARD.ID, g.THREADID, function() { if (Conf['404 Redirect']) { @@ -17771,15 +17812,9 @@ return; } if (!(Conf['JSON Navigation'] && g.VIEW === 'index')) { - Main.initThread(); + return Main.initThread(); } else { - $.event('4chanXInitFinished'); - } - if (Conf['Show Support Message']) { - if ($.cantSync) { - why = $.cantSet ? 'save your settings' : 'synchronize settings between tabs'; - return new Notice('warning', "4chan X needs local storage to " + why + ".\nEnable it on boards.4chan.org in your browser's privacy settings\n(may be listed as part of \"local data\" or \"cookies\")."); - } + return $.event('4chanXInitFinished'); } }, initThread: function() { @@ -18859,7 +18894,7 @@ ".fixed.bottom-header #header-bar #scroll-marker {\n" + " bottom: 100%;\n" + "}\n" + -"#header-bar a:not(.entry):not(.close) {\n" + +"#board-list a, #shortcuts a:not(.entry) {\n" + " text-decoration: none;\n" + " padding: 1px;\n" + "}\n" + @@ -19016,6 +19051,9 @@ " overflow: auto;\n" + " white-space: pre-line;\n" + "}\n" + +".message a {\n" + +" text-decoration: underline;\n" + +"}\n" + "/* Settings */\n" + ":root.fourchan-x body {\n" + " -moz-box-sizing: border-box;\n" + @@ -19090,6 +19128,17 @@ ".section-advanced li {\n" + " padding-left: 4px;\n" + "}\n" + +".section-main ul {\n" + +" margin: 0;\n" + +" padding: 0 0 0 16px;\n" + +"}\n" + +".section-main li {\n" + +" white-space: pre-line;\n" + +" list-style: disc;\n" + +"}\n" + +".section-main li:not(:first-of-type) {\n" + +" margin-top: 4px;\n" + +"}\n" + ".section-main label {\n" + " text-decoration: underline;\n" + "}\n" + @@ -19132,7 +19181,7 @@ ".section-filter textarea {\n" + " height: 500px;\n" + "}\n" + -".section-filter a, .section-advanced a {\n" + +".section-main a, .section-filter a, .section-advanced a {\n" + " text-decoration: underline;\n" + "}\n" + ".section-sauce textarea {\n" + diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index c7dbd595d..e7e2f0e85 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 023e2ff5f..bc9b1be42 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 e5335cb29..541d76b0e 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/version.json b/version.json index 896c20234..5a1116695 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "version": "1.11.19.2", - "date": "2015-12-02T23:05:18.259Z" + "version": "1.11.19.3", + "date": "2015-12-04T10:13:32.765Z" }