Disable dark splash in embed
This commit is contained in:
2 files changed
+3
No files matched your search
@@ -42,8 +42,10 @@
|
||||
document.querySelector('#splash-troubleshooting').textContent = messages[2];
|
||||
}
|
||||
document.querySelector('#splash-content').style.display = 'block';
|
||||
<% if (!htmlWebpackPlugin.options.noTheme) { %>
|
||||
try {var localTheme = localStorage.getItem('tw:theme');} catch (e) {}
|
||||
if (localTheme ? localTheme === 'dark' : window.matchMedia('(prefers-color-scheme: dark)').matches) document.querySelector('#splash').setAttribute('splash-theme', 'dark');
|
||||
<% } %>
|
||||
})();
|
||||
</script>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -176,6 +176,7 @@ module.exports = [
|
||||
template: 'src/playground/index.ejs',
|
||||
filename: 'embed.html',
|
||||
title: 'Embedded Project - TurboWarp',
|
||||
noTheme: true,
|
||||
...htmlWebpackPluginCommon
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
|
||||
Reference in new issue
Block a user