Hi everyone, I have created an extension that can be used from the usual position at the top right through which you can do some things, including open a website locally.… (read more)
Hi everyone, I have created an extension that can be used from the usual position at the top right through which you can do some things, including open a website locally.
To be clearer ...
Extension Folder:
- extension.js
- manifest.json
- LocalWebSite (folder)
Inside the LocalWebSite folder:
- index.html
Then clicking the button via the extension will load the local website.
At this point, when the local website is opened it becomes impossible to trigger any button, modal, or whatever, it's a totally static page.
One important thing is that I don't want to replace the popup with the static page, I wish I could have both.
Extension Code:
// SiteWebLocale
function openWebSite () {
browser.tabs.create ({
"url": "./LocalWebSite/index.html"
});
}
document.getElementById ("openWebSite"). addEventListener ("click", openWebSite);
Local Website Button Code (It doesn't work):
<button type = "button" class = "btn btn-danger" onclick = "alert ('ok')"> Action </button>