Fixed reverse tab for context menu for chromium
This commit is contained in:
parent
c5cd80da59
commit
10b4fd9601
|
@ -7,9 +7,9 @@ window.browser = window.browser || window.chrome
|
|||
let exceptions
|
||||
|
||||
function isException(url) {
|
||||
if (url !== undefined) {
|
||||
for (const item of exceptions.url) if (item == url.href) return true
|
||||
for (const item of exceptions.regex) if (new RegExp(item).test(url.href)) return true
|
||||
if (exceptions && url) {
|
||||
if (exceptions.url) for (const item of exceptions.url) if (item == url.href) return true
|
||||
if (exceptions.regex) for (const item of exceptions.regex) if (new RegExp(item).test(url.href)) return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
|
@ -176,8 +176,12 @@ browser.contextMenus.onClicked.addListener(async (info) => {
|
|||
return
|
||||
}
|
||||
case 'copyReverseTab': {
|
||||
const url = new URL(info.pageUrl)
|
||||
browser.tabs.query({ active: true, currentWindow: true }, async tabs => {
|
||||
if (tabs[0].url) {
|
||||
const url = new URL(tabs[0].url)
|
||||
servicesHelper.copyRaw(url)
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
case 'reverseTab': {
|
||||
|
|
Loading…
Reference in New Issue