微博(2021版)打开全部相册+手机版

为微博(2021版)增加打开全部相册+手机版的链接

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         微博(2021版)打开全部相册+手机版
// @namespace    http://tampermonkey.net/
// @version      1.0.2
// @description  为微博(2021版)增加打开全部相册+手机版的链接
// @author       Wesley King
// @match        https://weibo.com/u/*
// @icon         https://www.sinaimg.cn/blog/developer/wiki/LOGO_64x64.png
// @grant           GM_registerMenuCommand
// ==/UserScript==

(function() {
    var path = window.location.pathname;
    var pathArr = path.split("/");
    var uid = pathArr[2];
    GM_registerMenuCommand("打开全部相册",function(){
       window.location.replace("https://photo.weibo.com/"+uid);
    });
    GM_registerMenuCommand("打开手机版",function(){
       window.location.replace("https://m.weibo.cn/profile/"+uid);
    });
})();