diff --git a/Makefile b/Makefile index 524c263..c28d21c 100644 --- a/Makefile +++ b/Makefile @@ -339,7 +339,24 @@ snark-mirror: seed: cp -v "./i2ppb-$(VERSION)@eyedeekay.github.io.xpi.torrent" "$(HOME)/.i2p/i2psnark" cp -v "../i2ppb-$(VERSION)@eyedeekay.github.io.xpi" "$(HOME)/.i2p/i2psnark" - + wire: cp -v "./i2ppb-$(VERSION)@eyedeekay.github.io.xpi.torrent" "$(HOME)/i2p/MuWireDownloads/" cp -v "../i2ppb-$(VERSION)@eyedeekay.github.io.xpi" "$(HOME)/i2p/MuWireDownloads/" + +test: + web-ext run -u about:debugging \ + -u http://127.0.0.1:7657/home \ + -u http://127.0.0.1:7657/i2ptunnel \ + -u http://127.0.0.1:7657/i2psnark \ + -u http://127.0.0.1:7657/webmail \ + -u http://idk.i2p + +lht-test: + web-ext run -u about:debugging \ + -u http://localhost:7657/home \ + -u http://localhost:7657/i2ptunnel \ + -u http://localhost:7657/i2psnark \ + -u http://localhost:7657/webmail \ + -u http://localhost:7657/MuWire/ \ + -u http://idk.i2p diff --git a/background.js b/background.js index 94ffdb7..bb10c5e 100644 --- a/background.js +++ b/background.js @@ -14,8 +14,19 @@ var ircpref = chrome.i18n.getMessage('ircPreface'); var ircprefpriv = chrome.i18n.getMessage('ircPrefacePrivate'); var extensionpref = chrome.i18n.getMessage('extensionPreface'); var muwirepref = chrome.i18n.getMessage('muwirePreface'); +var muwireprefpriv = chrome.i18n.getMessage('muwirePrefacePrivate'); var botepref = chrome.i18n.getMessage('botePreface'); +function onError(err) { + console.log('(background)', err); +} + +function onContextGotLog(contexts) { + if (contexts != null) { + console.log(contexts); + } +} + function onContextsGot(contexts) { var ids = []; for (let context of contexts) { @@ -370,29 +381,31 @@ function handleUpdated(updateInfo) { them.originalTheme.images == null && them.originalTheme.properties == null) ) { - if ( - updateInfo.theme.colors.frame != "#4456B7" && - updateInfo.theme.colors.frame != "#363A68" - ) { - function onSet() { - console.log("stored theme:", updateInfo.theme); - } + if (updateInfo.theme.colors != null) { if ( - updateInfo.theme.colors != null || - updateInfo.theme.images != null || - updateInfo.theme.properties != null + updateInfo.theme.colors.frame != "#4456B7" && + updateInfo.theme.colors.frame != "#363A68" ) { - console.log("storing theme:", updateInfo.theme); - browser.storage.local - .set({ originalTheme: updateInfo.theme }) - .then(onSet, onError); + function onSet() { + console.log("stored theme:", updateInfo.theme); + } + if ( + updateInfo.theme.colors != null && + updateInfo.theme.images != null && + updateInfo.theme.properties != null + ) { + console.log("storing theme:", updateInfo.theme); + browser.storage.local + .set({ originalTheme: updateInfo.theme }) + .then(onSet, onError); + } } } } else { console.log("keeping stored theme:", them); } - } catch { - console.log("theme storage error"); + } catch (e) { + console.log("theme storage error", e); } } browser.storage.local.get("originalTheme").then(maybeSet, onError); diff --git a/bookmarks.js b/bookmarks.js index 62223a9..854515a 100644 --- a/bookmarks.js +++ b/bookmarks.js @@ -182,6 +182,7 @@ function bookmarksSetup() { title: 'I2P Console', }); b4.then(bookConsole, onRejected); + defaultSettings['bookmarks_state'] = true; } var bt = browser.bookmarks.search({ @@ -190,7 +191,6 @@ function bookmarksSetup() { function toolDir(bookmarkToolbar) { let defaultSettings = {}; - defaultSettings['bookmarks_state'] = true; chrome.storage.local.set(defaultSettings); console.log('(bookmarks) created'); var ibbt = browser.bookmarks.search('I2P Toolbar'); diff --git a/handler.js b/handler.js index b1113b2..740132f 100644 --- a/handler.js +++ b/handler.js @@ -109,9 +109,8 @@ var handlerSetup = function(requestDetails) { } return requestDetails; }; - -browser.webRequest.onBeforeRequest.addListener( - handlerSetup, - { urls: [''] }, - ['blocking'] -); +/* +browser.webRequest.onBeforeRequest.addListener(handlerSetup, { + urls: [''], +}); +*/ diff --git a/i2ppb@eyedeekay.github.io.xpi.torrent b/i2ppb@eyedeekay.github.io.xpi.torrent index fb3b3d9..4ace44f 100644 Binary files a/i2ppb@eyedeekay.github.io.xpi.torrent and b/i2ppb@eyedeekay.github.io.xpi.torrent differ diff --git a/index.html b/index.html index e5f7fdc..3d3a565 100644 --- a/index.html +++ b/index.html @@ -38,7 +38,7 @@