Skip to content

Instantly share code, notes, and snippets.

View alexeyuzlov's full-sized avatar
💭
using copilot🚀

Alexey alexeyuzlov

💭
using copilot🚀
  • Codemasters International
  • Georgia, Tbilisi
View GitHub Profile
@benplum
benplum / matchMedia - IE8
Last active February 1, 2017 21:37
matchMedia Polyfill w/ Listeners - IE8
// Modernizr style test
if (!(window.webkitMatchMedia || window.mozMatchMedia || window.oMatchMedia || window.msMatchMedia || window.matchMedia)) {
var root = document.getElementsByTagName( 'html' )[0];
root.className += ' no-matchmedia';
}
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license - IE8 VERSION! */
window.matchMedia = window.matchMedia || (function(doc, undefined){
var docElem = doc.documentElement,