Actually disable 4chan's inline extension on first-run before it had the time to execute.
This commit is contained in:
parent
614972640a
commit
5469bdf664
@ -2540,6 +2540,19 @@
|
||||
|
||||
Options = {
|
||||
init: function() {
|
||||
if (!$.get('firstrun')) {
|
||||
$.set('firstrun', true);
|
||||
localStorage.setItem('4chan-settings', '{"disableAll":true}');
|
||||
$.ready(function() {
|
||||
if (!Favicon.el) {
|
||||
Favicon.init();
|
||||
}
|
||||
return Options.dialog();
|
||||
});
|
||||
}
|
||||
return $.ready(Options.initReady);
|
||||
},
|
||||
initReady: function() {
|
||||
var a, settings, _i, _len, _ref;
|
||||
_ref = ['navtopright', 'navbotright'];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
@ -2552,13 +2565,6 @@
|
||||
$.on(a, 'click', Options.dialog);
|
||||
$.prepend($.id(settings), [$.tn('['), a, $.tn('] ')]);
|
||||
}
|
||||
if (!$.get('firstrun')) {
|
||||
if (!Favicon.el) {
|
||||
Favicon.init();
|
||||
}
|
||||
$.set('firstrun', true);
|
||||
return Options.dialog();
|
||||
}
|
||||
},
|
||||
dialog: function() {
|
||||
var arr, back, checked, description, dialog, favicon, fileInfo, filter, hiddenNum, hiddenThreads, indicator, indicators, input, key, li, obj, overlay, sauce, time, tr, ul, _i, _len, _ref, _ref1, _ref2;
|
||||
@ -4972,7 +4978,7 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
$.ready(Options.init);
|
||||
Options.init();
|
||||
if (Conf['Quick Reply'] && Conf['Hide Original Post Form']) {
|
||||
Main.css += '#postForm { display: none; }';
|
||||
}
|
||||
|
||||
@ -1995,6 +1995,15 @@ QR =
|
||||
|
||||
Options =
|
||||
init: ->
|
||||
unless $.get 'firstrun'
|
||||
$.set 'firstrun', true
|
||||
localStorage.setItem '4chan-settings', '{"disableAll":true}'
|
||||
$.ready ->
|
||||
# Prevent race conditions
|
||||
Favicon.init() unless Favicon.el
|
||||
Options.dialog()
|
||||
$.ready Options.initReady
|
||||
initReady: ->
|
||||
for settings in ['navtopright', 'navbotright']
|
||||
a = $.el 'a',
|
||||
href: 'javascript:;'
|
||||
@ -2002,12 +2011,7 @@ Options =
|
||||
textContent: '4chan X Settings'
|
||||
$.on a, 'click', Options.dialog
|
||||
$.prepend $.id(settings), [$.tn('['), a, $.tn('] ')]
|
||||
unless $.get 'firstrun'
|
||||
# Prevent race conditions
|
||||
Favicon.init() unless Favicon.el
|
||||
$.set 'firstrun', true
|
||||
Options.dialog()
|
||||
localStorage.setItem '4chan-settings', '{"disableAll":true}'
|
||||
return
|
||||
|
||||
dialog: ->
|
||||
dialog = $.el 'div'
|
||||
@ -3872,7 +3876,7 @@ Main =
|
||||
location.href = url if url
|
||||
return
|
||||
|
||||
$.ready Options.init
|
||||
Options.init()
|
||||
|
||||
if Conf['Quick Reply'] and Conf['Hide Original Post Form']
|
||||
Main.css += '#postForm { display: none; }'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user