aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/popup
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages/popup')
-rw-r--r--src/pages/popup/popup.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/pages/popup/popup.js b/src/pages/popup/popup.js
index 824f178b..84dbab04 100644
--- a/src/pages/popup/popup.js
+++ b/src/pages/popup/popup.js
@@ -94,7 +94,7 @@ utils.unify(true).then(r => {
if (!r) document.getElementById('unify_div').style.display = 'none';
else {
const unify = document.getElementById('unify');
- unify.addEventListener("click", () => utils.unify(false, unify));
+ unify.addEventListener("click", () => browser.runtime.sendMessage({ function: 'unify' }));
}
})
@@ -108,4 +108,14 @@ browser.storage.local.get(
document.getElementById(frontend).classList.add("hide")
else
document.getElementById(frontend).classList.remove("hide")
- }); \ No newline at end of file
+ }
+);
+
+for (const a of document.getElementsByTagName('a')) {
+ a.addEventListener('click', e => {
+ if (!a.classList.includes('button')) {
+ browser.tabs.create({ url: a.getAttribute('href') });
+ e.preventDefault();
+ }
+ })
+} \ No newline at end of file