From a3933212e42c72c1a7835784e9cb47b9928a23ef Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 4 Jan 2012 16:29:10 +0100 Subject: [PATCH] Some getElementById instead of querySelector. --- 4chan_x.user.js | 6 +++--- script.coffee | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index fb3ea94ff..ab88a68d5 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1442,10 +1442,10 @@ time: function() { Time.foo(); Time.date = new Date(); - return $('#timePreview').textContent = Time.funk(Time); + return $.id('timePreview').textContent = Time.funk(Time); }, backlink: function() { - return $('#backlinkPreview').textContent = conf['backlink'].replace(/%id/, '123456789'); + return $.id('backlinkPreview').textContent = conf['backlink'].replace(/%id/, '123456789'); }, favicon: function() { Favicon["switch"](); @@ -3159,7 +3159,7 @@ $.addStyle(Main.css); threading.init(); Favicon.init(); - if ((form = $('form[name=post]')) && (canPost = !!$('#recaptcha_response_field'))) { + if ((form = $('form[name=post]')) && (canPost = !!$.id('recaptcha_response_field'))) { Recaptcha.init(); if (g.REPLY && conf['Auto Watch Reply'] && conf['Thread Watcher']) { $.on(form, 'submit', function() { diff --git a/script.coffee b/script.coffee index 2077d3f36..b95954c9c 100644 --- a/script.coffee +++ b/script.coffee @@ -1084,9 +1084,9 @@ options = time: -> Time.foo() Time.date = new Date() - $('#timePreview').textContent = Time.funk Time + $.id('timePreview').textContent = Time.funk Time backlink: -> - $('#backlinkPreview').textContent = conf['backlink'].replace /%id/, '123456789' + $.id('backlinkPreview').textContent = conf['backlink'].replace /%id/, '123456789' favicon: -> Favicon.switch() Favicon.update() if g.REPLY and conf['Unread Count'] @@ -2488,7 +2488,7 @@ Main = Favicon.init() #recaptcha may be blocked, eg by noscript - if (form = $ 'form[name=post]') and (canPost = !!$ '#recaptcha_response_field') + if (form = $ 'form[name=post]') and (canPost = !!$.id 'recaptcha_response_field') Recaptcha.init() if g.REPLY and conf['Auto Watch Reply'] and conf['Thread Watcher'] $.on form, 'submit', -> if $('img.favicon').src is Favicon.empty