mask url javascript code example
Example 1: jquery get current url
var currentURL = $(location).attr('href'); //jQuery solution
var currentURL = window.location.href; // raw javascript
Example 2: url regex javascript
// If you do not need to check for HTTP or HTTPS
/[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/