annotate app/assets/javascripts/zp.clean_notice.coffee @ 375:66ee2f5e793e
Exclude bin/ from rubocop.
author |
nanaya <me@myconan.net> |
date |
Sat, 06 Jun 2015 22:22:41 +0900 |
parents |
5a4d31e97937 |
children |
|
rev |
line source |
370
|
1 window.zp.cleanNotice =
|
|
2 init: ->
|
|
3 if (history.replaceState)
|
|
4 queryString = "?#{window.location.search.slice(1).replace(/(^|&)notice=[^&]*(&?)/, "$2")}"
|
|
5 newPath = window.location.pathname
|
|
6 newPath += queryString if queryString != "?"
|
|
7 newPath += window.location.hash
|
|
8 history.replaceState null, "", newPath
|