aboutsummaryrefslogtreecommitdiff
path: root/js/polyfills
diff options
context:
space:
mode:
Diffstat (limited to 'js/polyfills')
-rw-r--r--js/polyfills/bind.js3
-rw-r--r--js/polyfills/matchMedia.js30
2 files changed, 0 insertions, 33 deletions
diff --git a/js/polyfills/bind.js b/js/polyfills/bind.js
deleted file mode 100644
index fe6bc0d..0000000
--- a/js/polyfills/bind.js
+++ /dev/null
@@ -1,3 +0,0 @@
1// Function.bind polyfill for Safari < 5.1.4 and iOS.
2// From https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind
3Function.prototype.bind||(Function.prototype.bind=function(c){if("function"!==typeof this)throw new TypeError("Function.prototype.bind - binding an object that is not callable");var d=Array.prototype.slice.call(arguments,1),e=this,a=function(){},b=function(){return e.apply(this instanceof a?this:c||window,d.concat(Array.prototype.slice.call(arguments)))};a.prototype=this.prototype;b.prototype=new a;return b});
diff --git a/js/polyfills/matchMedia.js b/js/polyfills/matchMedia.js
deleted file mode 100644
index 6d4d17c..0000000
--- a/js/polyfills/matchMedia.js
+++ /dev/null
@@ -1,30 +0,0 @@
1/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
2
3window.matchMedia = window.matchMedia || (function(doc, undefined){
4
5 var bool,
6 docElem = doc.documentElement,
7 refNode = docElem.firstElementChild || docElem.firstChild,
8 // fakeBody required for <FF4 when executed in <head>
9 fakeBody = doc.createElement('body'),
10 div = doc.createElement('div');
11
12 div.id = 'mq-test-1';
13 div.style.cssText = "position:absolute;top:-100em";
14 fakeBody.style.background = "none";
15 fakeBody.appendChild(div);
16
17 return function(q){
18
19 div.innerHTML = '&shy;<style media="'+q+'"> #mq-test-1 { width: 42px; }</style>';
20
21 docElem.insertBefore(fakeBody, refNode);
22 bool = div.offsetWidth == 42;
23 docElem.removeChild(fakeBody);
24
25 return { matches: bool, media: q };
26 };
27
28})(document);
29
30