티스토리 뷰

728x90
location.href = document.querySelector('#reload-button')
    .url
    .replace(/ip-(\d+)-(\d+)-(\d+)-(\d+)/,"$1.$2.$3.$4")
    .replace(".ap-northeast-2.compute.internal", "")

https://stackoverflow.com/questions/29989031/getting-the-current-domain-name-in-chrome-when-the-page-fails-to-load

 

Getting the current domain name in Chrome when the page fails to load

If you try to load with Chrome: http://sdqdsqdqsdsqdsqd.com/ You'll obtain: ERR_NAME_NOT_RESOLVED I would like, with a bookmarklet, to be able to get the current domain name and redirect it to a...

stackoverflow.com

 

728x90
댓글