mirror of
https://github.com/zumbiepig/MineXLauncher.git
synced 2025-06-08 09:24:48 +00:00
fix the bug where the theme flickers
This commit is contained in:
parent
1f5223c96f
commit
2597e40ba1
@ -6,12 +6,12 @@
|
||||
<title>MineXLauncher</title>
|
||||
<link rel="icon" type="image/webp" href="/resources/images/icons/favicon.webp" />
|
||||
<link rel="stylesheet" href="/resources/styles/themes/default.css" />
|
||||
<link rel="stylesheet" id="theme" />
|
||||
<link rel="stylesheet" id="theme" onload="document.body.style.display = ''" />
|
||||
<meta name="theme-color" content="#333" />
|
||||
<script src="/resources/scripts/google-tag.js"></script>
|
||||
<script src="/resources/scripts/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<body style="display: none">
|
||||
<div class="ads-container">
|
||||
<ins class="adsbygoogle" style="display: block" data-ad-client="ca-pub-1132419379737567" data-ad-slot="3280170072" data-ad-format="auto" data-full-width-responsive="true"></ins>
|
||||
</div>
|
||||
|
@ -6,11 +6,11 @@
|
||||
<title>MineXLauncher</title>
|
||||
<link rel="icon" type="image/webp" href="/resources/images/icons/favicon.webp" />
|
||||
<link rel="stylesheet" href="/resources/styles/themes/default.css" />
|
||||
<link rel="stylesheet" id="theme" />
|
||||
<link rel="stylesheet" id="theme" onload="document.body.style.display = ''" />
|
||||
<script src="/resources/scripts/google-tag.js"></script>
|
||||
<script src="/resources/scripts/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<body style="display: none">
|
||||
<div class="ads-container">
|
||||
<ins class="adsbygoogle" style="display: block" data-ad-client="ca-pub-1132419379737567" data-ad-slot="3280170072" data-ad-format="auto" data-full-width-responsive="true"></ins>
|
||||
</div>
|
||||
|
@ -6,11 +6,11 @@
|
||||
<title>MineXLauncher</title>
|
||||
<link rel="icon" type="image/webp" href="/resources/images/icons/favicon.webp" />
|
||||
<link rel="stylesheet" href="/resources/styles/themes/default.css" />
|
||||
<link rel="stylesheet" id="theme" />
|
||||
<link rel="stylesheet" id="theme" onload="document.body.style.display = ''" />
|
||||
<script src="/resources/scripts/google-tag.js"></script>
|
||||
<script src="/resources/scripts/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<body style="display: none">
|
||||
<div class="ads-container">
|
||||
<ins class="adsbygoogle" style="display: block" data-ad-client="ca-pub-1132419379737567" data-ad-slot="3280170072" data-ad-format="auto" data-full-width-responsive="true"></ins>
|
||||
</div>
|
||||
|
@ -6,11 +6,11 @@
|
||||
<title>MineXLauncher</title>
|
||||
<link rel="icon" type="image/webp" href="/resources/images/icons/favicon.webp" />
|
||||
<link rel="stylesheet" href="/resources/styles/themes/default.css" />
|
||||
<link rel="stylesheet" id="theme" />
|
||||
<link rel="stylesheet" id="theme" onload="document.body.style.display = ''" />
|
||||
<script src="/resources/scripts/google-tag.js"></script>
|
||||
<script src="/resources/scripts/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<body style="display: none">
|
||||
<div class="ads-container">
|
||||
<ins class="adsbygoogle" style="display: block" data-ad-client="ca-pub-1132419379737567" data-ad-slot="3280170072" data-ad-format="auto" data-full-width-responsive="true"></ins>
|
||||
</div>
|
||||
|
@ -6,11 +6,11 @@
|
||||
<title>MineXLauncher</title>
|
||||
<link rel="icon" type="image/webp" href="/resources/images/icons/favicon.webp" />
|
||||
<link rel="stylesheet" href="/resources/styles/themes/default.css" />
|
||||
<link rel="stylesheet" id="theme" />
|
||||
<link rel="stylesheet" id="theme" onload="document.body.style.display = ''" />
|
||||
<script src="/resources/scripts/google-tag.js"></script>
|
||||
<script src="/resources/scripts/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<body style="display: none">
|
||||
<div class="ads-container">
|
||||
<ins class="adsbygoogle" style="display: block" data-ad-client="ca-pub-1132419379737567" data-ad-slot="3280170072" data-ad-format="auto" data-full-width-responsive="true"></ins>
|
||||
</div>
|
||||
|
@ -6,11 +6,11 @@
|
||||
<title>MineXLauncher</title>
|
||||
<link rel="icon" type="image/webp" href="/resources/images/icons/favicon.webp" />
|
||||
<link rel="stylesheet" href="/resources/styles/themes/default.css" />
|
||||
<link rel="stylesheet" id="theme" />
|
||||
<link rel="stylesheet" id="theme" onload="document.body.style.display = ''" />
|
||||
<script src="/resources/scripts/google-tag.js"></script>
|
||||
<script src="/resources/scripts/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<body style="display: none">
|
||||
<div class="launcher">
|
||||
<div class="title-bar">
|
||||
<span id="title-bar-text">MineXLauncher</span>
|
||||
|
@ -6,11 +6,11 @@
|
||||
<title>MineXLauncher</title>
|
||||
<link rel="icon" type="image/webp" href="/resources/images/icons/favicon.webp" />
|
||||
<link rel="stylesheet" href="/resources/styles/themes/default.css" />
|
||||
<link rel="stylesheet" id="theme" />
|
||||
<link rel="stylesheet" id="theme" onload="document.body.style.display = ''" />
|
||||
<script src="/resources/scripts/google-tag.js"></script>
|
||||
<script src="/resources/scripts/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<body style="display: none">
|
||||
<div class="ads-container">
|
||||
<ins class="adsbygoogle" style="display: block" data-ad-client="ca-pub-1132419379737567" data-ad-slot="3280170072" data-ad-format="auto" data-full-width-responsive="true"></ins>
|
||||
</div>
|
||||
|
@ -6,11 +6,11 @@
|
||||
<title>MineXLauncher</title>
|
||||
<link rel="icon" type="image/webp" href="/resources/images/icons/favicon.webp" />
|
||||
<link rel="stylesheet" href="/resources/styles/themes/default.css" />
|
||||
<link rel="stylesheet" id="theme" />
|
||||
<link rel="stylesheet" id="theme" onload="document.body.style.display = ''" />
|
||||
<script src="/resources/scripts/google-tag.js"></script>
|
||||
<script src="/resources/scripts/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<body style="display: none">
|
||||
<div class="ads-container">
|
||||
<ins class="adsbygoogle" style="display: block" data-ad-client="ca-pub-1132419379737567" data-ad-slot="3280170072" data-ad-format="auto" data-full-width-responsive="true"></ins>
|
||||
</div>
|
||||
|
@ -6,12 +6,12 @@
|
||||
<title>MineXLauncher</title>
|
||||
<link rel="icon" type="image/webp" href="/resources/images/icons/favicon.webp" />
|
||||
<link rel="stylesheet" href="/resources/styles/themes/default.css" />
|
||||
<link rel="stylesheet" id="theme" />
|
||||
<link rel="stylesheet" id="theme" onload="document.body.style.display = ''" />
|
||||
<meta name="theme-color" content="#333" />
|
||||
<script src="/resources/scripts/google-tag.js"></script>
|
||||
<script src="/resources/scripts/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<body style="display: none">
|
||||
<div class="ads-container">
|
||||
<ins class="adsbygoogle" style="display: block" data-ad-client="ca-pub-1132419379737567" data-ad-slot="3280170072" data-ad-format="auto" data-full-width-responsive="true"></ins>
|
||||
</div>
|
||||
|
@ -6,11 +6,11 @@
|
||||
<title>MineXLauncher</title>
|
||||
<link rel="icon" type="image/webp" href="/resources/images/icons/favicon.webp" />
|
||||
<link rel="stylesheet" href="/resources/styles/themes/default.css" />
|
||||
<link rel="stylesheet" id="theme" />
|
||||
<link rel="stylesheet" id="theme" onload="document.body.style.display = ''" />
|
||||
<script src="/resources/scripts/google-tag.js"></script>
|
||||
<script src="/resources/scripts/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<body style="display: none">
|
||||
<div class="ads-container">
|
||||
<ins class="adsbygoogle" style="display: block" data-ad-client="ca-pub-1132419379737567" data-ad-slot="3280170072" data-ad-format="auto" data-full-width-responsive="true"></ins>
|
||||
</div>
|
||||
|
@ -6,11 +6,11 @@
|
||||
<title>MineXLauncher</title>
|
||||
<link rel="icon" type="image/webp" href="/resources/images/icons/favicon.webp" />
|
||||
<link rel="stylesheet" href="/resources/styles/themes/default.css" />
|
||||
<link rel="stylesheet" id="theme" />
|
||||
<link rel="stylesheet" id="theme" onload="document.body.style.display = ''" />
|
||||
<script src="/resources/scripts/google-tag.js"></script>
|
||||
<script src="/resources/scripts/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<body style="display: none">
|
||||
<div class="ads-container">
|
||||
<ins class="adsbygoogle" style="display: block" data-ad-client="ca-pub-1132419379737567" data-ad-slot="3280170072" data-ad-format="auto" data-full-width-responsive="true"></ins>
|
||||
</div>
|
||||
|
@ -6,11 +6,11 @@
|
||||
<title>MineXLauncher</title>
|
||||
<link rel="icon" type="image/webp" href="/resources/images/icons/favicon.webp" />
|
||||
<link rel="stylesheet" href="/resources/styles/themes/default.css" />
|
||||
<link rel="stylesheet" id="theme" />
|
||||
<link rel="stylesheet" id="theme" onload="document.body.style.display = ''" />
|
||||
<script src="/resources/scripts/google-tag.js"></script>
|
||||
<script src="/resources/scripts/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<body style="display: none">
|
||||
<div class="ads-container">
|
||||
<ins class="adsbygoogle" style="display: block" data-ad-client="ca-pub-1132419379737567" data-ad-slot="3280170072" data-ad-format="auto" data-full-width-responsive="true"></ins>
|
||||
</div>
|
||||
|
@ -6,12 +6,12 @@
|
||||
<title>MineXLauncher</title>
|
||||
<link rel="icon" type="image/webp" href="/resources/images/icons/favicon.webp" />
|
||||
<link rel="stylesheet" href="/resources/styles/themes/default.css" />
|
||||
<link rel="stylesheet" id="theme" />
|
||||
<link rel="stylesheet" id="theme" onload="document.body.style.display = ''" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<script src="/resources/scripts/google-tag.js"></script>
|
||||
<script src="/resources/scripts/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<body style="display: none">
|
||||
<div class="launcher">
|
||||
<div class="title-bar">
|
||||
<span id="title-bar-text">MineXLauncher</span>
|
||||
|
@ -369,14 +369,7 @@ if (window.location.pathname === '/') {
|
||||
if (iframe.contentWindow) iframe.contentWindow.installPwaEvent = event;
|
||||
});
|
||||
} else {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const themeElement = document.getElementById('theme') as HTMLLinkElement;
|
||||
if (themeElement) {
|
||||
document.documentElement.style.display = 'none';
|
||||
themeElement.onload = () => (document.documentElement.style.display = '');
|
||||
themeElement.href = `/resources/styles/themes/${storage.local.get('theme') ?? 'default'}.css`;
|
||||
}
|
||||
});
|
||||
theme.load();
|
||||
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
const profileName = document.getElementById('profile-name');
|
||||
|
Loading…
x
Reference in New Issue
Block a user