Skip to content

Instantly share code, notes, and snippets.

@LostKobrakai
Created June 4, 2013 19:39
Show Gist options
  • Save LostKobrakai/5708871 to your computer and use it in GitHub Desktop.
Save LostKobrakai/5708871 to your computer and use it in GitHub Desktop.
Fix for mobile win 8 viewports
(function() {
if ("-ms-user-select" in document.documentElement.style && navigator.userAgent.match(/IEMobile\/10\.0/)) {
var msViewportStyle = document.createElement("style");
msViewportStyle.appendChild(
document.createTextNode("@-ms-viewport{width:auto!important}")
);
document.getElementsByTagName("head")[0].appendChild(msViewportStyle);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment