Greasy Fork

Greasy Fork is available in English.

PanDownload网页版跳转按钮

百度网盘分享链接页面加个按钮,点击可跳转到 PanDownload 网页版去下载

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         PanDownload网页版跳转按钮
// @namespace http://greasyfork.icu/users/30563
// @version      0.0.1
// @description  百度网盘分享链接页面加个按钮,点击可跳转到 PanDownload 网页版去下载
// @author       申杰
// @match        *://pan.baidu.com/s/*
// @match        *://pan.baidu.com/share/*
// @match        *://yun.baidu.com/s/*
// ==/UserScript==

(function() {
    'use strict';
    function addDiv(){
        var div = document.createElement("div");
        div.innerHTML = "PanDownload网页版";
        div.title="点我可以跳转到PanDownload网页版下载\n有问题QQ联系我:970852638\n                           申杰制作";
        var css = "position:fixed;top:63px;left:3px;z-index:999999999;width:193px;height:30px;line-height:30px;text-align:center;font-size:18px;font-family:Verdana, Arial, '宋体';font-weight:700;color:#f00;user-select:none;padding:0px;white-space:nowrap;border:3px solid #f00;cursor:pointer;";
        div.style.cssText = css;
        if(window.self === window.top){ document.body.appendChild(div);}
        div.addEventListener("click",function(){
            let url = window.location.href;
            url = url.replace('baidu.com','baiduwp.com');
            window.open(url, "_blank");});
   }
   addDiv();
})();