Micro-optimization

This commit is contained in:
Kovid Goyal 2017-05-04 10:38:06 +05:30
parent 54606744b2
commit 8f8dd46e81
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 2 deletions

Binary file not shown.

View File

@ -105,8 +105,9 @@ class BookIndexing
body = document.body
links = []
anchors = {}
in_paged_mode = window.paged_display?.in_paged_mode
for a in document.querySelectorAll("body a[href], body [id], body a[name]")
if window.paged_display?.in_paged_mode
if in_paged_mode
geom = window.paged_display.column_location(a)
else
br = a.getBoundingClientRect()
@ -128,4 +129,3 @@ class BookIndexing
if window?
window.book_indexing = new BookIndexing()