复制道客巴巴(火狐可用,谷歌不可用) - doc88.com

2020/3/5 上午9:02:22

// ==UserScript==
// @name       复制道客巴巴(火狐可用,谷歌不可用) - doc88.com
// @namespace   Violentmonkey Scripts doc88
// @match       *://www.doc88.com/*
// @grant       none
// @version     1.1
// @author      -
// @description 2020/3/5 上午9:02:22
// ==/UserScript==

$(document).ready(function () {    
    var btn05 = $("<input type='button' id='wzmBtn'  value='显示当前页'   style='height:50px;font-size: 14px; position: fixed;  left: 00px;  top: 300px;z-index:65536'>");
    $("body").append(btn05);
    document.getElementById("wzmBtn").addEventListener("click", function () {
        showtext();
    });
});


function showtext() {
    var canName = "page_" + document.getElementById("pageNumInput").value;
    var canvas = document.getElementById(canName);
    var dataUrl = canvas.toDataURL();   
    window.open(dataUrl, "toDataURL() image");
}