-->
<head>
<meta charset="utf-8">
- <meta name="viewport" content="initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
+ <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="MLPCCG">
-->
<head>
<meta charset="utf-8">
- <meta name="viewport" content="initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
+ <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="MLPCCG">
}
function broadcast (data, source) {
- var origin = (!location.origin || location.origin === "null")
- ? "*" : location.origin;
source = source || window;
if (window.parent && window.parent !== source && window.parent !== window) {
- window.parent.postMessage(data, origin);
+ window.parent.postMessage(data, "*");
}
for (var i = 0; i < window.frames.length; ++i) {
var w = window.frames[i].window;
if (w !== source) {
- w.postMessage(data, origin);
+ w.postMessage(data, "*");
}
}
}
event.preventDefault();
}
-window.addEventListener('DOMContentLoaded', function () {
- var links = document.querySelectorAll("a[href]:not([target=_blank])");
- for (var i = 0; i < links.length; ++i) {
- links[i].addEventListener('click', open);
+window.addEventListener('DOMContentLoaded', function () {
+ if (navigator.standalone) {
+ var links = document.querySelectorAll("a[href]:not([target=_blank])");
+ for (var i = 0; i < links.length; ++i) {
+ links[i].addEventListener('click', open);
+ }
}
FastClick.attach(document.body, { tapDelay: 50 });
broadcast({ type: "dismiss" });
}
-function show (id, otherId) {
+function show (id) {
var overlay = document.getElementById("overlay");
if (!overlay) {
overlay = document.createElement('div');
}
var target = document.getElementById(id);
target.parentNode.insertBefore(overlay, target);
- if (otherId)
- broadcast({ type: 'show', id: otherId });
}
-->
<head>
<meta charset="utf-8">
- <meta name="viewport" content="initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
+ <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="MLPCCG">
overlay.parentNode.removeChild(overlay);
};
- messages.show = function (data) {
- show(data.id);
- };
-
function maybeBack (event) {
if (Math.max(score, opponentScore) !== 0
&& Math.max(score, opponentScore) !== 15) {