您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Removes the timestamp from URL, so it doesn't invalidate your progress when you reload the page.
当前为
// ==UserScript== // @name Youtube Remove Timestamp // @namespace https://github.com/Alistair1231/my-userscripts/ // @version 0.1.3 // @description Removes the timestamp from URL, so it doesn't invalidate your progress when you reload the page. // @author Alistair1231 // @match https://www.youtube.com/watch* // @icon https://icons.duckduckgo.com/ip2/youtube.com.ico // @license MIT // ==/UserScript== // https://greasyfork.org/en/scripts/535336-youtube-remove-timestamp/ // https://github.com/Alistair1231/my-userscripts/blob/master/youtube-remove-timestamp.user.js (function () { "use strict"; // Wait for 10 seconds before updating the URL. If done too quick, Youtube will re-add the timestamp under certain conditions setTimeout(() => { // Get all the query parameters from the URL, except for the timestamp const search = window.location.search.split("&").filter((x) => !x.startsWith("t=")); // Update the URL in the address bar without reloading the page window.history.pushState( null, "", // build the new URL with the same path and query parameters, but without the timestamp `${window.location.origin}${window.location.pathname}${search}` ); }, 10000); })();