Skip to content

Commit

Permalink
download.js: remove document.querySelectorAll polyfill (#2601)
Browse files Browse the repository at this point in the history
Such browsers won't work anyway.
  • Loading branch information
XhmikosR authored and Trott committed Sep 30, 2019
1 parent 1d5953f commit ce2f199
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions static/js/download.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,6 @@
;
(function (d, n) {
;(function (d, n) {
'use strict'

// document.querySelectorAll polyfill for ancient IEs
// https://gist.github.com/chrisjlee/8960575
if (!document.querySelectorAll) {
document.querySelectorAll = function (selectors) {
var style = document.createElement('style')
var elements = []
var element

document.documentElement.firstChild.appendChild(style)
document._qsa = []

style.styleSheet.cssText = selectors + '{x-qsa:expression(document._qsa && document._qsa.push(this))}'
window.scrollBy(0, 0)
style.parentNode.removeChild(style)

while (document._qsa.length) {
element = document._qsa.shift()
element.style.removeAttribute('x-qsa')
elements.push(element)
}
document._qsa = null
return elements
}
}

var osMatch = n.platform.match(/(Win|Mac|Linux)/)
var os = (osMatch && osMatch[1]) || ''
var arch = n.userAgent.match(/x86_64|Win64|WOW64/) ||
Expand Down

0 comments on commit ce2f199

Please sign in to comment.