gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[reclaim-webextension] 05/95: udate


From: gnunet
Subject: [reclaim-webextension] 05/95: udate
Date: Fri, 11 Jun 2021 23:34:50 +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 c491f9c4f05eb9c02e3464ccf64ef83172606324
Author: Schanzenbach, Martin <mschanzenbach@posteo.de>
AuthorDate: Tue Apr 30 19:41:53 2019 +0200

    udate
---
 background/reclaim.js | 14 ++++++++------
 popup/popup.js        |  4 +++-
 scripts/gnunet.js     | 10 +++-------
 ui                    |  2 +-
 4 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/background/reclaim.js b/background/reclaim.js
index 9b05596..aa9bfb8 100644
--- a/background/reclaim.js
+++ b/background/reclaim.js
@@ -3,14 +3,14 @@ const defaultSettings = {
     reclaim_alive: false,
 };
 
-browser.storage.local.set(defaultSettings);
+chrome.storage.local.set(defaultSettings);
 
 const authzSettings = {
     search: null,
     request: false
 };
 
-browser.storage.local.set(authzSettings);
+chrome.storage.local.set(authzSettings, function() {});
 
 function handle_onbefore_request(request)
 {
@@ -21,11 +21,11 @@ function handle_onbefore_request(request)
         console.log(browser.runtime.getURL("index.html/#/identities") + 
url.search);
         authzSettings.search = decodeURIComponent(request.url).split("?")[1];
         authzSettings.request = true;
-        browser.storage.local.set(authzSettings);
+        chrome.storage.local.set(authzSettings, function() {});
         console.log(authzSettings);
         //browser.runtime.openOptionsPage();
         //return {};
-        return {"redirectUrl": browser.runtime.getURL("index.html?") + 
decodeURIComponent(request.url).split("?")[1]}
+        return {"redirectUrl": chrome.runtime.getURL("index.html?") + 
decodeURIComponent(request.url).split("?")[1]}
     }
     if (url.hostname == "api.reclaim") {
         return {"redirectUrl": "http://localhost:7776"; + url.pathname + 
url.search};
@@ -33,10 +33,12 @@ function handle_onbefore_request(request)
 
 }
 
-browser.webRequest.onBeforeRequest.addListener(handle_onbefore_request,
+chrome.webRequest.onBeforeRequest.addListener(handle_onbefore_request,
     {
         urls: ["*://*.reclaim/*"],
-        types: ["beacon", "csp_report", "font", "image", "imageset", 
"main_frame", "media", "object", "ping", "speculative", "stylesheet", 
"sub_frame", "web_manifest", "websocket", "xbl", "xml_dtd", "xslt", "other", 
"script", "xmlhttprequest"]
+        //types: ["beacon", "csp_report", "font", "image", "imageset", 
"main_frame", "media", "object", "ping", "speculative", "stylesheet", 
"sub_frame", "web_manifest", "websocket", "xbl", "xml_dtd", "xslt", "other", 
"script", "xmlhttprequest"]
+        types: ["csp_report", "font", "image", "main_frame", "media", 
"object", "ping", "stylesheet", "sub_frame", "websocket", "other", "script", 
"xmlhttprequest"]
+
     },
     ["blocking"]
 );
diff --git a/popup/popup.js b/popup/popup.js
index 2c3e784..02bac66 100644
--- a/popup/popup.js
+++ b/popup/popup.js
@@ -25,7 +25,9 @@ function onError(e) {
 }
 
 // On opening the options page, fetch stored settings and update the UI with 
them.
-browser.storage.local.get().then(updateUI, onError);
+chrome.storage.local.get(['reclaim_alive'], function(result) {
+  updateUI(result);
+});
 
 // Whenever the contents of the textarea changes, save the new values
 //reclaim_active.addEventListener("change", storeSettings);
diff --git a/scripts/gnunet.js b/scripts/gnunet.js
index 3245362..099b5fb 100644
--- a/scripts/gnunet.js
+++ b/scripts/gnunet.js
@@ -1,7 +1,7 @@
 function check_reclaim() {
 
   var xmlHttp = new XMLHttpRequest();
-  xmlHttp.open('GET', 'http://localhost:7776/identity/all', false);
+  xmlHttp.open('GET', 'http://localhost:7776/identity/all', true);
 
   xmlHttp.onreadystatechange = function() {
     if (xmlHttp.readyState == XMLHttpRequest.DONE) {
@@ -12,15 +12,11 @@ function check_reclaim() {
 
       if (!OK) {
         var reclaim_alive = false;
-        browser.storage.local.set({
-                                  reclaim_alive,
-        });
+        chrome.storage.local.set({reclaim_alive}, function() {});
         console.log("reclaim down");
       } else {
         var reclaim_alive = true;
-        browser.storage.local.set({
-                                  reclaim_alive,
-        });
+        chrome.storage.local.set({reclaim_alive}, function() {});
         console.log("reclaim up");
       }
     }
diff --git a/ui b/ui
index 9c9ba8c..1b950bf 160000
--- a/ui
+++ b/ui
@@ -1 +1 @@
-Subproject commit 9c9ba8ccc90a841f223bbaf0eb7cc04924308f75
+Subproject commit 1b950bf7679679b389b255f4e731e2136f310f4d

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]