javascript current folder code example
Example: javascript get current directory
var loc = window.location.pathname;
var dir = loc.substring(0, loc.lastIndexOf('/'));
var loc = window.location.pathname;
var dir = loc.substring(0, loc.lastIndexOf('/'));