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