Merge branch 'bstable'

This commit is contained in:
ccd0 2017-08-10 06:42:25 -07:00
commit dbf0b5979c
4 changed files with 12 additions and 2 deletions

View File

@ -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.

View File

@ -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

View File

@ -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, ->

View File

@ -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