From 31eac580aabb3162804a88e5ad01ab39d8375ecc Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 6 Apr 2014 10:17:26 -0700 Subject: [PATCH] implement duckness's upgrade nag disabling option --- CHANGELOG.md | 3 +++ builds/4chan-X.user.js | 5 +++-- builds/crx/script.js | 3 ++- src/General/Config.coffee | 4 ++++ src/General/Main.coffee | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9719db3ac..668906c95 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,6 +69,9 @@ - In v1.5.1, image/video hover was changed to hide and re-use the images/videos to avoid crashes. Fixing bugs caused by this change. +**duckness** +- Allow disabling upgrade nag message. + ### v1.5.2 *2014-04-04* diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index acdd2eec6..fdc15850a 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -152,7 +152,8 @@ 'Emoji': [false, 'Adds icons next to names for different emails'], 'Color User IDs': [false, '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.'] + '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 is unsupported. 4chan X may not operate correctly on unsupported browser versions.'] }, 'Linkification': { 'Linkify': [true, 'Convert text into links where applicable.'], @@ -13666,7 +13667,7 @@ $.event('4chanXInitFinished'); test = $.el('span'); test.classList.add('a', 'b'); - if (test.className !== 'a b') { + if (test.className !== 'a b' && Conf['Show Support Message']) { new Notice('warning', "Your version of Firefox is outdated (v26 minimum) and 4chan X may not operate correctly.", 30); } GMver = GM_info.version.split('.'); diff --git a/builds/crx/script.js b/builds/crx/script.js index fcaa007e9..8b0570448 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -128,7 +128,8 @@ 'Emoji': [false, 'Adds icons next to names for different emails'], 'Color User IDs': [false, '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.'] + '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 is unsupported. 4chan X may not operate correctly on unsupported browser versions.'] }, 'Linkification': { 'Linkify': [true, 'Convert text into links where applicable.'], diff --git a/src/General/Config.coffee b/src/General/Config.coffee index 4370f5af2..f3fa41d41 100755 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -89,6 +89,10 @@ Config = 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 is unsupported. 4chan X may not operate correctly on unsupported browser versions.' + ] 'Linkification': 'Linkify': [ diff --git a/src/General/Main.coffee b/src/General/Main.coffee index 119cb6769..cfad64072 100755 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -195,7 +195,7 @@ Main = <% if (type === 'userscript') { %> test = $.el 'span' test.classList.add 'a', 'b' - if test.className isnt 'a b' + if test.className isnt 'a b' and Conf['Show Support Message'] new Notice 'warning', "Your version of Firefox is outdated (v<%= meta.min.firefox %> minimum) and <%= meta.name %> may not operate correctly.", 30 GMver = GM_info.version.split '.'