/*! modernizr 3.3.1 (Custom Build) | MIT * * https://modernizr.com/download/?-fontface-inlinesvg-pointerevents-requestanimationframe-setclasses !*/ !function(e,n,t){function r(e,n){return typeof e===n}function s(){var e,n,t,s,i,o,a;for(var f in y)if(y.hasOwnProperty(f)){if(e=[],n=y[f],n.name&&(e.push(n.name.toLowerCase()),n.options&&n.options.aliases&&n.options.aliases.length))for(t=0;tp;p++)if(v=e[p],h=N.style[v],u(v,"-")&&(v=l(v)),N.style[v]!==t){if(i||r(s,"undefined"))return a(),"pfx"==n?v:!0;try{N.style[v]=s}catch(y){}if(N.style[v]!=h)return a(),"pfx"==n?v:!0}return a(),!1}function h(e,n,t,s,i){var o=e.charAt(0).toUpperCase()+e.slice(1),a=(e+" "+R.join(o+" ")+o).split(" ");return r(n,"string")||r(n,"undefined")?v(a,n,s,i):(a=(e+" "+b.join(o+" ")+o).split(" "),p(a,n,t))}var g=[],y=[],w={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,n){var t=this;setTimeout(function(){n(t[e])},0)},addTest:function(e,n,t){y.push({name:e,fn:n,options:t})},addAsyncTest:function(e){y.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=w,Modernizr=new Modernizr;var C=n.documentElement,x="svg"===C.nodeName.toLowerCase();Modernizr.addTest("inlinesvg",function(){var e=o("div");return e.innerHTML="","http://www.w3.org/2000/svg"==("undefined"!=typeof SVGRect&&e.firstChild&&e.firstChild.namespaceURI)});var S=function(){function e(e,n){var s;return e?(n&&"string"!=typeof n||(n=o(n||"div")),e="on"+e,s=e in n,!s&&r&&(n.setAttribute||(n=o("div")),n.setAttribute(e,""),s="function"==typeof n[e],n[e]!==t&&(n[e]=t),n.removeAttribute(e)),s):!1}var r=!("onblur"in n.documentElement);return e}();w.hasEvent=S;var _="Moz O ms Webkit",b=w._config.usePrefixes?_.toLowerCase().split(" "):[];w._domPrefixes=b,Modernizr.addTest("pointerevents",function(){var e=!1,n=b.length;for(e=Modernizr.hasEvent("pointerdown");n--&&!e;)S(b[n]+"pointerdown")&&(e=!0);return e});var E=w.testStyles=f,T=function(){var e=navigator.userAgent,n=e.match(/applewebkit\/([0-9]+)/gi)&&parseFloat(RegExp.$1),t=e.match(/w(eb)?osbrowser/gi),r=e.match(/windows phone/gi)&&e.match(/iemobile\/([0-9])+/gi)&&parseFloat(RegExp.$1)>=9,s=533>n&&e.match(/android/gi);return t||s||r}();T?Modernizr.addTest("fontface",!1):E('@font-face {font-family:"font";src:url("https://")}',function(e,t){var r=n.getElementById("smodernizr"),s=r.sheet||r.styleSheet,i=s?s.cssRules&&s.cssRules[0]?s.cssRules[0].cssText:s.cssText||"":"",o=/src/i.test(i)&&0===i.indexOf(t.split(" ")[0]);Modernizr.addTest("fontface",o)});var R=w._config.usePrefixes?_.split(" "):[];w._cssomPrefixes=R;var z=function(n){var r,s=prefixes.length,i=e.CSSRule;if("undefined"==typeof i)return t;if(!n)return!1;if(n=n.replace(/^@/,""),r=n.replace(/-/g,"_").toUpperCase()+"_RULE",r in i)return"@"+n;for(var o=0;s>o;o++){var a=prefixes[o],f=a.toUpperCase()+"_"+r;if(f in i)return"@-"+a.toLowerCase()+"-"+n}return!1};w.atRule=z;var A={elem:o("modernizr")};Modernizr._q.push(function(){delete A.elem});var N={style:A.elem.style};Modernizr._q.unshift(function(){delete N.style}),w.testAllProps=h;var P=w.prefixed=function(e,n,t){return 0===e.indexOf("@")?z(e):(-1!=e.indexOf("-")&&(e=l(e)),n?h(e,n,t):h(e,"pfx"))};Modernizr.addTest("requestanimationframe",!!P("requestAnimationFrame",e),{aliases:["raf"]}),s(),i(g),delete w.addTest,delete w.addAsyncTest;for(var L=0;L -1) { el.href= "intent:#Intent;action=android.intent.action.SEND;type=text/plain;S.android.intent.extra.TEXT=" + shareUrl + ";S.android.intent.extra.SUBJECT=" + shareTitle + ";S.browser_fallback_url=http://www.sharethis.com/share?&url=" + shareUrl + "&title=" + shareTitle + "&img=" + shareImg + "&summary=" + shareDescription + "&publisher=bc768e5b-e74f-4388-964f-24e99a8799a7;end"; } else { el.href="http://www.sharethis.com/share?&url=" + shareUrl + "&title=" + shareTitle + "&img=" + shareImg + "&summary=" + shareDescription + "&publisher=bc768e5b-e74f-4388-964f-24e99a8799a7" } if (navigator.share !== undefined) { el.addEventListener('click', function(e){ if(e.preventDefault){e.preventDefault();}else{e.returnValue=false;} navigator.share({ title: shareTitle, text: shareUrl, url: shareUrl }).then(() => console.log('Successful share')) .catch(() => console.log('Error sharing:', error)); return false;}); } }); } function receiveOptions(e) { if (e.channel === "data") { console.log(e.args); console.log(e.args[0].menu_bg_color); console.log(e.args[0].menu_bg_ani); if(document.getElementById('menu')!=null){document.getElementById('menu').style.backgroundColor = e.args[0].menu_bg_color;} if(e.args[0].menu_bg_ani == "true") { bganioff(); } else { bganion(); } } } function visibilityCheck() { if (!document.hidden) { document.documentElement.setAttribute('data-visible', 'visible'); } else { document.documentElement.setAttribute('data-visible', 'hidden'); } } function getready() { if (document.readyState == "complete" || document.readyState == "interactive") { document.documentElement.className = document.documentElement.className.replace("not-ready","ready"); window.setTimeout(function(){if(document.getElementById('loading')!=null){document.body.removeChild(document.getElementById('loading'));}}, 500); } else { window.setTimeout(getready, 800); } } function startup() { window.scrollTo(0, 1); var loadingDiv = document.createElement("div"); loadingDiv.innerHTML = 'Loading...'; loadingDiv.id = "loading"; loadingDiv.setAttribute('aria-busy', 'true'); var cacheIframe = document.getElementById('cache'); document.body.insertBefore(loadingDiv, cacheIframe); document.documentElement.className = document.documentElement.className.replace("no-nav","nav"); document.documentElement.className = document.documentElement.className + " nav-closed"; document.documentElement.className = document.documentElement.className + " search-closed"; document.addEventListener('DOMContentLoaded', function(){window.setTimeout(searchopen, 1); window.setTimeout(searchclose, 2); window.setTimeout(menuopen, 3); window.setTimeout(menuclose, 4);},false); if (window.applicationCache){ /* window.applicationCache.update(); */ window.applicationCache.addEventListener('updateready', function(){ if (window.applicationCache.status == window.applicationCache.updateready) { window.applicationCache.swapCache(); window.location.reload(true); } }, false); window.applicationCache.addEventListener("error", function(){ document.documentElement.setAttribute("data-connection", "offline"); }); } if (window.location.protocol == "https:" && 'serviceWorker' in navigator) { navigator.serviceWorker.register('/serviceworker.js').then(function(registration) { // Registration was successful console.log('ServiceWorker registration successful with scope: ', registration.scope); }).catch(function(err) { // registration failed :( console.log('ServiceWorker registration failed: ', err); }); // Listen for claiming of our ServiceWorker navigator.serviceWorker.addEventListener('controllerchange', function(event) { // Listen for changes in the state of our ServiceWorker navigator.serviceWorker.controller.addEventListener('statechange', function() { // If the ServiceWorker becomes "activated", let the user know they can go offline! if (this.state === 'activated') { //Set a background sync for the cache if ('SyncManager' in window) { navigator.serviceWorker.ready.then(function(reg) { return reg.sync.register('refreshCache'); console.log("Background sync registered."); }).catch(function() { // system was unable to register for a sync, // this could be an OS-level restriction console.log("Couldn't register for background sync."); }); } else { // serviceworker/sync not supported console.log("Background sync not supported."); } // Reload like you would with AppCache window.location.reload(true); } }); }); } if(document.getElementById('navicon')!=null){ document.getElementById('navicon').addEventListener('click', function(e){if(e.preventDefault){e.preventDefault();}else{e.returnValue=false;}document.documentElement.setAttribute('data-will-change', 'true');menuopen();return false;},false); document.getElementById('navicon').addEventListener('mouseover', function(){document.documentElement.setAttribute('data-will-change', 'true');},false); document.getElementById('navicon').addEventListener('mouseout', function(){document.documentElement.setAttribute('data-will-change', 'false');},false); } if(document.getElementById('searchicon')!=null){ document.getElementById('searchicon').addEventListener('click', function(e){if(e.preventDefault){e.preventDefault();}else{e.returnValue=false;}document.documentElement.setAttribute('data-will-change', 'true');searchopen();return false;},false); document.getElementById('searchicon').addEventListener('mouseover', function(){document.documentElement.setAttribute('data-will-change', 'true');},false); document.getElementById('searchicon').addEventListener('mouseout', function(){document.documentElement.setAttribute('data-will-change', 'false');},false); } if(document.getElementById('close')!=null){ document.getElementById('close').addEventListener('click', function(e){if(e.preventDefault){e.preventDefault();}else{e.returnValue=false;}menuclose();searchclose();return false;},false); } if(document.getElementById('header')!=null){ document.getElementById('header').addEventListener('click', function(e){if(e.preventDefault){e.preventDefault();}else{e.returnValue=false;}menuclose();return false;},false); } if(document.getElementById('data')!=null){ document.getElementById('data').onload = function(e){console.log('/data/ loaded');document.getElementById('data').contentWindow.postMessage("sendSettings", "https://acrylicstyle.com/data/");} } window.addEventListener("message", receiveOptions, false); document.onkeydown = function(evt) { evt = evt || window.event; if (evt.keyCode == 27) { menuclose(); searchclose(); } }; if (typeof document.hidden !== "undefined") { visibilityCheck(); document.addEventListener('visibilitychange', function(event) { visibilityCheck(); }); } else { document.documentElement.setAttribute('data-visible', 'unsupported'); } document.addEventListener("touchstart", function(){}, true); initWebShare(); randomizepostcolors(); startothers(); window.setTimeout(getready, 1); document.documentElement.setAttribute('data-useragent', navigator.userAgent); if (("standalone" in window.navigator) && window.navigator.standalone) { if(top.location == "http://acrylicstyle.com/app/" || top.location == "https://acrylicstyle.com/app/" || top.location == "http://www.acrylicstyle.com/app/" || top.location == "https://www.acrylicstyle.com/app/") { window.setTimeout( top.location.replace('/home/'), 1 ); } document.documentElement.setAttribute('data-ios-standalone', "true"); document.querySelector("meta[name=viewport]").setAttribute('content', 'width=device-width, initial-scale=1, minimum-scale=1, user-scalable=no'); var a=document.getElementsByTagName("a"); for(var i=0;i -1) { document.documentElement.className += " operamini"; } if (window.addEventListener && Modernizr.fontface && !(navigator.userAgent.indexOf('Opera Mini') > -1) && !(window.operamini)) { document.addEventListener("DOMContentLoaded", startup); } else { window.location.href = "#bump"; } }, 1); })(); 1.89.79_64