Mercurial > zeropaste
diff app/assets/javascripts/zp.clean_notice.coffee @ 370:5a4d31e97937
Remove extra file extensions.
author | edogawaconan <me@myconan.net> |
---|---|
date | Tue, 14 Apr 2015 00:22:07 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/assets/javascripts/zp.clean_notice.coffee Tue Apr 14 00:22:07 2015 +0900 @@ -0,0 +1,8 @@ +window.zp.cleanNotice = + init: -> + if (history.replaceState) + queryString = "?#{window.location.search.slice(1).replace(/(^|&)notice=[^&]*(&?)/, "$2")}" + newPath = window.location.pathname + newPath += queryString if queryString != "?" + newPath += window.location.hash + history.replaceState null, "", newPath