Refactor options.init.
This commit is contained in:
parent
7e4435d1c2
commit
eb0b2399b6
@ -1994,21 +1994,17 @@
|
|||||||
|
|
||||||
options = {
|
options = {
|
||||||
init: function() {
|
init: function() {
|
||||||
var a, home;
|
var a, home, _i, _len, _ref;
|
||||||
home = $('#navtopr a');
|
_ref = [$.id('navtopr'), $.id('navbotr')];
|
||||||
a = $.el('a', {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
textContent: '4chan X',
|
home = _ref[_i];
|
||||||
href: 'javascript:;'
|
a = $.el('a', {
|
||||||
});
|
textContent: '4chan X',
|
||||||
$.on(a, 'click', options.dialog);
|
href: 'javascript:;'
|
||||||
$.replace(home, a);
|
});
|
||||||
home = $('#navbotr a');
|
$.on(a, 'click', options.dialog);
|
||||||
a = $.el('a', {
|
$.replace(home.firstElementChild, a);
|
||||||
textContent: '4chan X',
|
}
|
||||||
href: 'javascript:;'
|
|
||||||
});
|
|
||||||
$.on(a, 'click', options.dialog);
|
|
||||||
$.replace(home, a);
|
|
||||||
if (!$.get('firstrun')) {
|
if (!$.get('firstrun')) {
|
||||||
$.set('firstrun', true);
|
$.set('firstrun', true);
|
||||||
return options.dialog();
|
return options.dialog();
|
||||||
|
|||||||
@ -1539,18 +1539,12 @@ qr =
|
|||||||
|
|
||||||
options =
|
options =
|
||||||
init: ->
|
init: ->
|
||||||
home = $ '#navtopr a'
|
for home in [$.id('navtopr'), $.id('navbotr')]
|
||||||
a = $.el 'a',
|
a = $.el 'a',
|
||||||
textContent: '4chan X'
|
textContent: '4chan X'
|
||||||
href: 'javascript:;'
|
href: 'javascript:;'
|
||||||
$.on a, 'click', options.dialog
|
$.on a, 'click', options.dialog
|
||||||
$.replace home, a
|
$.replace home.firstElementChild, a
|
||||||
home = $ '#navbotr a'
|
|
||||||
a = $.el 'a',
|
|
||||||
textContent: '4chan X'
|
|
||||||
href: 'javascript:;'
|
|
||||||
$.on a, 'click', options.dialog
|
|
||||||
$.replace home, a
|
|
||||||
unless $.get 'firstrun'
|
unless $.get 'firstrun'
|
||||||
$.set 'firstrun', true
|
$.set 'firstrun', true
|
||||||
options.dialog()
|
options.dialog()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user