Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript get script path name

window.getRunningScript = () => {
    return () => {      
        return new Error().stack.match(/([^ 
])*([a-z]*:///?)*?[a-z0-9/]*.js/ig)[0]
    }
}
console.log('%c Currently running script:', 'color: blue', getRunningScript()())
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to set the id attr to a var in reactjs 
Javascript :: react native password field 
Javascript :: angular deployment 
Javascript :: convert promise to generator js 
Javascript :: Access the list of valid values for an Enum field in a MongoDb Mongoose Schema 
Javascript :: remove last word over a limit javascript 
Javascript :: shopify functions nodejs 
Javascript :: cannot Nesting classes sass nextjs 
Javascript :: detect letter ketcode 
Javascript :: node.js sign in to website and get contents of new page 
Javascript :: javascript add unique values to array 
Javascript :: double bitwise not shorthand javascript 
Javascript :: js array take a elemt to front 
Javascript :: Tableau JS api getdata 
Javascript :: errorhandler npm 
Javascript :: how to get node modules 
Javascript :: javascript filtrar array string 
Javascript :: firebase recaptcha using react js 
Javascript :: how to get value from a label in javascript gtk 
Javascript :: detect escape characters js 
Javascript :: 5.1.3. Boolean Expressions¶ 
Javascript :: javascriot html eqaul to jquery 
Javascript :: npm init step by step 
Javascript :: react app environment variables undefined even when starts with REACT_APP_ 
Javascript :: react hook for component size 
Javascript :: angular optional attribute binding 
Javascript :: Rest and spread operators in ES6 
Javascript :: reduce() method executes a reducer function on each element of the array and returns a single output value. 
Javascript :: function sleep(delay) { var start = new Date().getTime(); while (new Date().getTime() < start + delay); } 
Javascript :: angular 8 on mouseover 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =