From 749b088fe999fcbebc9ae327f7d0050d5ad417d7 Mon Sep 17 00:00:00 2001 From: kkapsner Date: Sun, 13 Nov 2016 15:34:33 +0100 Subject: [PATCH] Added button in options site to display release notes. Fixes #83 --- .jpmignore | 1 + lib/check.js | 2 +- lib/main.js | 5 +++++ locale/de-DE.json | 5 ++++- locale/en-US.json | 5 ++++- package.json | 6 ++++++ releaseNotes.txt | 12 ++++++++++++ 7 files changed, 33 insertions(+), 3 deletions(-) diff --git a/.jpmignore b/.jpmignore index c814be4..ad0fd14 100644 --- a/.jpmignore +++ b/.jpmignore @@ -4,6 +4,7 @@ *.zip .* *.txt +!releaseNotes.txt *.md test/ addon description/ diff --git a/lib/check.js b/lib/check.js index 3f9157f..fe9e5d5 100644 --- a/lib/check.js +++ b/lib/check.js @@ -87,7 +87,7 @@ mode = "allow"; break; default: - console.log("Unknown blocking mode (" + blockMode + "). Default to block everything."); + // console.log("Unknown blocking mode (" + blockMode + "). Default to block everything."); } return mode; } diff --git a/lib/main.js b/lib/main.js index af46504..7a06838 100644 --- a/lib/main.js +++ b/lib/main.js @@ -81,4 +81,9 @@ return _(ev.data); }); + var data = require("sdk/self").data; + preferences.on("showReleaseNotes", function(){ + var url = data.url("releaseNotes.txt").replace("/data/", "/"); + require("sdk/tabs").open(url); + }); }()); \ No newline at end of file diff --git a/locale/de-DE.json b/locale/de-DE.json index 69721fd..d53fd61 100644 --- a/locale/de-DE.json +++ b/locale/de-DE.json @@ -64,5 +64,8 @@ "whiteList_description": "Domänen oder URLs, die die -API verwenden dürfen. Mehrere Einträge müssen durch ein Komma getrennt werden.", "whiteList_title": "Whitelist", "whitelistDomain": "erlaube Domain", - "whitelistURL": "erlaube URL" + "whitelistURL": "erlaube URL", + + "showReleaseNotes_title": "Versionsinformationen" + "showReleaseNotes_label": "Anzeigen" } \ No newline at end of file diff --git a/locale/en-US.json b/locale/en-US.json index d0ed0aa..667c3fd 100644 --- a/locale/en-US.json +++ b/locale/en-US.json @@ -65,5 +65,8 @@ "whiteList_description": "Domains or URLs where the -API should not be blocked. To add multiple entries, separate them by commas.", "whitelist": "whitelist", "whitelistDomain": "whitelist domain", - "whitelistURL": "whitelist URL" + "whitelistURL": "whitelist URL", + + "showReleaseNotes_title": "Release notes", + "showReleaseNotes_label": "Show" } \ No newline at end of file diff --git a/package.json b/package.json index 11c0023..bcc6745 100644 --- a/package.json +++ b/package.json @@ -134,6 +134,12 @@ "title": "File specific white list", "type": "string", "value": "" + }, + { + "name": "showReleaseNotes", + "title": "Release notes", + "type": "control", + "label": "Show" } ], "main": "lib/main.js", diff --git a/releaseNotes.txt b/releaseNotes.txt index dc0d8d4..604d04a 100644 --- a/releaseNotes.txt +++ b/releaseNotes.txt @@ -1,3 +1,15 @@ +Version 0.3.3: + changes: + - switching of the mode, white- and black-listing only affects new loaded pages + + new features: + - auto close of the notifications (preference) + - button to show the release notes + + fixes: + - "about:"-tabs could not be dragged + - performance issues + Version 0.3.2: new features: - "fake at input" mode