Don't break 4chan's script.

This commit is contained in:
Nicolas Stepien 2012-07-10 23:34:44 +02:00
parent bfbfcf1de9
commit 6f94156cd8
2 changed files with 13 additions and 14 deletions

View File

@ -2531,16 +2531,13 @@
Options = {
init: function() {
var a, home, _i, _len, _ref;
var a, settings, _i, _len, _ref;
_ref = [$.id('navtopr'), $.id('navbotr')];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
home = _ref[_i];
a = $.el('a', {
textContent: '4chan X Settings',
href: 'javascript:;'
});
settings = _ref[_i];
a = settings.firstElementChild;
a.textContent = '4chan X Settings';
$.on(a, 'click', Options.dialog);
$.replace(home.firstElementChild, a);
}
if (!$.get('firstrun')) {
if (!Favicon.el) {
@ -2550,8 +2547,11 @@
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;
if (e != null) {
e.stopImmediatePropagation();
}
dialog = $.el('div', {
id: 'options',
className: 'reply dialog',

View File

@ -1988,19 +1988,18 @@ QR =
Options =
init: ->
for home in [$.id('navtopr'), $.id('navbotr')]
a = $.el 'a',
textContent: '4chan X Settings'
href: 'javascript:;'
for settings in [$.id('navtopr'), $.id('navbotr')]
a = settings.firstElementChild
a.textContent = '4chan X Settings'
$.on a, 'click', Options.dialog
$.replace home.firstElementChild, a
unless $.get 'firstrun'
# Prevent race conditions
Favicon.init() unless Favicon.el
$.set 'firstrun', true
Options.dialog()
dialog: ->
dialog: (e) ->
e?.stopImmediatePropagation()
dialog = $.el 'div'
id: 'options'
className: 'reply dialog'