您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
try to take over the world!
// ==UserScript== // @name 抓黄书 // @namespace http://tampermonkey.net/ // @version 1.0 // @description try to take over the world! // @author You // @include *//www.cool18.com/* // @grant none // ==/UserScript== (function() { 'use strict'; var text = $("pre").text().replace(/cool18.com/g,""); function copyToClip(content, message) { var aux = document.createElement("input"); aux.setAttribute("value", content); document.body.appendChild(aux); aux.select(); document.execCommand("copy"); document.body.removeChild(aux); if (message == null) { alert("复制成功"); } else{ alert(message); } } $("body").prepend('<button class="copyTxt"> Copy </button>'); $(".copyTxt").click(function(){ copyToClip(text); }) // Your code here... })();