release: v3.0 (v3.0.1 on Firefox)
This commit is contained in:
commit
f15173c122
16 changed files with 440 additions and 0 deletions
57
missing_permissions/index.html
Normal file
57
missing_permissions/index.html
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>FD Transparent - Permissions Manquantes</title>
|
||||
<style>
|
||||
body {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
p, button {
|
||||
font-family: "comic sans ms";
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 6px;
|
||||
border-width: 2px;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
body > div {
|
||||
padding: 0 10px; /* ugly padding */
|
||||
border: solid 2px black; /* ugly borders */
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
p > img {
|
||||
display: inline-block;
|
||||
height: 1.5em;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
#boutonbox {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<p id="msg">
|
||||
...
|
||||
</p>
|
||||
<p id="boutonbox">
|
||||
<button id="bouton" style="display: inline-block; text-align: right;">
|
||||
Accorder la permission
|
||||
</button>
|
||||
<- bouton moche
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript" src="/permissions.js"></script>
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
31
missing_permissions/script.js
Normal file
31
missing_permissions/script.js
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
function hideBouton() {
|
||||
document.getElementById('boutonbox').style.display = "none";
|
||||
}
|
||||
|
||||
function showBouton() {
|
||||
document.getElementById('boutonbox').style.display = "block";
|
||||
}
|
||||
|
||||
document.getElementById('bouton').addEventListener("click", () => {
|
||||
askPermissions(browser).then((hello) => {
|
||||
updateMsg();
|
||||
});
|
||||
});
|
||||
|
||||
function updateMsg() {
|
||||
hasPermissions(browser).then((hasPerm) => {
|
||||
let txt;
|
||||
if (hasPerm) {
|
||||
hideBouton();
|
||||
txt = "permission accordée ! <img src='zy_lezgo.png' />";
|
||||
}
|
||||
else {
|
||||
showBouton();
|
||||
txt = "<img src='zy_awaiting.png' /> pour que FD Transparent puisse fonctionner, il faut que vous permettiez à l'extension l'accès aux pages du Forum Dessiné en appuyant sur le bouton moche";
|
||||
}
|
||||
document.getElementById("msg").innerHTML = txt;
|
||||
});
|
||||
}
|
||||
updateMsg();
|
||||
}
|
||||
BIN
missing_permissions/zy_awaiting.png
Normal file
BIN
missing_permissions/zy_awaiting.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.3 KiB |
BIN
missing_permissions/zy_lezgo.png
Normal file
BIN
missing_permissions/zy_lezgo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.9 KiB |
Loading…
Add table
Add a link
Reference in a new issue