test
This commit is contained in:
parent
f212001d9a
commit
911a2016d0
2 changed files with 27 additions and 27 deletions
27
index.html
27
index.html
|
|
@ -1,18 +1,6 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<script>
|
||||
// Capture real iOS state before spoofing (needed for background audio)
|
||||
var _ua = navigator.userAgent.toLowerCase();
|
||||
window.__IS_IOS__ = /iphone|ipad|ipod/.test(_ua) || (_ua.includes('mac') && navigator.maxTouchPoints > 1);
|
||||
|
||||
// Spoof User-Agent to bypass Google's embedded browser check
|
||||
Object.defineProperty(navigator, 'userAgent', {
|
||||
get: function () {
|
||||
return 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36';
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Monochrome Music</title>
|
||||
|
|
@ -46,21 +34,6 @@
|
|||
/>
|
||||
<link rel="stylesheet" href="/styles.css" />
|
||||
|
||||
<!-- Privacy-friendly analytics by Plausible -->
|
||||
<script async src="https://plausible.canine.tools/js/pa-dCMvQpiD1-AJmi8o3xviO.js"></script>
|
||||
<script>
|
||||
window.plausible =
|
||||
window.plausible ||
|
||||
function () {
|
||||
(plausible.q = plausible.q || []).push(arguments);
|
||||
};
|
||||
plausible.init =
|
||||
plausible.init ||
|
||||
function (i) {
|
||||
plausible.o = i || {};
|
||||
};
|
||||
plausible.init();
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
|||
27
js/app.js
27
js/app.js
|
|
@ -62,6 +62,33 @@ import {
|
|||
importToLibrary,
|
||||
} from './playlist-importer.js';
|
||||
|
||||
// Capture real iOS state before spoofing (needed for background audio)
|
||||
if (typeof window !== 'undefined') {
|
||||
const _ua = navigator.userAgent.toLowerCase();
|
||||
window.__IS_IOS__ = /iphone|ipad|ipod/.test(_ua) || (_ua.includes('mac') && navigator.maxTouchPoints > 1);
|
||||
|
||||
// Spoof User-Agent to bypass Google's embedded browser check
|
||||
Object.defineProperty(navigator, 'userAgent', {
|
||||
get: function () {
|
||||
return 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36';
|
||||
},
|
||||
});
|
||||
|
||||
// analytics
|
||||
const plausibleScript = document.createElement('script');
|
||||
plausibleScript.async = true;
|
||||
plausibleScript.src = 'https://plausible.canine.tools/js/pa-dCMvQpiD1-AJmi8o3xviO.js';
|
||||
document.head.appendChild(plausibleScript);
|
||||
|
||||
window.plausible = window.plausible || function () {
|
||||
(window.plausible.q = window.plausible.q || []).push(arguments);
|
||||
};
|
||||
window.plausible.init = window.plausible.init || function (i) {
|
||||
window.plausible.o = i || {};
|
||||
};
|
||||
window.plausible.init();
|
||||
}
|
||||
|
||||
// Lazy-loaded modules
|
||||
let settingsModule = null;
|
||||
let downloadsModule = null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue