annotate app/assets/javascripts/zp.clean_notice.coffee @ 392:95bb6750003e

Update the latest domain/https.
author nanaya <me@myconan.net>
date Sat, 13 Jun 2015 08:41:51 +0900
parents 5a4d31e97937
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
370
5a4d31e97937 Remove extra file extensions.
edogawaconan <me@myconan.net>
parents:
diff changeset
1 window.zp.cleanNotice =
5a4d31e97937 Remove extra file extensions.
edogawaconan <me@myconan.net>
parents:
diff changeset
2 init: ->
5a4d31e97937 Remove extra file extensions.
edogawaconan <me@myconan.net>
parents:
diff changeset
3 if (history.replaceState)
5a4d31e97937 Remove extra file extensions.
edogawaconan <me@myconan.net>
parents:
diff changeset
4 queryString = "?#{window.location.search.slice(1).replace(/(^|&)notice=[^&]*(&?)/, "$2")}"
5a4d31e97937 Remove extra file extensions.
edogawaconan <me@myconan.net>
parents:
diff changeset
5 newPath = window.location.pathname
5a4d31e97937 Remove extra file extensions.
edogawaconan <me@myconan.net>
parents:
diff changeset
6 newPath += queryString if queryString != "?"
5a4d31e97937 Remove extra file extensions.
edogawaconan <me@myconan.net>
parents:
diff changeset
7 newPath += window.location.hash
5a4d31e97937 Remove extra file extensions.
edogawaconan <me@myconan.net>
parents:
diff changeset
8 history.replaceState null, "", newPath