improve the opening of settings
This commit is contained in:
parent
62d6a85d36
commit
6b286eafb9
4 changed files with 23 additions and 11 deletions
20
scripts/pages/open.js
Normal file
20
scripts/pages/open.js
Normal 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();
|
Loading…
Add table
Add a link
Reference in a new issue