【发布时间】:2018-07-20 20:20:20
【问题描述】:
我想将 youtube 更改为正常样式。我的想法是,正常的叠加层最后有一个“&disable_polymer=true”。所以我尝试使用 tampermonkey 将 youtube 上的每个站点更改为末尾带有 &disable_polymer=true 。这是我想出的:
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.youtube.com/*
// @grant none
// ==/UserScript==
var currentLocation = window.location;
window.location.replace(window.location + "&disable_polymer=true");
但问题是,(您可以自己尝试)tampermonkey 只会反复将 &disable_polymer=true 放入一个循环中,因为 youtube.com/* 包含 youtube.com/&disable_polymer=true 所以该网站现在变为:“@987654321 @&disable_polymer=true&disable_polymer=true**&disable_polymer=true** 谁能帮我解决这个问题?请不要窃取我的想法
【问题讨论】: