npm

Join us for the upcoming webinar, "Enterprise JavaScript done right: the tools you love, the security you need."Sign up here »

ggscript

0.1.0 • Public • Published

GG Script

Inject scripts into any website.

Travis CI Build Status CodeFactor Score

NPM

Importing

From your NodeJS application:

const GGScript = require("ggscript")

From your web application:

<script src="https://unpkg.com/ggscript/dist/index.min.js"></script>

Usage

// Inject a single file
GGScript("https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js")
 
// Inject multiple files
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
GGScript("https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js").then(() => {
    console.log("Finished loading resources.")
}).catch((err) => {
    console.error("Something bad just happened! " + err)
})
 
// Custom options
GGScript("https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js", {
    strategy: "eval"
})

Usage

Read the documentation.

install

npm i ggscript

Downloadsweekly downloads

6

version

0.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability