From f208307cbdd403d3fa92a1aae1dc9c094c7ec9d8 Mon Sep 17 00:00:00 2001 From: Eric Bidelman Date: Wed, 11 Jul 2012 10:43:37 -0700 Subject: Bringing in upstream changes --- js/polyfills/bind.js | 3 --- js/polyfills/matchMedia.js | 30 ------------------------------ 2 files changed, 33 deletions(-) delete mode 100644 js/polyfills/bind.js delete mode 100644 js/polyfills/matchMedia.js (limited to 'js/polyfills') 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 @@ -// Function.bind polyfill for Safari < 5.1.4 and iOS. -// From https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind -Function.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 @@ -/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */ - -window.matchMedia = window.matchMedia || (function(doc, undefined){ - - var bool, - docElem = doc.documentElement, - refNode = docElem.firstElementChild || docElem.firstChild, - // fakeBody required for - fakeBody = doc.createElement('body'), - div = doc.createElement('div'); - - div.id = 'mq-test-1'; - div.style.cssText = "position:absolute;top:-100em"; - fakeBody.style.background = "none"; - fakeBody.appendChild(div); - - return function(q){ - - div.innerHTML = '­'; - - docElem.insertBefore(fakeBody, refNode); - bool = div.offsetWidth == 42; - docElem.removeChild(fakeBody); - - return { matches: bool, media: q }; - }; - -})(document); - - -- cgit v1.2.3