From d7001c2eb534802e1874d75516e82daf87345bd5 Mon Sep 17 00:00:00 2001 From: Thibaut Courouble Date: Mon, 7 Aug 2017 17:28:53 -0400 Subject: [PATCH] Optimize DOM query selectors --- assets/javascripts/views/content/entry_page.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/views/content/entry_page.coffee b/assets/javascripts/views/content/entry_page.coffee index 64c5155a..93f8eaf5 100644 --- a/assets/javascripts/views/content/entry_page.coffee +++ b/assets/javascripts/views/content/entry_page.coffee @@ -50,11 +50,11 @@ class app.views.EntryPage extends app.View @clipBoardLink.className = '_pre-clip' @clipBoardLink.title = 'Copy to clipboard' @clipBoardLink.tabIndex = -1 - el.appendChild(@clipBoardLink.cloneNode()) for el in @el.querySelectorAll('pre') + el.appendChild(@clipBoardLink.cloneNode()) for el in @findAllByTag('pre') return polyfillMathML: -> - return unless window.supportsMathML is false and !@polyfilledMathML and @find('math') + return unless window.supportsMathML is false and !@polyfilledMathML and @findByTag('math') @polyfilledMathML = true $.append document.head, """""" return