Fixed chromium detection
This commit is contained in:
parent
e70f787c6d
commit
a78e337f9e
|
@ -1,5 +1,6 @@
|
|||
import utils from "./utils.js"
|
||||
|
||||
const isChrome = browser.runtime.getBrowserInfo === undefined
|
||||
window.browser = window.browser || window.chrome
|
||||
|
||||
let config, options
|
||||
|
@ -807,7 +808,7 @@ async function copyRaw(url, test) {
|
|||
const newUrl = await reverse(url)
|
||||
if (newUrl) {
|
||||
if (!test) {
|
||||
if (window.browser) {
|
||||
if (!isChrome) {
|
||||
navigator.clipboard.writeText(newUrl)
|
||||
} else {
|
||||
var copyFrom = document.createElement("textarea");
|
||||
|
|
|
@ -4,6 +4,7 @@ import generalHelper from "../../assets/javascripts/general.js"
|
|||
import utils from "../../assets/javascripts/utils.js"
|
||||
import servicesHelper from "../../assets/javascripts/services.js"
|
||||
|
||||
const isChrome = browser.runtime.getBrowserInfo === undefined
|
||||
window.browser = window.browser || window.chrome
|
||||
|
||||
browser.runtime.onInstalled.addListener(async details => {
|
||||
|
@ -139,7 +140,7 @@ browser.contextMenus.create({
|
|||
contexts: ["link"],
|
||||
})
|
||||
|
||||
if (window.browser) {
|
||||
if (!isChrome) {
|
||||
browser.contextMenus.create({
|
||||
id: "redirectBookmark",
|
||||
title: 'Redirect',
|
||||
|
|
Loading…
Reference in New Issue