Compare commits
2 Commits
b3d05bba21
...
6adaa29ff1
Author | SHA1 | Date | |
---|---|---|---|
6adaa29ff1 | |||
e0e6cb70c4 |
@ -30,5 +30,8 @@
|
|||||||
"service_worker": "background.js",
|
"service_worker": "background.js",
|
||||||
"type": "module"
|
"type": "module"
|
||||||
},
|
},
|
||||||
"options_page": "manage.html"
|
"options_page": "manage.html",
|
||||||
|
"action": {
|
||||||
|
"default_popup": "popup.html"
|
||||||
|
}
|
||||||
}
|
}
|
16
popup.html
Normal file
16
popup.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<!DOCTYPE html><html><head>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
body div {
|
||||||
|
margin: 2px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head><body>
|
||||||
|
<h2>VRChat Emoji Manager</h2>
|
||||||
|
<div><button id="btn1">Launch in new tab</button></div>
|
||||||
|
<div><button id="btn2">Launch in pop up window</button></div>
|
||||||
|
<script src="popup.js"></script>
|
||||||
|
</body></html>
|
12
popup.js
Normal file
12
popup.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
btn1.onclick = () => open("manage.html");
|
||||||
|
btn2.onclick = () => {
|
||||||
|
chrome.windows.create({
|
||||||
|
url: "manage.html",
|
||||||
|
focused: true,
|
||||||
|
type: "popup"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var width = Math.max(btn1.clientWidth, btn2.clientWidth);
|
||||||
|
btn1.style.width = width + "px";
|
||||||
|
btn2.style.width = width + "px";
|
Loading…
Reference in New Issue
Block a user