Skip to content

Commit

Permalink
Merge pull request #36 from penge/counter-period
Browse files Browse the repository at this point in the history
Add counter options (show, period), change icon
  • Loading branch information
penge authored Nov 8, 2022
2 parents 1466096 + 7c35028 commit 4e27278
Show file tree
Hide file tree
Showing 32 changed files with 629 additions and 207 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
dist/
jest.config.js
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
],
"rules": {
"indent": ["error", 2],
"quotes": ["error", "double"],
"quotes": ["error", "double", { "avoidEscape": true }],
"semi": ["error", "always"],
"no-multi-spaces": ["error", { "ignoreEOLComments": true }],
"arrow-parens": ["error", "always"]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
dist/
.vscode
.DS_Store
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# Block Site

**Block Site** (formerly known as Stop Social Media) is a simple Chrome extension that improves your productivity by blocking access to distracting websites as you specify.
**Block Site** (formerly known as _Stop Social Media_) is a simple **Chrome extension** that improves your productivity by blocking access to distracting websites as you specify.

### Usage
## Icon

To configure, click on the **B** icon in the toolbar and select **Options** from the menu. Enter sites in the textbox, leaving a new line for each site, like this:
<img src="public/icon_128.png" height="48">

<img src="public/toolbar/light.png" height="48">
<img src="public/toolbar/dark.png" height="48">

## Usage

To configure, click on the **B** icon in the toolbar. Enter the sites you would like to block, each on a separate line, example:

```
facebook.com
Expand All @@ -18,10 +25,14 @@ reddit.com

Sites starting with `!` will be exception to the rule, allowed.

Choose what should be done when you try to visit a blocked site, options are:
Choose what should be done when you try to visit a blocked site:

<ol type="A">
<li>Close Tab</li>
<li>Show Blocked info page (page that shows an information about the blocked site)</li>
<li>Show Blocked info page (shows information about the blocked site, and if enabled, a blocked count over a specified period of time: All Time, This Month, This Week, Today)</li>
</ol>

Last but not least, see a checkbox to enable/disable the blocking.
## Privacy notice

Block Site doesn't collect any personal information or data.
Any user settings are stored in the browser only.
11 changes: 10 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@
"name": "Block Site",
"description": "Blocks access to distracting websites to improve your productivity.",
"version": "3.0.1",
"icons": { "128": "icon.png" },
"icons": {
"32": "icon_32.png",
"128": "icon_128.png"
},
"action": {
"default_icon": {
"32": "icon_32.png",
"128": "icon_128.png"
}
},
"options_page": "options.html",
"permissions": ["storage", "webNavigation"],
"background": {
Expand Down
139 changes: 82 additions & 57 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,22 @@
},
"scripts": {
"lint": "eslint src --ext .ts",
"test": "jest",
"build": "tsup && npm run copy",
"test": "TZ=UTC jest",
"build": "tsc --noEmit && tsup && npm run copy",
"copy": "copyfiles --up 1 public/** dist && copyfiles manifest.json dist"
},
"devDependencies": {
"@types/chrome": "^0.0.198",
"@types/chrome": "^0.0.200",
"@types/jest": "^29.1.2",
"@typescript-eslint/eslint-plugin": "^5.40.0",
"@typescript-eslint/parser": "^5.40.0",
"@typescript-eslint/eslint-plugin": "^5.41.0",
"@typescript-eslint/parser": "^5.41.0",
"copyfiles": "^2.4.1",
"eslint": "^8.25.0",
"eslint": "^8.26.0",
"jest": "^29.2.0",
"ts-jest": "^29.0.3",
"tsup": "^6.3.0"
},
"dependencies": {
"dayjs": "^1.11.6"
}
}
2 changes: 1 addition & 1 deletion public/blocked.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#url {
#rule {
font-family: monospace;
opacity: .3;
}
Loading

0 comments on commit 4e27278

Please sign in to comment.