您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
为 macapp.so 增加一个下载按钮
当前为
// ==UserScript== // @name Macapp下载助手 // @namespace http://nobelliu.github.io/ // @version 0.3 // @description 为 macapp.so 增加一个下载按钮 // @author NobelLiu // @match http://www.macapp.so/*/ // @grant none // @require https://code.jquery.com/jquery-2.1.4.min.js // ==/UserScript== 'use strict'; $(setTimeout(function () { if (document.getElementById("code")) { var download = document.getElementsByClassName("download")[0]; var codeElement = document.getElementById("code"); var dlButton = document.createElement('a'); var code = document.body.innerHTML.match(/document.getElementById\("code"\).innerHTML="\w\w\w\w/).toString().match(/\w\w\w\w$/); dlButton.innerHTML = code; var href = "/go" + window.location.pathname + "#" +code; dlButton.setAttribute("href", href); dlButton.setAttribute("target", "_blank"); dlButton.style.cssText = "color:gray;background-color:white;width:40px;height:24px;padding:2px 8px;border:1px solid #ccc;-moz-border-radius: 5px;-webkit-border-radius: 5px;border-radius:5px;"; download.insertBefore(dlButton, codeElement); codeElement.removeAttribute("id") } } , 100));