Thread/Reply Hiding Buttons -> Hiding Buttons
Enable 4chan's extension -> Enable 4chan's Extension
This commit is contained in:
parent
5f9abaca0a
commit
7aacc95f20
@ -51,7 +51,7 @@
|
|||||||
Config = {
|
Config = {
|
||||||
main: {
|
main: {
|
||||||
'Miscellaneous': {
|
'Miscellaneous': {
|
||||||
'Enable 4chan\'s extension': [false, 'Compatibility between 4chan X Beta and 4chan\'s inline extension is NOT guaranteed.'],
|
'Enable 4chan\'s Extension': [false, 'Compatibility between 4chan X Beta and 4chan\'s inline extension is NOT guaranteed.'],
|
||||||
'404 Redirect': [true, 'Redirect dead threads and images.'],
|
'404 Redirect': [true, 'Redirect dead threads and images.'],
|
||||||
'Keybinds': [true, 'Bind actions to keyboard shortcuts.'],
|
'Keybinds': [true, 'Bind actions to keyboard shortcuts.'],
|
||||||
'Time Formatting': [true, 'Localize and format timestamps arbitrarily.'],
|
'Time Formatting': [true, 'Localize and format timestamps arbitrarily.'],
|
||||||
@ -68,7 +68,7 @@
|
|||||||
'Recursive Hiding': [true, 'Hide replies of hidden posts, recursively.'],
|
'Recursive Hiding': [true, 'Hide replies of hidden posts, recursively.'],
|
||||||
'Thread Hiding': [true, 'Hide entire threads.'],
|
'Thread Hiding': [true, 'Hide entire threads.'],
|
||||||
'Reply Hiding': [true, 'Hide single replies.'],
|
'Reply Hiding': [true, 'Hide single replies.'],
|
||||||
'Thread/Reply Hiding Buttons': [true, 'Make buttons to hide threads / replies, in addition to menu links.'],
|
'Hiding Buttons': [true, 'Make buttons to hide threads / replies, in addition to menu links.'],
|
||||||
'Stubs': [true, 'Make stubs of hidden threads / replies.']
|
'Stubs': [true, 'Make stubs of hidden threads / replies.']
|
||||||
},
|
},
|
||||||
'Images': {
|
'Images': {
|
||||||
@ -1143,7 +1143,7 @@
|
|||||||
el: link,
|
el: link,
|
||||||
order: 110,
|
order: 110,
|
||||||
open: function() {
|
open: function() {
|
||||||
return Conf['Enable 4chan\'s extension'];
|
return Conf['Enable 4chan\'s Extension'];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!$.get('previousversion')) {
|
if (!$.get('previousversion')) {
|
||||||
@ -1159,7 +1159,7 @@
|
|||||||
$.on(d, 'OpenSettings', function(e) {
|
$.on(d, 'OpenSettings', function(e) {
|
||||||
return Settings.open(e.detail);
|
return Settings.open(e.detail);
|
||||||
});
|
});
|
||||||
if (Conf['Enable 4chan\'s extension']) {
|
if (Conf['Enable 4chan\'s Extension']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
settings = JSON.parse(localStorage.getItem('4chan-settings')) || {};
|
settings = JSON.parse(localStorage.getItem('4chan-settings')) || {};
|
||||||
@ -1890,7 +1890,7 @@
|
|||||||
if (data = ThreadHiding.hiddenThreads.threads[this]) {
|
if (data = ThreadHiding.hiddenThreads.threads[this]) {
|
||||||
ThreadHiding.hide(this, data.makeStub);
|
ThreadHiding.hide(this, data.makeStub);
|
||||||
}
|
}
|
||||||
if (!Conf['Thread/Reply Hiding Buttons']) {
|
if (!Conf['Hiding Buttons']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return $.prepend(this.posts[this].nodes.root, ThreadHiding.makeButton(this, 'hide'));
|
return $.prepend(this.posts[this].nodes.root, ThreadHiding.makeButton(this, 'hide'));
|
||||||
@ -2112,7 +2112,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!Conf['Thread/Reply Hiding Buttons']) {
|
if (!Conf['Hiding Buttons']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return $.replace($('.sideArrows', this.nodes.root), ReplyHiding.makeButton(this, 'hide'));
|
return $.replace($('.sideArrows', this.nodes.root), ReplyHiding.makeButton(this, 'hide'));
|
||||||
@ -4891,7 +4891,7 @@
|
|||||||
}
|
}
|
||||||
Main.callbackNodes(Post, posts);
|
Main.callbackNodes(Post, posts);
|
||||||
$.after(a, nodes);
|
$.after(a, nodes);
|
||||||
if (Conf['Enable 4chan\'s extension']) {
|
if (Conf['Enable 4chan\'s Extension']) {
|
||||||
return $.unsafeWindow.Parser.parseThread(thread.ID, 1, nodes.length);
|
return $.unsafeWindow.Parser.parseThread(thread.ID, 1, nodes.length);
|
||||||
} else {
|
} else {
|
||||||
return Fourchan.parseThread(thread.ID, 1, nodes.length);
|
return Fourchan.parseThread(thread.ID, 1, nodes.length);
|
||||||
@ -5369,7 +5369,7 @@
|
|||||||
var length, threadID;
|
var length, threadID;
|
||||||
threadID = ThreadUpdater.thread.ID;
|
threadID = ThreadUpdater.thread.ID;
|
||||||
length = ThreadUpdater.root.children.length;
|
length = ThreadUpdater.root.children.length;
|
||||||
if (Conf['Enable 4chan\'s extension']) {
|
if (Conf['Enable 4chan\'s Extension']) {
|
||||||
return $.unsafeWindow.Parser.parseThread(threadID, -count);
|
return $.unsafeWindow.Parser.parseThread(threadID, -count);
|
||||||
} else {
|
} else {
|
||||||
return Fourchan.parseThread(threadID, length - count, length);
|
return Fourchan.parseThread(threadID, length - count, length);
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
Config =
|
Config =
|
||||||
main:
|
main:
|
||||||
'Miscellaneous':
|
'Miscellaneous':
|
||||||
'Enable 4chan\'s extension': [false, 'Compatibility between <%= meta.name %> and 4chan\'s inline extension is NOT guaranteed.']
|
'Enable 4chan\'s Extension': [false, 'Compatibility between <%= meta.name %> and 4chan\'s inline extension is NOT guaranteed.']
|
||||||
'404 Redirect': [true, 'Redirect dead threads and images.']
|
'404 Redirect': [true, 'Redirect dead threads and images.']
|
||||||
'Keybinds': [true, 'Bind actions to keyboard shortcuts.']
|
'Keybinds': [true, 'Bind actions to keyboard shortcuts.']
|
||||||
'Time Formatting': [true, 'Localize and format timestamps arbitrarily.']
|
'Time Formatting': [true, 'Localize and format timestamps arbitrarily.']
|
||||||
@ -17,7 +17,7 @@ Config =
|
|||||||
'Recursive Hiding': [true, 'Hide replies of hidden posts, recursively.']
|
'Recursive Hiding': [true, 'Hide replies of hidden posts, recursively.']
|
||||||
'Thread Hiding': [true, 'Hide entire threads.']
|
'Thread Hiding': [true, 'Hide entire threads.']
|
||||||
'Reply Hiding': [true, 'Hide single replies.']
|
'Reply Hiding': [true, 'Hide single replies.']
|
||||||
'Thread/Reply Hiding Buttons': [true, 'Make buttons to hide threads / replies, in addition to menu links.']
|
'Hiding Buttons': [true, 'Make buttons to hide threads / replies, in addition to menu links.']
|
||||||
'Stubs': [true, 'Make stubs of hidden threads / replies.']
|
'Stubs': [true, 'Make stubs of hidden threads / replies.']
|
||||||
'Images':
|
'Images':
|
||||||
'Auto-GIF': [false, 'Animate GIF thumbnails.']
|
'Auto-GIF': [false, 'Animate GIF thumbnails.']
|
||||||
|
|||||||
@ -140,7 +140,7 @@ Settings =
|
|||||||
type: 'header'
|
type: 'header'
|
||||||
el: link
|
el: link
|
||||||
order: 110
|
order: 110
|
||||||
open: -> Conf['Enable 4chan\'s extension']
|
open: -> Conf['Enable 4chan\'s Extension']
|
||||||
|
|
||||||
unless $.get 'previousversion'
|
unless $.get 'previousversion'
|
||||||
$.set 'previousversion', g.VERSION
|
$.set 'previousversion', g.VERSION
|
||||||
@ -154,7 +154,7 @@ 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
|
||||||
|
|
||||||
return if Conf['Enable 4chan\'s extension']
|
return if Conf['Enable 4chan\'s Extension']
|
||||||
settings = JSON.parse(localStorage.getItem '4chan-settings') or {}
|
settings = JSON.parse(localStorage.getItem '4chan-settings') or {}
|
||||||
return if settings.disableAll
|
return if settings.disableAll
|
||||||
settings.disableAll = true
|
settings.disableAll = true
|
||||||
@ -888,7 +888,7 @@ ThreadHiding =
|
|||||||
node: ->
|
node: ->
|
||||||
if data = ThreadHiding.hiddenThreads.threads[@]
|
if data = ThreadHiding.hiddenThreads.threads[@]
|
||||||
ThreadHiding.hide @, data.makeStub
|
ThreadHiding.hide @, data.makeStub
|
||||||
return unless Conf['Thread/Reply Hiding Buttons']
|
return unless Conf['Hiding Buttons']
|
||||||
$.prepend @posts[@].nodes.root, ThreadHiding.makeButton @, 'hide'
|
$.prepend @posts[@].nodes.root, ThreadHiding.makeButton @, 'hide'
|
||||||
|
|
||||||
getHiddenThreads: ->
|
getHiddenThreads: ->
|
||||||
@ -1054,7 +1054,7 @@ ReplyHiding =
|
|||||||
ReplyHiding.hide @, data.makeStub, data.hideRecursively
|
ReplyHiding.hide @, data.makeStub, data.hideRecursively
|
||||||
else
|
else
|
||||||
Recursive.hide @, data.makeStub
|
Recursive.hide @, data.makeStub
|
||||||
return unless Conf['Thread/Reply Hiding Buttons']
|
return unless Conf['Hiding Buttons']
|
||||||
$.replace $('.sideArrows', @nodes.root), ReplyHiding.makeButton @, 'hide'
|
$.replace $('.sideArrows', @nodes.root), ReplyHiding.makeButton @, 'hide'
|
||||||
|
|
||||||
getHiddenPosts: ->
|
getHiddenPosts: ->
|
||||||
@ -3269,7 +3269,7 @@ ExpandThread =
|
|||||||
$.after a, nodes
|
$.after a, nodes
|
||||||
|
|
||||||
# Enable 4chan features.
|
# Enable 4chan features.
|
||||||
if Conf['Enable 4chan\'s extension']
|
if Conf['Enable 4chan\'s Extension']
|
||||||
$.unsafeWindow.Parser.parseThread thread.ID, 1, nodes.length
|
$.unsafeWindow.Parser.parseThread thread.ID, 1, nodes.length
|
||||||
else
|
else
|
||||||
Fourchan.parseThread thread.ID, 1, nodes.length
|
Fourchan.parseThread thread.ID, 1, nodes.length
|
||||||
@ -3660,7 +3660,7 @@ ThreadUpdater =
|
|||||||
# Enable 4chan features.
|
# Enable 4chan features.
|
||||||
threadID = ThreadUpdater.thread.ID
|
threadID = ThreadUpdater.thread.ID
|
||||||
{length} = ThreadUpdater.root.children
|
{length} = ThreadUpdater.root.children
|
||||||
if Conf['Enable 4chan\'s extension']
|
if Conf['Enable 4chan\'s Extension']
|
||||||
$.unsafeWindow.Parser.parseThread threadID, -count
|
$.unsafeWindow.Parser.parseThread threadID, -count
|
||||||
else
|
else
|
||||||
Fourchan.parseThread threadID, length - count, length
|
Fourchan.parseThread threadID, length - count, length
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user