startGame(getSetting("GameNumber"));
}
+ // https://rnwest.engineer/detect-webkit/
+ function isWebKit() {
+ const ua = navigator.userAgent;
+ // As far as I can tell, Chromium-based desktop browsers are the only browsers
+ // that pretend to be WebKit-based but aren't.
+ return (/AppleWebKit/.test(ua) && !/Chrome/.test(ua)) ||
+ /\b(iPad|iPhone|iPod)\b/.test(ua);
+ }
+
function initBoard() {
const letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
const def = BoardList[getSetting("BoardLabel")];
}
setCellCaptions(getSetting("CELL_CAPTIONS"));
- if (window.CSS && CSS.supports && CSS.supports("zoom: 1.5")) {
+ if (window.CSS && CSS.supports && CSS.supports("zoom: 1.5") && !isWebKit()) {
+ // We zoom the window so the board is as big as possible
+ // Except on WebKit because we are affected by the following bug,
+ // which fucks up d&d: https://bugs.webkit.org/show_bug.cgi?id=77998
resize();
window.removeEventListener("resize", resize);
window.addEventListener("resize", resize);