Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- javascript: (function () { var url = window.location.href; // get the current URL var domain = url.split(‘/’)2; // get the domain and subdomain part var newDomain = domain.replace(/./g, ‘-’); // replace dots with dashes var newPath = url.replace(domain, newDomain + ‘.website’); // replace the old domain with the new one window.location.href = newPath; // go to the new URL })();
Advertisement
Comments
-
- javascript:(function() {
- var currentUrl = window.location.href;
- var urlParts = currentUrl.split('/');
- var subdomain = urlParts[2].replace(/\./g, '-');
- window.location.href = 'https://' + subdomain + '.proxy.wichita.edu/' + urlParts.slice(3).join('/');
- })();
Add Comment
Please, Sign In to add comment
Advertisement