Veraltete getURL Funktion behoben und Chrome kompatibilität hinzugefügt
This commit is contained in:
parent
5b52ccc184
commit
f9288df638
@ -2,7 +2,7 @@
|
||||
|
||||
"manifest_version": 2,
|
||||
"name": "Witzig! - Nicht Witzig!",
|
||||
"version": "0.3",
|
||||
"version": "0.4",
|
||||
|
||||
"description": "Replaces the thumb up and down in YouTube with a Witzig! and a Nicht Witzig! stamp.",
|
||||
|
||||
|
@ -20,6 +20,10 @@ function log(msg) {
|
||||
console.log("W!NW!: " + msg);
|
||||
}
|
||||
|
||||
function getURL(path) {
|
||||
return chrome.runtime.getURL(path) || browser.runtime.getURL(path);
|
||||
}
|
||||
|
||||
/*
|
||||
Grafikfunktionen
|
||||
*/
|
||||
@ -50,9 +54,9 @@ function inject() {
|
||||
log("Stempelfläche vergrößert.");
|
||||
var image_container_object = document.querySelectorAll(image_container_path);
|
||||
log("Packe Stempel aus...");
|
||||
inject_image(image_container_object[0], browser.extension.getURL("media/sticker-witzig.png"));
|
||||
inject_image(image_container_object[0], getURL("media/sticker-witzig.png"));
|
||||
log("Witzig!");
|
||||
inject_image(image_container_object[1], browser.extension.getURL("media/sticker-nicht-witzig.png"));
|
||||
inject_image(image_container_object[1], getURL("media/sticker-nicht-witzig.png"));
|
||||
log("Nicht Witzig!");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user