-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[:construction: WIP] First working version
Features: * Language detection * Dynamic voice-population based on language * User-friendly text picking
- Loading branch information
1 parent
96d7049
commit 33e561d
Showing
15 changed files
with
2,704 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"plugins": ["minify-mangle-names", "minify-simplify", "minify-type-constructors"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.js] | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
*.min.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es6": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
4 | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"no-extra-parens": [ | ||
"error", | ||
"all", | ||
{ "nestedBinaryExpressions": false } | ||
], | ||
"valid-jsdoc": [ | ||
"error", | ||
{ | ||
"prefer": { "arg": "param", "argument": "param" }, | ||
"preferType": { "Boolean": "Boolean", "Number": "Number", "object": "Object", "String": "String" }, | ||
"requireReturn": false, | ||
"requireReturnType": true, | ||
"requireReturnDescription": false | ||
} | ||
], | ||
"eqeqeq": [ | ||
"error", | ||
"always" | ||
], | ||
"no-alert": "error", | ||
"no-implicit-coercion": "error", | ||
"no-magic-numbers": "error", | ||
"no-multi-spaces": [ | ||
"error", | ||
{ | ||
"exceptions": { "VariableDeclarator": true, "Property": true } | ||
} | ||
], | ||
"no-multi-str": "error", | ||
"no-param-reassign": "error", | ||
"no-redeclare": "error", | ||
"no-unused-expressions": "error", | ||
"yoda": "error" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* text=auto | ||
*.js text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
jshint: | ||
enabled: true | ||
|
||
eslint: | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
[:bug: BUGFIX | ||
:ambulance: HOTFIX | ||
:lock: SECURITY | ||
:boom: BREAKING CHANGE | ||
:construction: WIP | ||
:sparkles: FEATURE | ||
:hammer: REFACTOR | ||
:zap: PERFORMANCE | ||
:art: FORMATTING | ||
:rotating_light: LINTING | ||
:lipstick: STYLING | ||
:bento: ASSET | ||
:fire: REMOVE | ||
:truck: RENAME | ||
:memo: DOCS | ||
:bulb: CODE DOCS | ||
:globe_with_meridians: I18N L10N | ||
:wheelchair: ACCESSIBILITY | ||
:pencil2: TYPO | ||
:wrench: CONFIG | ||
:rewind: REVERT | ||
:white_check_mark: TESTS | ||
:bookmark: RELEASE | ||
:rocket: DEPLOY | ||
:construction_worker: ADD CI | ||
:green_heart: FIX CI | ||
:heavy_plus_sign: ADD DEPENDENCY | ||
:heavy_minus_sign: REMOVE DEPENDENCY | ||
:arrow_down: DOWNGRADE DEPENDENCY | ||
:arrow_up: UPGRADE DEPENDENCY | ||
:page_facing_up: LICENSE | ||
:tada: INITIAL | ||
] Commit message | ||
|
||
Detailed description | ||
|
||
Fixes <ISSUE> | ||
Related to <ISSUE> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2017 Tom Lutzenberger | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# 📕 readerBookmarklet | ||
|
||
[![Releases](https://img.shields.io/github/release/tomlutzenberger/readerBookmarklet.svg?maxAge=3600&style=flat-square)](https://github.com/tomlutzenberger/readerBookmarklet/releases) | ||
[![License](https://img.shields.io/github/license/tomlutzenberger/readerBookmarklet.svg?maxAge=3600&style=flat-square)](https://github.com/tomlutzenberger/readerBookmarklet/blob/master/LICENSE) | ||
[![David](https://img.shields.io/david/tomlutzenberger/readerBookmarklet.svg?maxAge=3600&style=flat-square&label=dep)]() | ||
[![David DEV](https://img.shields.io/david/dev/tomlutzenberger/readerBookmarklet.svg?maxAge=3600&style=flat-square&label=devDep)]() | ||
[![Maintainability](https://api.codeclimate.com/v1/badges/214c62fd014b152dd4cc/maintainability)](https://codeclimate.com/github/tomlutzenberger/readerBookmarklet/maintainability) | ||
[![Documentation](https://inch-ci.org/github/tomlutzenberger/readerBookmarklet.svg?branch=master)](https://inch-ci.org/github/tomlutzenberger/readerBookmarklet) | ||
[![Made with Love](https://img.shields.io/badge/Made%20with-%E2%99%A5-red.svg?style=flat-square)]() | ||
|
||
## What it is | ||
|
||
readerBookmarklet is a dynamic bookmark written in pure JavaScript to a website's text through speech-synthesizing. | ||
|
||
## How to use | ||
|
||
1. Open your favorite browser | ||
1. Create a new bookmark | ||
1. Copy the contents of [readerBookmarklet.min.js](src/readerBookmarklet.min.js) and paste it in the new bookmark's URL field | ||
1. Add a nice name to the bookmark (I chose 📕) | ||
|
||
## Contribution | ||
|
||
If you find a case where the script could be improved or a bug needs to be fixed, just file an issue and I look into it. | ||
|
||
## License | ||
|
||
This script is published under the **MIT License** and can be used for any commercial and personal projects. | ||
|
||
## Changelog | ||
|
||
- 2017-12-20 [**v0.1**](https://github.com/tomlutzenberger/readerBookmarklet/releases/tag/v0.1) Working version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"files": { | ||
"included": [ | ||
"src/*.js" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "reader-bookmarklet", | ||
"version": "0.1.0", | ||
"description": "Dynamic Bookmarklet to read text from a website", | ||
"main": "src/readerBookmarklet.js", | ||
"scripts": { | ||
"minify:compile": "babili src/readerBookmarklet.js --out-file src/readerBookmarklet.min.js", | ||
"minify:wrap": "cat src/readerBookmarklet.min.js | wrap 'javascript:!(()=>{' '})();' > tmpfile && cat tmpfile > src/readerBookmarklet.min.js && rm tmpfile", | ||
"minify": "yarn run minify:compile && yarn run minify:wrap", | ||
"compile": "yarn run minify", | ||
"lint": "eslint --config .eslintrc.json src/", | ||
"build": "yarn run compile && yarn run lint && yarn autoclean" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/tomlutzenberger/readerBookmarklet.git" | ||
}, | ||
"author": "Tom Lutzenberger", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/tomlutzenberger/readerBookmarklet/issues" | ||
}, | ||
"homepage": "https://tomlutzenberger.github.io/readerBookmarklet/", | ||
"devDependencies": { | ||
"babel-plugin-minify-mangle-names": "^0.2.0", | ||
"babel-plugin-minify-simplify": "^0.2.0", | ||
"babel-plugin-minify-type-constructors": "^0.2.0", | ||
"babili": "^0.1.4", | ||
"cmd-wrap": "^1.0.4", | ||
"eslint": "^4.10.x", | ||
"eslint-config-standard": "^10.2.x" | ||
} | ||
} |
Oops, something went wrong.