// ==UserScript== // @name 给起点加个复制按钮 // @namespace http://tampermonkey.net/ // @version 1.1 // @description 一键复制章节全文 // @author Win-yk // @license MIT // @match https://www.qidian.com/chapter/* // @icon https://www.google.com/s2/favicons?sz=64&domain=qidian.com // @grant GM_setClipboard // @require https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js // @downloadURL https://update.greasyfork.icu/scripts/476146/%E7%BB%99%E8%B5%B7%E7%82%B9%E5%8A%A0%E4%B8%AA%E5%A4%8D%E5%88%B6%E6%8C%89%E9%92%AE.user.js // @updateURL https://update.greasyfork.icu/scripts/476146/%E7%BB%99%E8%B5%B7%E7%82%B9%E5%8A%A0%E4%B8%AA%E5%A4%8D%E5%88%B6%E6%8C%89%E9%92%AE.meta.js // ==/UserScript== (function() { 'use strict'; function do_copy(){ var content = ''; jQuery('.content-text').each(function(){ var now_content = jQuery(this).text(); if(!jQuery(this).is('span')) { if(jQuery(this).children().length) { var dirty = jQuery(this).children().first().text(); now_content = now_content.substr(0, now_content.length - dirty.length); } now_content = '\n' + now_content + '\n'; } content += now_content + '\n'; }); GM_setClipboard(content, "text"); setTimeout(function(){ jQuery('#reader-toast-container').empty(); jQuery('#reader-toast-container').append('