Skip to content

jehoshua02/getCurrentScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

getCurrentScript

Get the currently executing script in the browser.

demo

See simple demo.

bower

bower install --save get-current-script

npm

npm install --save get-current-script

usage

CommonJS

var currentScript = require('get-current-script')();

NOTE: This module is intended for use in the browser.


AMD

This library is published as UMD format, so theoretically it can be done. If you figure it out, please submit a pull request. You'll be famous!

Global (Boo, hiss!)

index.html

<script src="bower_components/get-current-script/dist/getCurrentScript.js"></script>

script.js

var currentScript = getCurrentScript();

NOTE: Please, for the sake of the future, consider using a module loader of some kind.


About

Get the currently executing script in the browser.

Resources

Stars

Watchers

Forks

Packages

No packages published