Browse Source

Fixed dl bug of checking for wrong instanceof

Anonymous 2 years ago
parent
commit
c53b03ce8f
  1. 2
      main.meta.js
  2. 4
      main.user.js
  3. 2
      src/EyeButton.svelte

2
main.meta.js

@ -1,7 +1,7 @@
// ==UserScript==
// @name PNGExtraEmbed2
// @namespace https://coom.tech/
// @version 0.133
// @version 0.139
// @description uhh
// @author You
// @match https://boards.4channel.org/*

4
main.user.js

@ -1,7 +1,7 @@
// ==UserScript==
// @name PNGExtraEmbed2
// @namespace https://coom.tech/
// @version 0.133
// @version 0.139
// @description uhh
// @author You
// @match https://boards.4channel.org/*
@ -16942,7 +16942,7 @@
document.body.appendChild(a);
a.style.display = "none";
const thumb = typeof file.data === "function" ? await file.data() : file.data;
if (!(thumb instanceof Buffer2)) {
if (!(thumb instanceof ArrayBuffer || thumb instanceof Uint8Array)) {
console.error("Couldn't download File");
debugger;
return;

2
src/EyeButton.svelte

@ -67,7 +67,7 @@ import { EmbeddedFile, EMBED_TYPES } from './main';
document.body.appendChild(a);
a.style.display = 'none';
const thumb = (typeof file.data === 'function') ? await file.data() : file.data ;
if(!(thumb instanceof Buffer)) {
if(!(thumb instanceof ArrayBuffer || thumb instanceof Uint8Array)) {
console.error("Couldn't download File");
debugger;
return;

Loading…
Cancel
Save