[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[reclaim-webextension] 03/95: 0.0.1
From: |
gnunet |
Subject: |
[reclaim-webextension] 03/95: 0.0.1 |
Date: |
Fri, 11 Jun 2021 23:34:48 +0200 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository reclaim-webextension.
commit 92547889eef4dad7c3199c3bb0f456de8ca2044d
Author: Schanzenbach, Martin <mschanzenbach@posteo.de>
AuthorDate: Mon Apr 29 20:33:59 2019 +0200
0.0.1
---
background/reclaim.js | 6 ++++++
bin/build_plugin | 2 +-
icons/logo.png | Bin 3387 -> 6034 bytes
popup/popup.html | 24 +++++++++++++++++-------
popup/popup.js | 38 +++++++++++++++++---------------------
scripts/gnunet.js | 2 +-
6 files changed, 42 insertions(+), 30 deletions(-)
diff --git a/background/reclaim.js b/background/reclaim.js
index f6758d9..9b05596 100644
--- a/background/reclaim.js
+++ b/background/reclaim.js
@@ -1,4 +1,10 @@
// Default settings. If there is nothing in storage, use these values.
+const defaultSettings = {
+ reclaim_alive: false,
+};
+
+browser.storage.local.set(defaultSettings);
+
const authzSettings = {
search: null,
request: false
diff --git a/bin/build_plugin b/bin/build_plugin
index 777cf4e..2ecae44 100755
--- a/bin/build_plugin
+++ b/bin/build_plugin
@@ -18,6 +18,6 @@ cd ..
rm -rf ui
-zip -r $DEST/gnunet-connector.zip -FS *
+zip -r $DEST/reclaim-plugin.zip -FS *
rm -rf $TEMPDIR
cd $DEST
diff --git a/icons/logo.png b/icons/logo.png
index eaf6df1..a8c1ddf 100644
Binary files a/icons/logo.png and b/icons/logo.png differ
diff --git a/popup/popup.html b/popup/popup.html
index e9b513d..4b6aa0b 100644
--- a/popup/popup.html
+++ b/popup/popup.html
@@ -13,15 +13,25 @@
<table border=1 frame=void rules=rows>
<tr>
<td>
- <a target="_blank" href="../index.html"><img class="reclaim-logo"
-
src="../assets/reclaim_icon.png"/></a>
+ <a target="_blank" href="../index.html" id="reclaim-logo"><img
class="reclaim-logo"
+
src="../assets/reclaim_icon.png"/>
+ </a>
</td>
<td>
- <label class="reclaim-checkbox">
- <input class="fas fa-toggle-on" type="checkbox"
id="reclaim-active">
- <span class="checked"><i class="fas fa-toggle-on"></i> On</span>
- <span class="unchecked"><i class="fas fa-toggle-off"></i>
Off</span>
- </label>
+ <a target="_blank" href="../index.html" id="reclaim-link">
+ <i class="fas fa-link"></i>
+ </a>
+ </td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ STATUS:
+ </td>
+ <td>
+ <i class="fas fa-skull-crossbones" style="color: #b30000;"
id="reclaim-dead"></i>
+ <i class="fas fa-heartbeat" style="color: #3399ff;"
id="reclaim-alive"></i>
</td>
</tr>
</table>
diff --git a/popup/popup.js b/popup/popup.js
index 943206c..2c3e784 100644
--- a/popup/popup.js
+++ b/popup/popup.js
@@ -1,31 +1,27 @@
-const reclaim_active = document.querySelector("#reclaim-active");
-//const reclaim_active = document.querySelector("#reclaim-active");
-
-// Store the currently selected settings using browser.storage.local.
-function storeSettings() {
- let reclaim_enabled = reclaim_active.checked;
- browser.storage.local.set({
- reclaim_enabled,
- //reclaim_enabled
- });
-}
+const reclaim_link = document.querySelector("#reclaim-link");
+const reclaim_logo = document.querySelector("#reclaim-logo");
+const reclaim_dead = document.querySelector("#reclaim-dead");
+const reclaim_alive = document.querySelector("#reclaim-alive");
// Update the options UI with the settings values retrieved from storage,
// or the default settings if the stored settings are empty.
function updateUI(restoredSettings) {
- if (restoredSettings.reclaim_alive) {
- reclaim_active.disabled = false;
- gnunet_warning.style.display = "none";
- console.log("Show warning");
- } else {
- reclaim_active.disabled = false; //Always disabled
- console.log("Hiding warning.");
- }
- reclaim_active.checked = restoredSettings.reclaim_enabled;
+ if (restoredSettings.reclaim_alive) {
+ reclaim_link.style.display = 'inline-block';
+ reclaim_alive.style.display = 'inline-block';
+ reclaim_dead.style.display = 'none';
+ reclaim_logo.href = "../index.html";
+ } else {
+ reclaim_logo.removeAttribute("href");
+ reclaim_dead.style.display = 'inline-block';
+ reclaim_alive.style.display = 'none';
+ reclaim_link.style.display = 'none';
+ }
+ //reclaim_active.checked = restoredSettings.reclaim_alive;
}
function onError(e) {
- console.error(e);
+ console.error(e);
}
// On opening the options page, fetch stored settings and update the UI with
them.
diff --git a/scripts/gnunet.js b/scripts/gnunet.js
index ba94ee5..3245362 100644
--- a/scripts/gnunet.js
+++ b/scripts/gnunet.js
@@ -34,5 +34,5 @@ function check_reclaim() {
}
check_reclaim();
-var intervalId = setInterval(check_gnunet, 5000);
+var intervalId = setInterval(check_reclaim, 5000);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [reclaim-webextension] 14/95: change ui brnach, (continued)
- [reclaim-webextension] 14/95: change ui brnach, gnunet, 2021/06/11
- [reclaim-webextension] 15/95: update, gnunet, 2021/06/11
- [reclaim-webextension] 25/95: update to newer ui version, gnunet, 2021/06/11
- [reclaim-webextension] 21/95: update, gnunet, 2021/06/11
- [reclaim-webextension] 26/95: update deps, gnunet, 2021/06/11
- [reclaim-webextension] 18/95: update readme, gnunet, 2021/06/11
- [reclaim-webextension] 24/95: v0.0.4, gnunet, 2021/06/11
- [reclaim-webextension] 20/95: actually fix link, gnunet, 2021/06/11
- [reclaim-webextension] 23/95: update to new UI, gnunet, 2021/06/11
- [reclaim-webextension] 05/95: udate, gnunet, 2021/06/11
- [reclaim-webextension] 03/95: 0.0.1,
gnunet <=
- [reclaim-webextension] 17/95: version 0.0.3, gnunet, 2021/06/11
- [reclaim-webextension] 27/95: update ui;modify URIs, gnunet, 2021/06/11
- [reclaim-webextension] 28/95: update ui, gnunet, 2021/06/11
- [reclaim-webextension] 36/95: fix manifest warnings, gnunet, 2021/06/11
- [reclaim-webextension] 29/95: bump version, gnunet, 2021/06/11
- [reclaim-webextension] 32/95: v0.0.8, gnunet, 2021/06/11
- [reclaim-webextension] 42/95: update ui, gnunet, 2021/06/11
- [reclaim-webextension] 35/95: forgot manifest, gnunet, 2021/06/11
- [reclaim-webextension] 48/95: update to v0.2.3, gnunet, 2021/06/11
- [reclaim-webextension] 30/95: hotfix file permissions, gnunet, 2021/06/11