Redirect to latest release - docs.rs

6/19/2022, 8:12:26 PM

// ==UserScript==
// @name        Redirect to latest release - docs.rs
// @namespace   Violentmonkey Scripts
// @match       https://docs.rs/*
// @grant       none
// @version     1.0
// @author      Blusk
// @description 6/19/2022, 8:12:26 PM
// @run-at        document-start
// @license MIT
// ==/UserScript==

const path = window.location.pathname.split("/");
const version = path[2]

if (version !== "latest" && /^[\d\.]+$/.test(version)) {
  path[2] = "latest";
  window.location.pathname = path.join("/");
}
长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

注册一下就行

Rainyun

一年攒够 12 元