Add a notice that v2 is outdated.
This commit is contained in:
parent
95427e247e
commit
996878b509
@ -2690,7 +2690,7 @@
|
|||||||
return $.ready(Options.initReady);
|
return $.ready(Options.initReady);
|
||||||
},
|
},
|
||||||
initReady: function() {
|
initReady: function() {
|
||||||
var a, setting, settings, _i, _len, _ref;
|
var a, notice, setting, settings, _i, _len, _ref;
|
||||||
_ref = ['navtopright', 'navbotright'];
|
_ref = ['navtopright', 'navbotright'];
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
settings = _ref[_i];
|
settings = _ref[_i];
|
||||||
@ -2702,10 +2702,17 @@
|
|||||||
$.on(a, 'click', Options.dialog);
|
$.on(a, 'click', Options.dialog);
|
||||||
setting = $.id(settings);
|
setting = $.id(settings);
|
||||||
if (Conf['Disable 4chan\'s extension']) {
|
if (Conf['Disable 4chan\'s extension']) {
|
||||||
$.replace(setting.childNodes[1], a);
|
$.replace(setting.firstElementChild, a);
|
||||||
continue;
|
} else {
|
||||||
|
$.prepend(setting, [$.tn('['), a, $.tn('] ')]);
|
||||||
}
|
}
|
||||||
$.prepend(setting, [$.tn('['), a, $.tn('] ')]);
|
notice = $.el('a', {
|
||||||
|
textContent: 'v2 is outdated.',
|
||||||
|
href: 'https://4chan-x.just-believe.in/',
|
||||||
|
target: '_blank'
|
||||||
|
});
|
||||||
|
notice.style.color = 'red';
|
||||||
|
$.prepend(setting, [$.tn('['), notice, $.tn('] ')]);
|
||||||
}
|
}
|
||||||
if (!$.get('firstrun')) {
|
if (!$.get('firstrun')) {
|
||||||
$.set('firstrun', true);
|
$.set('firstrun', true);
|
||||||
|
|||||||
@ -2155,9 +2155,15 @@ Options =
|
|||||||
$.on a, 'click', Options.dialog
|
$.on a, 'click', Options.dialog
|
||||||
setting = $.id settings
|
setting = $.id settings
|
||||||
if Conf['Disable 4chan\'s extension']
|
if Conf['Disable 4chan\'s extension']
|
||||||
$.replace setting.childNodes[1], a
|
$.replace setting.firstElementChild, a
|
||||||
continue
|
else
|
||||||
$.prepend setting, [$.tn('['), a, $.tn('] ')]
|
$.prepend setting, [$.tn('['), a, $.tn('] ')]
|
||||||
|
notice = $.el 'a',
|
||||||
|
textContent: 'v2 is outdated.'
|
||||||
|
href: 'https://4chan-x.just-believe.in/'
|
||||||
|
target: '_blank'
|
||||||
|
notice.style.color = 'red'
|
||||||
|
$.prepend setting, [$.tn('['), notice, $.tn('] ')]
|
||||||
unless $.get 'firstrun'
|
unless $.get 'firstrun'
|
||||||
$.set 'firstrun', true
|
$.set 'firstrun', true
|
||||||
# Prevent race conditions
|
# Prevent race conditions
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user