Actually, I don't need to remove it to not support it.
This commit is contained in:
parent
17d7967551
commit
29b1f20387
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -9,6 +9,10 @@ Config =
|
||||
false
|
||||
'Link to external catalog instead of the internal one.'
|
||||
]
|
||||
'Enable 4chan\'s Extension': [
|
||||
false
|
||||
'Compatibility between <%= meta.name %> and 4chan\'s inline extension is NOT guaranteed.'
|
||||
]
|
||||
'Custom Board Navigation': [
|
||||
true
|
||||
'Show custom links instead of the full board list.'
|
||||
|
||||
@ -194,8 +194,8 @@ a[href="javascript:;"] {
|
||||
.expand-all-shortcut {
|
||||
opacity: .45;
|
||||
}
|
||||
#navtopright a {
|
||||
text-decoration: none;
|
||||
#navtopright {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Notifications */
|
||||
|
||||
@ -94,5 +94,8 @@ ExpandThread =
|
||||
Main.callbackNodes Post, posts
|
||||
$.after a, nodes
|
||||
|
||||
# 4chan features.
|
||||
Fourchan.parseThread thread.ID, 1, nodes.length
|
||||
# Enable 4chan features.
|
||||
if Conf['Enable 4chan\'s Extension']
|
||||
$.globalEval "Parser.parseThread(#{thread.ID}, 1, #{nodes.length})"
|
||||
else
|
||||
Fourchan.parseThread thread.ID, 1, nodes.length
|
||||
@ -55,6 +55,9 @@ Header =
|
||||
|
||||
toggle: $.el 'div',
|
||||
id: 'toggle-header-bar'
|
||||
|
||||
settings: $.el 'div',
|
||||
id: 'settingsContainer'
|
||||
|
||||
createSubEntry: (setting)->
|
||||
label = $.el 'label',
|
||||
@ -71,10 +74,6 @@ Header =
|
||||
|
||||
fullBoardList = $.el 'span',
|
||||
id: 'full-board-list'
|
||||
hidden: true
|
||||
|
||||
customBoardList = $.el 'span',
|
||||
id: 'custom-board-list'
|
||||
|
||||
Header.setBarPosition.call textContent: "#{Conf['Boards Navigation']}"
|
||||
$.sync 'Boards Navigation', Header.changeBarPosition
|
||||
@ -82,21 +81,26 @@ Header =
|
||||
Header.setBarVisibility Conf['Header auto-hide']
|
||||
$.sync 'Header auto-hide', Header.setBarVisibility
|
||||
|
||||
settings = $.id 'navtopright'
|
||||
|
||||
$.add fullBoardList, [nav.childNodes...]
|
||||
$.add nav, [Header.menuButton, customBoardList, fullBoardList, Header.shortcuts, Header.bar, Header.toggle, settings]
|
||||
$.add nav, [Header.menuButton, fullBoardList, Header.shortcuts, Header.bar, Header.toggle, Header.settings]
|
||||
|
||||
if Conf['Custom Board Navigation']
|
||||
fullBoardList.hidden = true
|
||||
customBoardList = $.el 'span',
|
||||
id: 'custom-board-list'
|
||||
|
||||
Header.generateBoardList Conf['boardnav']
|
||||
$.sync 'boardnav', Header.generateBoardList
|
||||
|
||||
btn = $.el 'span',
|
||||
className: 'hide-board-list-button'
|
||||
innerHTML: '[<a href=javascript:;> - </a>]\u00A0'
|
||||
$.on btn, 'click', Header.toggleBoardList
|
||||
|
||||
$.prepend fullBoardList, btn
|
||||
$.before fullBoardList, customBoardList
|
||||
|
||||
else
|
||||
$.rm $ '#custom-board-list', nav
|
||||
fullBoardList.hidden = false
|
||||
|
||||
generateBoardList: (text) ->
|
||||
|
||||
@ -289,7 +289,10 @@ ThreadUpdater =
|
||||
# Enable 4chan features.
|
||||
threadID = ThreadUpdater.thread.ID
|
||||
{length} = $$ '.thread > .postContainer', ThreadUpdater.root
|
||||
Fourchan.parseThread threadID, length - count, length
|
||||
if Conf['Enable 4chan\'s Extension']
|
||||
$.globalEval "Parser.parseThread(#{threadID}, #{-count})"
|
||||
else
|
||||
Fourchan.parseThread threadID, length - count, length
|
||||
|
||||
$.event 'ThreadUpdate',
|
||||
404: false
|
||||
|
||||
@ -7,12 +7,7 @@ Settings =
|
||||
href: 'javascript:;'
|
||||
$.on link, 'click', Settings.open
|
||||
|
||||
$.asap (-> d.body), ->
|
||||
return unless Main.isThisPageLegit()
|
||||
# Wait for #boardNavMobile instead of #boardNavDesktop,
|
||||
# it might be incomplete otherwise.
|
||||
$.asap (-> $.id 'boardNavMobile'), ->
|
||||
$.replace $.id('settingsWindowLink'), link
|
||||
$.add Header.settings, [$.tn(' ['), link, $.tn('] ')]
|
||||
|
||||
$.get 'previousversion', null, (item) ->
|
||||
if previous = item['previousversion']
|
||||
@ -40,6 +35,7 @@ Settings =
|
||||
$.on d, 'AddSettingsSection', Settings.addSection
|
||||
$.on d, 'OpenSettings', (e) -> Settings.open e.detail
|
||||
|
||||
return if Conf['Enable 4chan\'s Extension']
|
||||
settings = JSON.parse(localStorage.getItem '4chan-settings') or {}
|
||||
return if settings.disableAll
|
||||
settings.disableAll = true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user