js get the page your on code example
Example: check the doc name in javascript
var path = window.location.pathname;
var page = path.split("/").pop();
console.log( page );
var path = window.location.pathname;
var page = path.split("/").pop();
console.log( page );