view app/assets/javascripts/zp.clean_notice.coffee @ 380:2ddd61aca2c8

I18n. And refactor paste privacy settings form.
author nanaya <me@myconan.net>
date Sun, 07 Jun 2015 02:45:49 +0900
parents 5a4d31e97937
children
line wrap: on
line source

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