Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename package again due to conflict
- Loading branch information
Showing
5 changed files
with
19 additions
and
19 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
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,35 +1,35 @@ | ||
[![Travis CI Build Status](https://img.shields.io/travis/com/Richienb/scriptrunner/master.svg?style=for-the-badge)](https://travis-ci.com/Richienb/scriptrunner) | ||
[![CodeFactor Score](https://www.codefactor.io/repository/github/Richienb/scriptrunner/badge?style=for-the-badge)](https://www.codefactor.io/repository/github/Richienb/scriptrunner) | ||
[![Travis CI Build Status](https://img.shields.io/travis/com/Richienb/ggscript/master.svg?style=for-the-badge)](https://travis-ci.com/Richienb/ggscript) | ||
[![CodeFactor Score](https://www.codefactor.io/repository/github/Richienb/ggscript/badge?style=for-the-badge)](https://www.codefactor.io/repository/github/Richienb/ggscript) | ||
|
||
# Script Injector | ||
|
||
[![NPM](https://nodei.co/npm/scriptrunner.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/scriptrunner) | ||
[![NPM](https://nodei.co/npm/ggscript.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/ggscript) | ||
|
||
Inject scripts into any website. | ||
|
||
## Importing | ||
|
||
From your NodeJS application: | ||
```js | ||
const ScriptRunner = require("scriptrunner") | ||
const GGScript = require("ggscript") | ||
``` | ||
|
||
From your web application: | ||
```html | ||
<script src="https://unpkg.com/scriptrunner/scriptrunner.min.js"></script> | ||
<script src="https://unpkg.com/ggscript/ggscript.min.js"></script> | ||
``` | ||
|
||
## Usage | ||
|
||
```js | ||
// Inject a single file | ||
ScriptRunner("https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js") | ||
GGScript("https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js") | ||
|
||
// Inject multiple files | ||
ScriptRunner(["https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js", "https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.9/vue.min.js", "https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.min.js"]) | ||
GGScript(["https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js", "https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.9/vue.min.js", "https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.min.js"]) | ||
|
||
// Promise integration | ||
ScriptRunner("https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js").then((src) => { | ||
GGScript("https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js").then((src) => { | ||
console.log("Finished loading " + src) | ||
}) | ||
``` |
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,3 +1,3 @@ | ||
theme: jekyll-theme-cayman | ||
title: Script Injector | ||
title: GG Script | ||
description: Inject scripts into any website. |
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
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