improve the opening of settings

This commit is contained in:
buzz-lightsnack-2007 2024-04-15 22:45:20 +08:00
parent 62d6a85d36
commit 6b286eafb9
4 changed files with 23 additions and 11 deletions

20
scripts/pages/open.js Normal file
View file

@ -0,0 +1,20 @@
// Open the settings in a pop-up window.
import windowman from "/scripts/GUI/windowman.JS";
function redirect() {
let location = {};
location[`original`] = window.location.href;
location[`page`] = [...location[`original`].split(`/`)].pop();
location[`target`] = chrome.runtime.getURL("pages/".concat(location[`page`]));
windowman.new(location[`target`]);
window.close();
}
function main() {
redirect();
}
main();