您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Replace the browser URL with one you can actually share
当前为
- // ==UserScript==
- // @name Better multireddit URL
- // @namespace http://cantcode.com
- // @description Replace the browser URL with one you can actually share
- // @include http://www.reddit.com/me/m/*
- // @include https://www.reddit.com/me/m/*
- // @version 1.1
- // ==/UserScript==
- if (document.querySelector('.visibility-group input[name=visibility]:checked').value === 'private')
- return;
- var username = /reddit\.com\/user\/([\-\w\.#=]*)\/?(?:comments)?\/?(?:\?(?:[a-z]+=[a-zA-Z0-9_%]*&?)*)?$/i.exec(document.querySelector("#header-bottom-right .user a:first-child").getAttribute('href'))[1];
- window.history.replaceState({}, "", "/user/" + username + "/m/" + window.location.pathname.split("/")[3]);