Browse Source

build changes

pull/46/head
coomdev 2 years ago
parent
commit
dd898656d0
  1. 2
      main.meta.js
  2. 11
      main.user.js

2
main.meta.js

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

11
main.user.js

@ -1,7 +1,7 @@
// ==UserScript== // ==UserScript==
// @name PNGExtraEmbed // @name PNGExtraEmbed
// @namespace https://coom.tech/ // @namespace https://coom.tech/
// @version 0.177 // @version 0.182
// @description uhh // @description uhh
// @author You // @author You
// @match https://boards.4channel.org/* // @match https://boards.4channel.org/*
@ -81,7 +81,7 @@
var define_BUILD_VERSION_default; var define_BUILD_VERSION_default;
var init_define_BUILD_VERSION = __esm({ var init_define_BUILD_VERSION = __esm({
"<define:BUILD_VERSION>"() { "<define:BUILD_VERSION>"() {
define_BUILD_VERSION_default = [0, 177]; define_BUILD_VERSION_default = [0, 182];
} }
}); });
@ -20025,15 +20025,12 @@
csettings4 = b; csettings4 = b;
}); });
var getExt = (fn) => { var getExt = (fn) => {
const isDum = fn.match(/^[a-z0-9]{6}\./i);
const isB64 = fn.match(/^((?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=))?\.(gif|jpe?g|png|webm)/); const isB64 = fn.match(/^((?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=))?\.(gif|jpe?g|png|webm)/);
const isExt = fn.match(/\[.*=(.*)\]/); const isExt = fn.match(/\[.*=(.*)\]/);
let ext; let ext;
let source; let source;
try { try {
if (isDum) { if (isB64) {
ext = fn.split(".").slice(0, -1).join(".");
} else if (isB64) {
ext = atob(isB64[1]); ext = atob(isB64[1]);
} else if (isExt) { } else if (isExt) {
ext = decodeURIComponent(isExt[1]); ext = decodeURIComponent(isExt[1]);
@ -22483,7 +22480,7 @@
$$invalidate(3, updating = true); $$invalidate(3, updating = true);
let params = ""; let params = "";
if ($settings.phash) { if ($settings.phash) {
params = "?mdist" + $settings.mdist; params = "?mdist=" + $settings.mdist;
} }
let res = await fetch("https://shoujo.coom.tech/listing/" + boardname + params); let res = await fetch("https://shoujo.coom.tech/listing/" + boardname + params);
$$invalidate(4, threads = await res.json()); $$invalidate(4, threads = await res.json());

Loading…
Cancel
Save