mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Show options page on install or update
But only when pageAction is not available (i.e. Fennec)
This commit is contained in:
parent
77e079e5cc
commit
2b92481004
6 changed files with 44 additions and 12 deletions
|
@ -44,11 +44,15 @@
|
|||
introduction.textContent = browser.i18n.getMessage("optionsIntroduction");
|
||||
head.appendChild(introduction);
|
||||
|
||||
if (window.location.search === "?installed"){
|
||||
let bookmarkingNotice = document.createElement("div");
|
||||
bookmarkingNotice.className = "installedNotice";
|
||||
bookmarkingNotice.textContent = browser.i18n.getMessage("installedNotice");
|
||||
head.appendChild(bookmarkingNotice);
|
||||
if (window.location.search){
|
||||
let noticeName = window.location.search.substr(1).trim() + "Notice";
|
||||
let notice = browser.i18n.getMessage(noticeName);
|
||||
if (notice){
|
||||
let bookmarkingNotice = document.createElement("div");
|
||||
bookmarkingNotice.className = noticeName + " bookmarkNotice";
|
||||
bookmarkingNotice.textContent = notice;
|
||||
head.appendChild(bookmarkingNotice);
|
||||
}
|
||||
}
|
||||
|
||||
document.body.appendChild(head);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue