移除网址中的锚点

Remove hash from URL, such as Douban.

目前為 2021-12-15 提交的版本,檢視 最新版本

// ==UserScript==
// @name         移除网址中的锚点
// @version      0.0.1
// @description  Remove hash from URL, such as Douban.
// @description:zh-cn  移除网址中的锚点,例如豆瓣。
// @author       binsee
// @namespace    https://github.com/binsee/tampermonkey-scripts
// @supportURL   https://github.com/binsee/tampermonkey-scripts/issues
// @license      GPL
// @noframes
// @match        https://www.douban.com/group/topic/*
// @grant        none
// ==/UserScript==

(function () {
  'use strict';
  setTimeout(function () {
    if (window.history.replaceState) {
      window.history.replaceState(null, null, '#');
    } else {
      window.location.replace('#');
    }
  }, 300);
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址