History

Optimize DOM query selectors

Thibaut Courouble committed 9 years ago

Commit d7001c21 parent 581e6561 file · +2 −2Browse files

Unified · Split

assets/javascripts/views/content/entry_page.coffee+2−2
@@ -50,11 +50,11 @@ class app.views.EntryPage extends app.View · 49 unmodified lines
5050 @clipBoardLink.className = '_pre-clip'
5151 @clipBoardLink.title = 'Copy to clipboard'
5252 @clipBoardLink.tabIndex = -1
53− el.appendChild(@clipBoardLink.cloneNode()) for el in @el.querySelectorAll('pre')
53+ el.appendChild(@clipBoardLink.cloneNode()) for el in @findAllByTag('pre')
5454 return
5555
5656 polyfillMathML: ->
57− return unless window.supportsMathML is false and !@polyfilledMathML and @find('math')
57+ return unless window.supportsMathML is false and !@polyfilledMathML and @findByTag('math')
5858 @polyfilledMathML = true
5959 $.append document.head, """<link rel="stylesheet" href="#{app.config.mathml_stylesheet}">"""
6060 return

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t