GM_html2canvas

由于原版的html2canvas在对跨域图片获取上总是失败的问题,将跨域改为通过GM_xmlhttpRequest获取

2022-12-15 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greatest.deepsurf.us/scripts/456607/1128500/GM_html2canvas.js

लेखक
WhiteSevs
आवृत्ती
0.0.1.20221215064150
बनवली
2022-12-15
अपडेट केली
2022-12-15
आकार
413 KB
License
नाही

将跨域改为通过GM_xmlhttpRequest获取

版本v1.4.1

# 我的设置如下
let options = {
    allowTaint: true,
    logging: true,
    useCORS: true,

}
html2canvas(document.documentElement, options ).then( canvas =>{
  var base64Image = canvas.toDataURL("image/png");

})