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

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==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");
}