This commit is contained in:
ManeraKai 2023-03-06 16:59:24 +03:00
parent 544d45a912
commit 5757aa56d2
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
2 changed files with 3 additions and 4 deletions

View File

@ -807,7 +807,7 @@ async function copyRaw(url, test) {
const newUrl = await reverse(url)
if (newUrl) {
if (!test) {
if (!window.chrome) {
if (window.browser) {
navigator.clipboard.writeText(newUrl)
} else {
var copyFrom = document.createElement("textarea");

View File

@ -139,7 +139,7 @@ browser.contextMenus.create({
contexts: ["link"],
})
if (!window.chrome) {
if (window.browser) {
browser.contextMenus.create({
id: "redirectBookmark",
title: 'Redirect',
@ -256,14 +256,13 @@ browser.contextMenus.onClicked.addListener(async (info) => {
const url = new URL(bookmarks[0].url)
const newUrl = await servicesHelper.reverse(url)
if (newUrl) {
browser.tabs.update({ url: newUrl }, tab => {
browser.tabs.create({ url: newUrl }, tab => {
tabIdRedirects[tab.id] = false
})
}
})
return
}
}
})