Added link to standalone options page.

As mentioned in #221.
This commit is contained in:
kkapsner 2018-08-18 22:41:34 +02:00
parent 635912c8b9
commit 34019f2515
5 changed files with 30 additions and 0 deletions

View File

@ -43,6 +43,10 @@
"message": "CanvasBlocker wurde aktualisiert. Wenn Sie diese Seite in Zukunft erreichen wollen und noch kein Lesezeichen erstellt haben, erstellen Sie bitte eines.",
"description": ""
},
"openInTab": {
"message": "In separatem Tab öffnen",
"description": ""
},
"section_asking": {
"message": "Nachfragen",

View File

@ -43,6 +43,10 @@
"message": "CanvasBlocker was updated. If you want to be able to access this page in the future and have not bookmarked it, please bookmark it.",
"description": ""
},
"openInTab": {
"message": "Open in separate tab",
"description": ""
},
"section_asking": {
"message": "Asking",

View File

@ -188,6 +188,17 @@ td.hideColumn {
background-image: url(notVisible.svg);
}
.optionsLink {
text-align: right;
font-size: 0.8em;
}
.optionsLink a {
text-decoration: none;
}
.optionsLink a:hover {
text-decoration: underline;
}
.version {
text-align: right;
color: gray;

View File

@ -71,6 +71,16 @@
document.body.classList.add("standalone");
}
else {
const linkDiv = document.createElement("div");
linkDiv.className = "optionsLink";
const link = document.createElement("a");
link.href = window.location.href;
link.target = "_blank";
link.textContent = browser.i18n.getMessage("openInTab");
linkDiv.appendChild(link);
head.appendChild(linkDiv);
}
});
var table = document.createElement("table");

View File

@ -4,6 +4,7 @@ Version 0.5.3:
new features:
- display version in options page
- added link to open options page in separate tab
fixes:
- CSP did not work properly for worker-src