gemini-core
Version:
Utility which contains common modules for gemini and hermione
2 lines (1 loc) • 891 B
JavaScript
(function(t){"use strict";function e(){return!/MSIE 8\.0/.test(navigator.userAgent)}function n(){var t=document.createElement("meta");t.name="viewport";t.content="width=device-width,initial-scale=1.0,user-scalable=no";document.getElementsByTagName("head")[0].appendChild(t)}function i(){var t=document.body.style;t.margin=0;t.padding=0;if(e()){t.border=0}t.backgroundColor="#96fa00"}function r(){try{document.querySelector("body:nth-child(1)")}catch(t){return false}return true}function o(){return!r()||!t.getComputedStyle||!t.matchMedia||!String.prototype.trim}function d(){var e=/Safari/.test(navigator.userAgent);return e?document.documentElement.clientWidth||document.body.clientWidth:t.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}function c(){var e={needsCompatLib:o(),pixelRatio:t.devicePixelRatio,innerWidth:d()};return e}n();i();return c()})(window);