I refuse to support 4chanJS.
This commit is contained in:
parent
6257982bf0
commit
17d7967551
@ -54,7 +54,6 @@
|
||||
'Miscellaneous': {
|
||||
'Catalog Links': [true, 'Turn Navigation links into links to each board\'s catalog.'],
|
||||
'External Catalog': [false, 'Link to external catalog instead of the internal one.'],
|
||||
'Enable 4chan\'s Extension': [false, 'Compatibility between 4chan X and 4chan\'s inline extension is NOT guaranteed.'],
|
||||
'Custom Board Navigation': [true, 'Show custom links instead of the full board list.'],
|
||||
'Announcement Hiding': [true, 'Add button to hide 4chan announcements.'],
|
||||
'404 Redirect': [true, 'Redirect dead threads and images.'],
|
||||
@ -4442,11 +4441,7 @@
|
||||
}
|
||||
Main.callbackNodes(Post, posts);
|
||||
$.after(a, nodes);
|
||||
if (Conf['Enable 4chan\'s Extension']) {
|
||||
return $.globalEval("Parser.parseThread(" + thread.ID + ", 1, " + nodes.length + ")");
|
||||
} else {
|
||||
return Fourchan.parseThread(thread.ID, 1, nodes.length);
|
||||
}
|
||||
return Fourchan.parseThread(thread.ID, 1, nodes.length);
|
||||
}
|
||||
};
|
||||
|
||||
@ -4680,7 +4675,7 @@
|
||||
};
|
||||
},
|
||||
setBoardList: function() {
|
||||
var a, btn, customBoardList, fullBoardList, nav;
|
||||
var a, btn, customBoardList, fullBoardList, nav, settings;
|
||||
|
||||
Header.nav = nav = $.id('boardNavDesktop');
|
||||
if (a = $("a[href*='/" + g.BOARD + "/']", nav)) {
|
||||
@ -4699,9 +4694,9 @@
|
||||
$.sync('Boards Navigation', Header.changeBarPosition);
|
||||
Header.setBarVisibility(Conf['Header auto-hide']);
|
||||
$.sync('Header auto-hide', Header.setBarVisibility);
|
||||
$.after(nav, $.id('navtopright'));
|
||||
settings = $.id('navtopright');
|
||||
$.add(fullBoardList, __slice.call(nav.childNodes));
|
||||
$.add(nav, [Header.menuButton, customBoardList, fullBoardList, Header.shortcuts, Header.bar, Header.toggle]);
|
||||
$.add(nav, [Header.menuButton, customBoardList, fullBoardList, Header.shortcuts, Header.bar, Header.toggle, settings]);
|
||||
if (Conf['Custom Board Navigation']) {
|
||||
Header.generateBoardList(Conf['boardnav']);
|
||||
$.sync('boardnav', Header.generateBoardList);
|
||||
@ -6142,11 +6137,7 @@
|
||||
|
||||
threadID = ThreadUpdater.thread.ID;
|
||||
length = $$('.thread > .postContainer', ThreadUpdater.root).length;
|
||||
if (Conf['Enable 4chan\'s Extension']) {
|
||||
return $.globalEval("Parser.parseThread(" + threadID + ", " + (-count) + ")");
|
||||
} else {
|
||||
return Fourchan.parseThread(threadID, length - count, length);
|
||||
}
|
||||
return Fourchan.parseThread(threadID, length - count, length);
|
||||
});
|
||||
}
|
||||
return $.event('ThreadUpdate', {
|
||||
@ -8465,7 +8456,7 @@
|
||||
return $.asap((function() {
|
||||
return $.id('boardNavMobile');
|
||||
}), function() {
|
||||
return $.prepend($.id('navtopright'), [$.tn(' ['), link, $.tn('] ')]);
|
||||
return $.replace($.id('settingsWindowLink'), link);
|
||||
});
|
||||
});
|
||||
$.get('previousversion', null, function(item) {
|
||||
@ -8499,9 +8490,6 @@
|
||||
$.on(d, 'OpenSettings', function(e) {
|
||||
return Settings.open(e.detail);
|
||||
});
|
||||
if (Conf['Enable 4chan\'s Extension']) {
|
||||
return;
|
||||
}
|
||||
settings = JSON.parse(localStorage.getItem('4chan-settings')) || {};
|
||||
if (settings.disableAll) {
|
||||
return;
|
||||
|
||||
@ -54,7 +54,6 @@
|
||||
'Miscellaneous': {
|
||||
'Catalog Links': [true, 'Turn Navigation links into links to each board\'s catalog.'],
|
||||
'External Catalog': [false, 'Link to external catalog instead of the internal one.'],
|
||||
'Enable 4chan\'s Extension': [false, 'Compatibility between 4chan X and 4chan\'s inline extension is NOT guaranteed.'],
|
||||
'Custom Board Navigation': [true, 'Show custom links instead of the full board list.'],
|
||||
'Announcement Hiding': [true, 'Add button to hide 4chan announcements.'],
|
||||
'404 Redirect': [true, 'Redirect dead threads and images.'],
|
||||
@ -4434,11 +4433,7 @@
|
||||
}
|
||||
Main.callbackNodes(Post, posts);
|
||||
$.after(a, nodes);
|
||||
if (Conf['Enable 4chan\'s Extension']) {
|
||||
return $.globalEval("Parser.parseThread(" + thread.ID + ", 1, " + nodes.length + ")");
|
||||
} else {
|
||||
return Fourchan.parseThread(thread.ID, 1, nodes.length);
|
||||
}
|
||||
return Fourchan.parseThread(thread.ID, 1, nodes.length);
|
||||
}
|
||||
};
|
||||
|
||||
@ -4672,7 +4667,7 @@
|
||||
};
|
||||
},
|
||||
setBoardList: function() {
|
||||
var a, btn, customBoardList, fullBoardList, nav;
|
||||
var a, btn, customBoardList, fullBoardList, nav, settings;
|
||||
|
||||
Header.nav = nav = $.id('boardNavDesktop');
|
||||
if (a = $("a[href*='/" + g.BOARD + "/']", nav)) {
|
||||
@ -4691,9 +4686,9 @@
|
||||
$.sync('Boards Navigation', Header.changeBarPosition);
|
||||
Header.setBarVisibility(Conf['Header auto-hide']);
|
||||
$.sync('Header auto-hide', Header.setBarVisibility);
|
||||
$.after(nav, $.id('navtopright'));
|
||||
settings = $.id('navtopright');
|
||||
$.add(fullBoardList, __slice.call(nav.childNodes));
|
||||
$.add(nav, [Header.menuButton, customBoardList, fullBoardList, Header.shortcuts, Header.bar, Header.toggle]);
|
||||
$.add(nav, [Header.menuButton, customBoardList, fullBoardList, Header.shortcuts, Header.bar, Header.toggle, settings]);
|
||||
if (Conf['Custom Board Navigation']) {
|
||||
Header.generateBoardList(Conf['boardnav']);
|
||||
$.sync('boardnav', Header.generateBoardList);
|
||||
@ -6134,11 +6129,7 @@
|
||||
|
||||
threadID = ThreadUpdater.thread.ID;
|
||||
length = $$('.thread > .postContainer', ThreadUpdater.root).length;
|
||||
if (Conf['Enable 4chan\'s Extension']) {
|
||||
return $.globalEval("Parser.parseThread(" + threadID + ", " + (-count) + ")");
|
||||
} else {
|
||||
return Fourchan.parseThread(threadID, length - count, length);
|
||||
}
|
||||
return Fourchan.parseThread(threadID, length - count, length);
|
||||
});
|
||||
}
|
||||
return $.event('ThreadUpdate', {
|
||||
@ -8482,7 +8473,7 @@
|
||||
return $.asap((function() {
|
||||
return $.id('boardNavMobile');
|
||||
}), function() {
|
||||
return $.prepend($.id('navtopright'), [$.tn(' ['), link, $.tn('] ')]);
|
||||
return $.replace($.id('settingsWindowLink'), link);
|
||||
});
|
||||
});
|
||||
$.get('previousversion', null, function(item) {
|
||||
@ -8516,9 +8507,6 @@
|
||||
$.on(d, 'OpenSettings', function(e) {
|
||||
return Settings.open(e.detail);
|
||||
});
|
||||
if (Conf['Enable 4chan\'s Extension']) {
|
||||
return;
|
||||
}
|
||||
settings = JSON.parse(localStorage.getItem('4chan-settings')) || {};
|
||||
if (settings.disableAll) {
|
||||
return;
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
'Miscellaneous': {
|
||||
'Catalog Links': [true, 'Turn Navigation links into links to each board\'s catalog.'],
|
||||
'External Catalog': [false, 'Link to external catalog instead of the internal one.'],
|
||||
'Enable 4chan\'s Extension': [false, 'Compatibility between 4chan X and 4chan\'s inline extension is NOT guaranteed.'],
|
||||
'Custom Board Navigation': [true, 'Show custom links instead of the full board list.'],
|
||||
'Announcement Hiding': [true, 'Add button to hide 4chan announcements.'],
|
||||
'404 Redirect': [true, 'Redirect dead threads and images.'],
|
||||
@ -4355,11 +4354,7 @@
|
||||
}
|
||||
Main.callbackNodes(Post, posts);
|
||||
$.after(a, nodes);
|
||||
if (Conf['Enable 4chan\'s Extension']) {
|
||||
return $.globalEval("Parser.parseThread(" + thread.ID + ", 1, " + nodes.length + ")");
|
||||
} else {
|
||||
return Fourchan.parseThread(thread.ID, 1, nodes.length);
|
||||
}
|
||||
return Fourchan.parseThread(thread.ID, 1, nodes.length);
|
||||
}
|
||||
};
|
||||
|
||||
@ -4593,7 +4588,7 @@
|
||||
};
|
||||
},
|
||||
setBoardList: function() {
|
||||
var a, btn, customBoardList, fullBoardList, nav;
|
||||
var a, btn, customBoardList, fullBoardList, nav, settings;
|
||||
|
||||
Header.nav = nav = $.id('boardNavDesktop');
|
||||
if (a = $("a[href*='/" + g.BOARD + "/']", nav)) {
|
||||
@ -4612,9 +4607,9 @@
|
||||
$.sync('Boards Navigation', Header.changeBarPosition);
|
||||
Header.setBarVisibility(Conf['Header auto-hide']);
|
||||
$.sync('Header auto-hide', Header.setBarVisibility);
|
||||
$.after(nav, $.id('navtopright'));
|
||||
settings = $.id('navtopright');
|
||||
$.add(fullBoardList, __slice.call(nav.childNodes));
|
||||
$.add(nav, [Header.menuButton, customBoardList, fullBoardList, Header.shortcuts, Header.bar, Header.toggle]);
|
||||
$.add(nav, [Header.menuButton, customBoardList, fullBoardList, Header.shortcuts, Header.bar, Header.toggle, settings]);
|
||||
if (Conf['Custom Board Navigation']) {
|
||||
Header.generateBoardList(Conf['boardnav']);
|
||||
$.sync('boardnav', Header.generateBoardList);
|
||||
@ -6055,11 +6050,7 @@
|
||||
|
||||
threadID = ThreadUpdater.thread.ID;
|
||||
length = $$('.thread > .postContainer', ThreadUpdater.root).length;
|
||||
if (Conf['Enable 4chan\'s Extension']) {
|
||||
return $.globalEval("Parser.parseThread(" + threadID + ", " + (-count) + ")");
|
||||
} else {
|
||||
return Fourchan.parseThread(threadID, length - count, length);
|
||||
}
|
||||
return Fourchan.parseThread(threadID, length - count, length);
|
||||
});
|
||||
}
|
||||
return $.event('ThreadUpdate', {
|
||||
@ -8384,7 +8375,7 @@
|
||||
return $.asap((function() {
|
||||
return $.id('boardNavMobile');
|
||||
}), function() {
|
||||
return $.prepend($.id('navtopright'), [$.tn(' ['), link, $.tn('] ')]);
|
||||
return $.replace($.id('settingsWindowLink'), link);
|
||||
});
|
||||
});
|
||||
$.get('previousversion', null, function(item) {
|
||||
@ -8418,9 +8409,6 @@
|
||||
$.on(d, 'OpenSettings', function(e) {
|
||||
return Settings.open(e.detail);
|
||||
});
|
||||
if (Conf['Enable 4chan\'s Extension']) {
|
||||
return;
|
||||
}
|
||||
settings = JSON.parse(localStorage.getItem('4chan-settings')) || {};
|
||||
if (settings.disableAll) {
|
||||
return;
|
||||
|
||||
@ -9,10 +9,6 @@ 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.'
|
||||
|
||||
@ -94,8 +94,5 @@ ExpandThread =
|
||||
Main.callbackNodes Post, posts
|
||||
$.after a, nodes
|
||||
|
||||
# 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
|
||||
# 4chan features.
|
||||
Fourchan.parseThread thread.ID, 1, nodes.length
|
||||
@ -82,10 +82,10 @@ Header =
|
||||
Header.setBarVisibility Conf['Header auto-hide']
|
||||
$.sync 'Header auto-hide', Header.setBarVisibility
|
||||
|
||||
$.after nav, $.id 'navtopright'
|
||||
settings = $.id 'navtopright'
|
||||
|
||||
$.add fullBoardList, [nav.childNodes...]
|
||||
$.add nav, [Header.menuButton, customBoardList, fullBoardList, Header.shortcuts, Header.bar, Header.toggle]
|
||||
$.add nav, [Header.menuButton, customBoardList, fullBoardList, Header.shortcuts, Header.bar, Header.toggle, settings]
|
||||
|
||||
if Conf['Custom Board Navigation']
|
||||
Header.generateBoardList Conf['boardnav']
|
||||
|
||||
@ -289,10 +289,7 @@ ThreadUpdater =
|
||||
# Enable 4chan features.
|
||||
threadID = ThreadUpdater.thread.ID
|
||||
{length} = $$ '.thread > .postContainer', ThreadUpdater.root
|
||||
if Conf['Enable 4chan\'s Extension']
|
||||
$.globalEval "Parser.parseThread(#{threadID}, #{-count})"
|
||||
else
|
||||
Fourchan.parseThread threadID, length - count, length
|
||||
Fourchan.parseThread threadID, length - count, length
|
||||
|
||||
$.event 'ThreadUpdate',
|
||||
404: false
|
||||
|
||||
@ -12,7 +12,7 @@ Settings =
|
||||
# Wait for #boardNavMobile instead of #boardNavDesktop,
|
||||
# it might be incomplete otherwise.
|
||||
$.asap (-> $.id 'boardNavMobile'), ->
|
||||
$.prepend $.id('navtopright'), [$.tn(' ['), link, $.tn('] ')]
|
||||
$.replace $.id('settingsWindowLink'), link
|
||||
|
||||
$.get 'previousversion', null, (item) ->
|
||||
if previous = item['previousversion']
|
||||
@ -40,7 +40,6 @@ 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