QBClothing and ESKSkin working. Need others (WIP) Copy to clipboard now a utility function. Will json encode if ~= string
32 lines
801 B
HTML
32 lines
801 B
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>MRC Scuba</title>
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
<script type="module" src="./src/main.jsx"></script>
|
|
</body>
|
|
<script>
|
|
// dont judge me
|
|
const copyToClipboard = (str) => {
|
|
const el = document.createElement("textarea");
|
|
el.value = str;
|
|
document.body.appendChild(el);
|
|
el.select();
|
|
document.execCommand("copy");
|
|
document.body.removeChild(el);
|
|
};
|
|
|
|
window.addEventListener("message", (event) => {
|
|
if (event?.data?.type === "copytoclipboard") {
|
|
var str = event.data.text;
|
|
copyToClipboard(str);
|
|
}
|
|
|
|
});
|
|
</script>
|
|
</html>
|