release: v3.0 (v3.0.1 on Firefox)

This commit is contained in:
mcolonna 2024-05-04 11:09:12 +02:00
commit f15173c122
16 changed files with 440 additions and 0 deletions

View 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>
&lt;- bouton moche
</p>
</div>
<script type="text/javascript" src="/permissions.js"></script>
<script type="text/javascript" src="script.js"></script>
</body>
</html>

View 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();
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB