-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
91 additions
and
8 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,61 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Typescript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# Github config | ||
_config.yml |
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
Add the following piece (no pun intended) of code before the closing ```</body>``` tag on your website to promote **PEACE.JS**: | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/gh/humancopy/[email protected].5/dist/peace.min.js" async></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].6/dist/peace.min.js" async></script> | ||
``` | ||
|
||
*You can actually paste it anywhere inside the ```<body>```. It will inject itself at the same DOM level as the ```<script>``` tag.* | ||
|
@@ -13,23 +13,23 @@ Add the following piece (no pun intended) of code before the closing ```</body>` | |
By default **PEACE.JS** will be appeneded to the parent element of the ```<script>``` tag. If you'd like to inject it somewhere else simply add the `data-target` attribute: | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/gh/humancopy/[email protected].5/dist/peace.min.js" data-target="#footer" async></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].6/dist/peace.min.js" data-target="#footer" async></script> | ||
``` | ||
|
||
## Themes | ||
|
||
The default text color for **PEACE.JS** is black. This can be controlled via the `data-theme` attribute. Possible values are: black, white, green & blue. | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/gh/humancopy/[email protected].5/dist/peace.min.js" data-theme="blue" async></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].6/dist/peace.min.js" data-theme="blue" async></script> | ||
``` | ||
|
||
## Style | ||
|
||
By default **PEACE.JS** will show the word Peace in different languages. If you prefer instead to show a peace symbol simply add the `data-stlye="symbol"` attribute to the script tag: | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/gh/humancopy/[email protected].5/dist/peace.min.js" data-style="symbol" async></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].6/dist/peace.min.js" data-style="symbol" async></script> | ||
``` | ||
|
||
## Autoloading | ||
|
@@ -39,7 +39,7 @@ You can also disable the automatic activation of the banner by adding the attrib | |
The ```peaceJS()``` function accepts an optional argument of either a hash of options, DOM element, DOM selector or jQuery object. Any option passed to ```peaceJS()``` has precedence over what was defined on the ```<script>``` tag. | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/gh/humancopy/[email protected].5/dist/peace.min.js" data-auto="false" data-theme="green" async></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].6/dist/peace.min.js" data-auto="false" data-theme="green" async></script> | ||
|
||
<script> | ||
// Default behaviour | ||
|
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 @@ | ||
{ | ||
"name": "peace.js", | ||
"version": "1.1.6", | ||
"description": "Peace please", | ||
"main": "src/peace.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/humancopy/peace.js.git" | ||
}, | ||
"keywords": [ | ||
"peace" | ||
], | ||
"author": "humancopy", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/humancopy/peace.js/issues" | ||
}, | ||
"homepage": "https://github.com/humancopy/peace.js#readme" | ||
} |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/** | ||
* PEACE.js - http://humancopy.net/peace-js.html | ||
* Peace please, humancopy.net 2017 | ||
* Version 1.1.5 | ||
* Version 1.1.6 | ||
* | ||
*/ | ||
|
||
|
@@ -38,7 +38,7 @@ var peaceJS; | |
if (target_element) { | ||
// Load the CSS | ||
link = document.createElement('link'); | ||
link.href = 'https://cdn.jsdelivr.net/gh/humancopy/[email protected].5/dist/peace.min.css'; | ||
link.href = 'https://cdn.jsdelivr.net/npm/[email protected].6/dist/peace.min.css'; | ||
link.type = 'text/css'; | ||
link.rel = 'stylesheet'; | ||
link.media = 'screen,print'; | ||
|
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