From 25ca85c2fe540032e77fb9bfd35c99cd701d5542 Mon Sep 17 00:00:00 2001 From: coomdev Date: Thu, 13 Jan 2022 21:19:18 +0100 Subject: [PATCH] Build scripts --- main.meta.js | 2 +- main.user.js | 17 ++--------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/main.meta.js b/main.meta.js index ba3e1f3..9fda67d 100644 --- a/main.meta.js +++ b/main.meta.js @@ -1,7 +1,7 @@ // ==UserScript== // @name PNGExtraEmbed // @namespace https://coom.tech/ -// @version 0.137 +// @version 0.140 // @description uhh // @author You // @match https://boards.4channel.org/* diff --git a/main.user.js b/main.user.js index 218fde3..a725294 100644 --- a/main.user.js +++ b/main.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name PNGExtraEmbed // @namespace https://coom.tech/ -// @version 0.137 +// @version 0.140 // @description uhh // @author You // @match https://boards.4channel.org/* @@ -11817,7 +11817,7 @@ if (!pngfile || pngfile.size > 3e3 * 1024) { throw "Couldn't convert file to PNG: resulting filesize too big."; } - return pngv3_default.inject(b, c); + return pngv3_default.inject(new File([pngfile], b.name), c); }; var jpg_default = { skip: true, @@ -17255,19 +17255,6 @@ } post.setAttribute("data-processed", "true"); } - if (window["pagemode"]) { - onload = () => { - const resbuf = async (s) => typeof s != "string" && (import_buffer9.Buffer.isBuffer(s) ? s : await s()); - const container = document.getElementById("container"); - container.onchange = async () => { - const result = document.getElementById("result"); - const output = await convertToPng(container.files[0]); - if (!output) - return; - result.src = URL.createObjectURL(output); - }; - }; - } })(); /*! * The buffer module from node.js, for the browser.