mirror of
https://github.com/velocitatem/garlic.git
synced 2026-05-31 16:53:37 +00:00
he attak
This commit is contained in:
13
README.md
13
README.md
@@ -10,18 +10,25 @@ You write your code and text as you would any other day, just let garlic protect
|
|||||||
| POV | Result |
|
| POV | Result |
|
||||||
|--------------|---------------------------------------|
|
|--------------|---------------------------------------|
|
||||||
| You Write | `<p>This is a test piece of text</p>` |
|
| You Write | `<p>This is a test piece of text</p>` |
|
||||||
| Scraper Sees |  |
|
| Scraper Sees |  |
|
||||||
| User Sees |  |
|
| User Sees |  |
|
||||||
|
|
||||||
# How?
|
# How?
|
||||||
Currently, this is in development, but the beta works like this:
|
Currently, this is in development, but the beta works like this:
|
||||||
|
|
||||||
## React
|
## React
|
||||||
|
|
||||||
|
Install the packages with `npm i garlic-react`, you should then import the `Garlic` class with:
|
||||||
|
|
||||||
|
```js
|
||||||
|
import Garlic from 'garlic';
|
||||||
|
```
|
||||||
|
|
||||||
You just need to wrap your html in the `garlic()` method:
|
You just need to wrap your html in the `garlic()` method:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function App() {
|
function App() {
|
||||||
return garlic(
|
return Garlic.clove(
|
||||||
<div className="App">
|
<div className="App">
|
||||||
<p>Go away robots :)</p>
|
<p>Go away robots :)</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class Garlic {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static encode(string) {
|
static encode(string) {
|
||||||
return btoa(string+this.salt);
|
return btoa(string+(this.salt || ""));
|
||||||
}
|
}
|
||||||
static decodeBase64(root) {
|
static decodeBase64(root) {
|
||||||
for (let i = 0; i < root.childNodes.length; i++) {
|
for (let i = 0; i < root.childNodes.length; i++) {
|
||||||
@@ -61,4 +61,5 @@ class Garlic {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default Garlic;
|
|
||||||
|
module.exports = Garlic;
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
{
|
{
|
||||||
"name": "garlic",
|
"name": "garlic-react",
|
||||||
"version": "1.0.0",
|
"author": "Daniel Alves Rosel",
|
||||||
|
"version": "1.0.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "garlic.js",
|
"main": "garlic.js",
|
||||||
"type": "module",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"keywords": ["garlic", "protection"],
|
"keywords": [
|
||||||
|
"garlic",
|
||||||
|
"protection",
|
||||||
|
"privacy",
|
||||||
|
"security"
|
||||||
|
],
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user