Make disabling the native extension optional. #61
This commit is contained in:
parent
108920c536
commit
1d47e2d4be
@ -108,7 +108,10 @@ Config =
|
||||
false
|
||||
'Prevent sounds on the page from autoplaying.'
|
||||
]
|
||||
|
||||
'Disable Native Extension': [
|
||||
true
|
||||
'<%= meta.name %> is NOT designed to work with the native extension.'
|
||||
]
|
||||
'Linkification':
|
||||
'Linkify': [
|
||||
true
|
||||
|
||||
@ -96,15 +96,17 @@ Header =
|
||||
if a = $ "a[href*='/#{g.BOARD}/']", footer
|
||||
a.className = 'current'
|
||||
|
||||
cs = $.el 'a',
|
||||
href: 'javascript:;'
|
||||
title: 'Catalog Settings'
|
||||
className: 'fa fa-book'
|
||||
textContent: 'Catalog Settings'
|
||||
$.on cs, 'click', () ->
|
||||
$.id('settingsWindowLink').click()
|
||||
|
||||
@addShortcut cs if g.VIEW is 'catalog'
|
||||
if g.VIEW is 'catalog' or !Conf['Disable Native Extension']
|
||||
cs = $.el 'a', href: 'javascript:;'
|
||||
if g.VIEW is 'catalog'
|
||||
cs.title = cs.textContent = 'Catalog Settings'
|
||||
cs.className = 'fa fa-book'
|
||||
else
|
||||
cs.title = cs.textContent = '4chan Settings'
|
||||
cs.className = 'fa fa-leaf'
|
||||
$.on cs, 'click', () ->
|
||||
$.id('settingsWindowLink').click()
|
||||
@addShortcut cs
|
||||
|
||||
Header.setFooterVisibility Conf['Bottom Board List']
|
||||
$.sync 'Bottom Board List', Header.setFooterVisibility
|
||||
|
||||
@ -19,10 +19,11 @@ Settings =
|
||||
$.on d, 'AddSettingsSection', Settings.addSection
|
||||
$.on d, 'OpenSettings', (e) -> Settings.open e.detail
|
||||
|
||||
settings = JSON.parse(localStorage.getItem '4chan-settings') or {}
|
||||
return if settings.disableAll
|
||||
settings.disableAll = true
|
||||
localStorage.setItem '4chan-settings', JSON.stringify settings
|
||||
if Conf['Disable Native Extension']
|
||||
settings = JSON.parse(localStorage.getItem '4chan-settings') or {}
|
||||
return if settings.disableAll
|
||||
settings.disableAll = true
|
||||
localStorage.setItem '4chan-settings', JSON.stringify settings
|
||||
|
||||
open: (openSection) ->
|
||||
return if Settings.dialog
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user