forked from quoid/userscripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
39 lines (36 loc) · 1001 Bytes
/
Copy pathmain.js
File metadata and controls
39 lines (36 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import "./app.css";
import "../shared/reset.css";
import "../shared/variables.css";
import App from "./App.svelte";
if (import.meta.env.DEV) { // vite feat that only import in dev mode
const modules = import.meta.glob("../shared/dev.js", {eager: true});
window.browser = modules["../shared/dev.js"].browser;
console.info("DEV-ENV", import.meta.env, modules, browser);
// macos popup simulation
const style = document.createElement("style");
style.textContent = `
body {
top: 20px;
left: 20px;
box-sizing: content-box;
border: 2px solid #0c0e0f;
border-radius: 10px;
box-shadow: 2px 2px 20px rgba(0, 0, 0, 0.2);
}
body:before {
content: "";
position: absolute;
top: -1px;
left: -1px;
right: -1px;
bottom: -1px;
border: 1px solid #54575a;
border-radius: 9px;
}
`;
browser.platform === "macos" && document.head.append(style);
}
const app = new App({
target: document.getElementById("app")
});
export default app;