您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
360,百度网盘链接自动添加访问密码
当前为
// ==UserScript== // @name 360,百度网盘链接 // @author 林岑影 // @description 360,百度网盘链接自动添加访问密码 // @namespace // @icon http://disk.yun.uc.cn/favicon.ico // @license GPL version 3 // @encoding utf-8 // @date 18/07/2015 // @modified 18/07/2015 // @include * // @exclude http://pan.baidu.com/* // @exclude http://yunpan.360.cn/* // @exclude http://yunpan.cn/* // @require http://libs.baidu.com/jquery/2.0.0/jquery.min.js // @grant unsafeWindow // @grant GM_setClipboard // @run-at document-end // @version 1.0.0 // ==/UserScript== (function(window, $){ var autoHash = function(){ }; autoHash.prototype = { init: function(){ $("body").on("click", 'a[href*="pan.baidu.com/s/"], a[href*="yunpan.cn"]', this.replace); }, replace: function(){ var href = $(this).attr("href"); if (href.indexOf("#")>-1) return true; var text = $(this).parent().text(), re = /(码|问)[\s|:|:]*([a-zA-Z0-9]{4,4})/g, r = re.exec(text); if (r && r[2]) { $(this).attr("href", href+"#"+r[2]); } } }; var hash = new autoHash(); hash.init(); }(window, jQuery))