Skip to content

Commit

Permalink
Create initial hook
Browse files Browse the repository at this point in the history
  • Loading branch information
avindra committed Aug 28, 2021
1 parent 469e6ae commit 2960462
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 22 deletions.
29 changes: 7 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,18 @@
# useascript

`useascript` is a compendium of userscripts for the Internet.
`useascript` is a repository of userscripts for a clearer Internet 🌃

Some would say its a _`metaverse`_.

Brought to you by [Avindra Goolcharan](https://dra.vin/).

## Usage

* [Install from GitHub](https://github.com/avindra/useascript/raw/main/hook.user.js) ([Source](./hook.user.js))

Sample usage can be found below.
Note that, as per the `@match` directive, it will run on <strong>all websites</strong>.

```js
// ==UserScript==
// @name useascript-hook
// @namespace https://dra.vin/
// @version 0.1
// @description Loader for useascript, a compendium of userscripts for the Web
// @author You
```
// @match *://*/*
// @grant none
// ==/UserScript==

/**
* @param {Element} el
*/
(el => {
el.type = "module";
el.src = 'https://dra.vin/useascript/index.js';

document.body.appendChild(el);
})(document.createElement("script"));
```

## License
Expand Down
20 changes: 20 additions & 0 deletions hook.user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// ==UserScript==
// @name useascript-hook
// @namespace https://dra.vin/
// @version 0.1
// @description Loader for useascript, a compendium of userscripts for the Web
// @author Avindra Goolcharan
// @match *://*/*
// @grant none
// ==/UserScript==

/**
*
* @param {Element} el A fresh <script> tag
*/
(el => {
el.type = 'module';
el.src = 'https://dra.vin/useascript/index.js';

document.body.appendChild(el);
})(document.createElement('script'));

0 comments on commit 2960462

Please sign in to comment.