/*! * windowlicker v0.1.2 - For responsive javascript * Copyright (c) 2014 Jorn Luiten - https://github.com/publicJorn/windowlicker * License: MIT (http://www.opensource.org/licenses/mit-license.php) */ !function(a,b,c){"undefined"!=typeof module&&module.exports?module.exports=c():"function"==typeof define&&define.amd?define(function(){return b[a]=c()}):b[a]=c()}("windowlicker",this,function(){"use strict";function a(a,b){for(var c,d=0,e=a.length;e>d&&(c=b(a[d],d),c!==!1);d++);}function b(){var a=h,b=window.getComputedStyle(document.body,":before").getPropertyValue("content").replace(/[\"\'']/g,"");b!==h&&(h=b,d(a),d(b))}function c(){g&&clearTimeout(g),g=setTimeout(b,50)}function d(b){var c;j[b]&&a(j[b],function(a){c=a.match()?"on":"off","function"==typeof a[c]&&a[c]()})}function e(a,b){this.size=a,this.on=b.on,b.off&&(this.off=b.off);var c=this;this.match=function(){return c.size==h},i&&b.legacy?this.on():!b.defer&&this.match()&&this.on()}var f,g,h=null,i=!1,j={};return window.matchMedia&&window.matchMedia("only all").matches||(i=!0),i||(window.addEventListener?window.addEventListener("resize",c,!1):window.attachEvent("onresize",c),b()),f={when:function(a,b){var c=new e(a,b);j[a]?j[a].push(c):j[a]=[c]}}});