wip: toolbar icon
This commit is contained in:
parent
0be4526c4c
commit
0c8ce940a8
3 changed files with 18 additions and 3 deletions
3
background.js
Normal file
3
background.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
browser.browserAction.onClicked.addListener((tab) => {
|
||||||
|
console.log(tab.url);
|
||||||
|
});
|
|
@ -1,5 +1,6 @@
|
||||||
var buttonsize = 250;
|
var buttonsize = 250;
|
||||||
document.addEventListener("keyup", (event) =>{
|
|
||||||
|
document.addEventListener("keyup", (event) => {
|
||||||
if (event.ctrlKey && event.code == "Enter") {
|
if (event.ctrlKey && event.code == "Enter") {
|
||||||
console.log("pressed");
|
console.log("pressed");
|
||||||
var dashboard = document.querySelector('#lit-dashboard');
|
var dashboard = document.querySelector('#lit-dashboard');
|
||||||
|
@ -18,6 +19,7 @@ document.addEventListener("keyup", (event) =>{
|
||||||
function onError(error) {
|
function onError(error) {
|
||||||
console.log(`Error: ${error}`);
|
console.log(`Error: ${error}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteButtons(dashboard)
|
function deleteButtons(dashboard)
|
||||||
{
|
{
|
||||||
document.getElementById("dashboard-nextcloud-button").remove();
|
document.getElementById("dashboard-nextcloud-button").remove();
|
||||||
|
@ -98,4 +100,4 @@ function onGot(item) {
|
||||||
}
|
}
|
||||||
|
|
||||||
let getting = browser.storage.sync.get("baseUrl");
|
let getting = browser.storage.sync.get("baseUrl");
|
||||||
getting.then(onGot, onError);
|
getting.then(onGot, onError);
|
||||||
|
|
|
@ -29,6 +29,16 @@
|
||||||
"gecko": {
|
"gecko": {
|
||||||
"id": "addon@example.com"
|
"id": "addon@example.com"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"background": {
|
||||||
|
"scripts": ["background.js"]
|
||||||
|
},
|
||||||
|
"browser_action": {
|
||||||
|
"default_icon": {
|
||||||
|
"19": "button/geo-19.png",
|
||||||
|
"38": "button/geo-38.png"
|
||||||
|
},
|
||||||
|
"default_title": "Holsteincloud 3.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue