diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fa21eace..9a926f303 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ ### v1.13.10 +**v1.13.10.6** *(2017-08-10)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.10.6/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.10.6/builds/4chan-X-noupdate.crx)] +- Disable 'Redirect to HTTPS' on platforms where we use localStorage for saving settings. + **v1.13.10.5** *(2017-08-04)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.10.5/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.10.5/builds/4chan-X-noupdate.crx)] - Better parsing of archive links for Quote Inlining / Hover. - Add Board Tips. diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index 67eea6ce0..0d8c2efdc 100644 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -162,8 +162,12 @@ Settings = addCheckboxes fs, obj $.add section, fs addCheckboxes $('div[data-name="JSON Index"] > .suboption-list', section), Config.Index + + # Unsupported options if $.engine isnt 'gecko' - $('div[data-name="Remember QR Size"]', section).hidden = true # XXX not supported + $('div[data-name="Remember QR Size"]', section).hidden = true + if $.perProtocolSettings + $('div[data-name="Redirect to HTTPS"]', section).hidden = true $.get items, (items) -> for key, val of items diff --git a/src/main/Main.coffee b/src/main/Main.coffee index ca6a1eb04..0aeed1220 100644 --- a/src/main/Main.coffee +++ b/src/main/Main.coffee @@ -72,7 +72,7 @@ Main = items[key] = undefined for key of Conf items['previousversion'] = undefined ($.getSync or $.get) items, (items) -> - if (items['Redirect to HTTPS'] ? Conf['Redirect to HTTPS']) and location.protocol isnt 'https:' + if !$.perProtocolSettings and (items['Redirect to HTTPS'] ? Conf['Redirect to HTTPS']) and location.protocol isnt 'https:' location.replace('https:' + location.host + location.pathname + location.search + location.hash) return $.asap docSet, -> diff --git a/src/platform/$.coffee b/src/platform/$.coffee index e7aef13d1..47caaa74b 100644 --- a/src/platform/$.coffee +++ b/src/platform/$.coffee @@ -510,6 +510,9 @@ $.GM_deleteValue = (key) -> delete $.currentValue[key] GM_deleteValue key +unless GM_deleteValue? + $.perProtocolSettings = true + if GM_deleteValue? $.getValue = $.GM_getValue $.listValues = -> GM_listValues() # error when called if missing