Don't break 4chan's script.
This commit is contained in:
parent
bfbfcf1de9
commit
6f94156cd8
@ -2531,16 +2531,13 @@
|
|||||||
|
|
||||||
Options = {
|
Options = {
|
||||||
init: function() {
|
init: function() {
|
||||||
var a, home, _i, _len, _ref;
|
var a, settings, _i, _len, _ref;
|
||||||
_ref = [$.id('navtopr'), $.id('navbotr')];
|
_ref = [$.id('navtopr'), $.id('navbotr')];
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
home = _ref[_i];
|
settings = _ref[_i];
|
||||||
a = $.el('a', {
|
a = settings.firstElementChild;
|
||||||
textContent: '4chan X Settings',
|
a.textContent = '4chan X Settings';
|
||||||
href: 'javascript:;'
|
|
||||||
});
|
|
||||||
$.on(a, 'click', Options.dialog);
|
$.on(a, 'click', Options.dialog);
|
||||||
$.replace(home.firstElementChild, a);
|
|
||||||
}
|
}
|
||||||
if (!$.get('firstrun')) {
|
if (!$.get('firstrun')) {
|
||||||
if (!Favicon.el) {
|
if (!Favicon.el) {
|
||||||
@ -2550,8 +2547,11 @@
|
|||||||
return Options.dialog();
|
return Options.dialog();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dialog: function() {
|
dialog: function(e) {
|
||||||
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;
|
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;
|
||||||
|
if (e != null) {
|
||||||
|
e.stopImmediatePropagation();
|
||||||
|
}
|
||||||
dialog = $.el('div', {
|
dialog = $.el('div', {
|
||||||
id: 'options',
|
id: 'options',
|
||||||
className: 'reply dialog',
|
className: 'reply dialog',
|
||||||
|
|||||||
@ -1988,19 +1988,18 @@ QR =
|
|||||||
|
|
||||||
Options =
|
Options =
|
||||||
init: ->
|
init: ->
|
||||||
for home in [$.id('navtopr'), $.id('navbotr')]
|
for settings in [$.id('navtopr'), $.id('navbotr')]
|
||||||
a = $.el 'a',
|
a = settings.firstElementChild
|
||||||
textContent: '4chan X Settings'
|
a.textContent = '4chan X Settings'
|
||||||
href: 'javascript:;'
|
|
||||||
$.on a, 'click', Options.dialog
|
$.on a, 'click', Options.dialog
|
||||||
$.replace home.firstElementChild, a
|
|
||||||
unless $.get 'firstrun'
|
unless $.get 'firstrun'
|
||||||
# Prevent race conditions
|
# Prevent race conditions
|
||||||
Favicon.init() unless Favicon.el
|
Favicon.init() unless Favicon.el
|
||||||
$.set 'firstrun', true
|
$.set 'firstrun', true
|
||||||
Options.dialog()
|
Options.dialog()
|
||||||
|
|
||||||
dialog: ->
|
dialog: (e) ->
|
||||||
|
e?.stopImmediatePropagation()
|
||||||
dialog = $.el 'div'
|
dialog = $.el 'div'
|
||||||
id: 'options'
|
id: 'options'
|
||||||
className: 'reply dialog'
|
className: 'reply dialog'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user