Skip to content

Commit

Permalink
[:construction: WIP] First working version
Browse files Browse the repository at this point in the history
Features:
* Language detection
* Dynamic voice-population based on language
* User-friendly text picking
  • Loading branch information
tomlutzenberger committed Dec 20, 2017
1 parent 96d7049 commit 33e561d
Show file tree
Hide file tree
Showing 15 changed files with 2,704 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": ["minify-mangle-names", "minify-simplify", "minify-type-constructors"]
}
14 changes: 14 additions & 0 deletions .editorconfig
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
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
*.min.js
58 changes: 58 additions & 0 deletions .eslintrc.json
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"
}
}
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto
*.js text eol=lf
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
5 changes: 5 additions & 0 deletions .hound.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
jshint:
enabled: true

eslint:
enabled: true
38 changes: 38 additions & 0 deletions COMMIT_TEMPLATE
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>
22 changes: 22 additions & 0 deletions LICENSE
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.

32 changes: 32 additions & 0 deletions README.md
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
7 changes: 7 additions & 0 deletions inch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"files": {
"included": [
"src/*.js"
]
}
}
33 changes: 33 additions & 0 deletions package.json
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"
}
}
Loading

0 comments on commit 33e561d

Please sign in to comment.