port to firefox
This commit is contained in:
parent
daa7f81c7a
commit
f39b89efcb
1
_locales/en/messages.json
Normal file
1
_locales/en/messages.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{}
|
@ -1,15 +1,17 @@
|
|||||||
{
|
{
|
||||||
"name": "redirect",
|
"browser_action": {
|
||||||
"version": "0.1.0",
|
"default_title": "redirect",
|
||||||
"description": "create a redirect directly",
|
"default_popup": "popup.html"
|
||||||
"permissions": ["storage", "tabs"],
|
},
|
||||||
"background": {
|
"content_security_policy": "script-src 'self' https://example.com; object-src 'self'",
|
||||||
"service_worker": "background.js"
|
"default_locale": "en",
|
||||||
},
|
"description": "create a redirect directly",
|
||||||
"action": {
|
"manifest_version": 2,
|
||||||
"default_icon": "assets/my-icon.png",
|
"name": "redirect",
|
||||||
"default_title": "redirect",
|
"page_action": {
|
||||||
"default_popup": "popup.html"
|
"default_title": "redirect",
|
||||||
},
|
"default_popup": "popup.html"
|
||||||
"manifest_version": 3
|
},
|
||||||
|
"permissions": ["webNavigation", "tabs"],
|
||||||
|
"version": "0.1"
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
function newRedirect () {
|
function newRedirect () {
|
||||||
chrome.tabs.query({active: true, lastFocusedWindow: true}, tabs => {
|
browser.tabs.query({currentWindow: true, active: true}, tabs => {
|
||||||
let currentUrl = tabs[0].url;
|
let currentUrl = tabs[0].url;
|
||||||
const url = `${config.shlinkUrl}/rest/v3/short-urls`;
|
const url = `${config.shlinkUrl}/rest/v3/short-urls`;
|
||||||
let sendData = {
|
let sendData = {
|
||||||
|
Reference in New Issue
Block a user