AILab tools for free

Free download + delete watermark

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         AILab tools for free
// @description  Free download + delete watermark
// @version 1.0.1
// @match        *://www.ailabtools.com/image-editor/*
// @run-at       document-idle
// @license      N/A
// @namespace https://greasyfork.org/users/1205341
// ==/UserScript==

document.getElementsByClassName("editor")[0].remove();

const button = document.createElement('button');
const textNode = document.createTextNode("Download free");
button.appendChild(textNode);
document.body.insertBefore(button, document.body.firstChild);

var canvas = document.getElementsByClassName("lower-canvas")[0];

button.addEventListener("click", function() {
  var imgData = canvas.toDataURL("image/png");

  var a = document.createElement('a');
  a.href = imgData;
  a.download = 'image.png';

  a.click();
});