Skip to content

Commit

Permalink
fix #4: blockpage was not persisted
Browse files Browse the repository at this point in the history
  • Loading branch information
serv-inc committed Aug 13, 2018
1 parent bd44930 commit da5319f
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 63 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ lint:
python2 -m json.tool addon/preset.json > /dev/null
python2 -m json.tool addon/schema.json > /dev/null
# tidy unavailable on OpenBSD
#tidy -eq addon/options.html
#tidy -eq addon/blockpage.html
tidy -eq addon/options.html
tidy -eq addon/blockpage.html
./check_schema_equals_preset.sh

3 changes: 3 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ A content filter for websites, emulating dansguardian's score-based filter in Ja
[[https://addons.mozilla.org/de/firefox/addon/jsguardian/][https://img.shields.io/amo/d/jsguardian.svg]]
[[https://chrome.google.com/webstore/detail/jsguardian/ojofglimbmclnbinpbjnhcmkmipplibi][https://img.shields.io/chrome-web-store/v/ojofglimbmclnbinpbjnhcmkmipplibi.svg]]
* Versions
** 1.4.1
*** Failed
to persist the blockpage, credits to hllwdfr@github
** 1.4.0
*** Lacked
speed: Was perceived as too slow to block, due to when the script loaded, and when it showed the block page.
Expand Down
2 changes: 1 addition & 1 deletion addon/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,

"name": "Web Content Filter (within your Browser)",
"version": "1.4.0",
"version": "1.4.1",

"short_name": "Web Content Filter",
"author": "serv-inc",
Expand Down
109 changes: 55 additions & 54 deletions addon/preset.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions addon/schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"type": "object",
"properties": {
"limit": {
"description": "maximum score for which to allow page",
"type": "integer"
"blockpage": {
"description": "if set, use this instead of blockpage",
"type": "string"
},
"blockvals": {
"type": "array",
Expand All @@ -15,9 +15,9 @@
}
}
},
"blockpage": {
"description": "if set, use this instead of blockpage",
"type": "string"
"limit": {
"description": "maximum score for which to allow page",
"type": "integer"
},
"whitelist": {
"description": "regex string to whitelist sites",
Expand Down
3 changes: 3 additions & 0 deletions check_schema_equals_preset.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### checks that these have the same keys
#! /usr/bin/env bash
[ "$(jq 'keys' addon/preset.json)" = "$(jq '.properties | keys' addon/schema.json)" ]

0 comments on commit da5319f

Please sign in to comment.