diff --git a/4chan_x.user.js b/4chan_x.user.js index 9995cf96a..1ec1c1bfc 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2540,7 +2540,7 @@ Options = { init: function() { - var a, el, settings, _i, _len, _ref; + var a, settings, _i, _len, _ref; _ref = ['navtopright', 'navbotright']; for (_i = 0, _len = _ref.length; _i < _len; _i++) { settings = _ref[_i]; @@ -2550,8 +2550,7 @@ textContent: '4chan X Settings' }); $.on(a, 'click', Options.dialog); - el = $.id(settings).firstElementChild; - $.before(el, [a, $.tn('] ')]); + $.prepend($.id(settings), [$.tn('['), a, $.tn('] ')]); } if (!$.get('firstrun')) { if (!Favicon.el) { diff --git a/script.coffee b/script.coffee index 6c9a6fa1e..49fbf2ab6 100644 --- a/script.coffee +++ b/script.coffee @@ -2001,8 +2001,7 @@ Options = className: 'settingsWindowLink' textContent: '4chan X Settings' $.on a, 'click', Options.dialog - el = $.id(settings).firstElementChild - $.before el, [a, $.tn('] ')] + $.prepend $.id(settings), [$.tn('['), a, $.tn('] ')] unless $.get 'firstrun' # Prevent race conditions Favicon.init() unless Favicon.el