function currentUrl(search) {
  const canonical = canonicalUrl()
  if (!canonical) return window.location.href.replace(hashRegex, '')
  return canonical.match(/\?/) ? canonical : canonical + search
}
Return the canonical URL and rmove the hash.
@param  {string} search - search param
@return {string} return current canonical URL