Browse Source

Fix loading on catalog

pull/46/head
coomdev 2 years ago
parent
commit
077a8f945e
  1. 2
      README.md
  2. 13
      chrome/dist/main.js
  3. 2
      chrome/manifest.json
  4. 13
      dist/main.js
  5. 13
      firefox/dist/main.js
  6. 2
      firefox/manifest.json
  7. 2
      firefox_update.json
  8. 2
      main.meta.js
  9. 15
      main.user.js
  10. BIN
      pngextraembedder-0.295.xpi
  11. 11
      src/main.ts

2
README.md

@ -25,7 +25,7 @@ Please report any issue you have with those (only for mainstream browsers)
Also, use this if you plan to use b4k's archive.
- [Install 4chanX (recommended)](https://www.4chan-x.net/builds/4chan-X.user.js)
- Install the correct WebExtension for your Browser ([Firefox](https://git.coom.tech/fuckjannies/lolipiss/raw/branch/%E4%B8%AD%E5%87%BA%E3%81%97/pngextraembedder-0.294.xpi) or Chrome-based (Down for "maintainance"))
- Install the correct WebExtension for your Browser ([Firefox](https://git.coom.tech/fuckjannies/lolipiss/raw/branch/%E4%B8%AD%E5%87%BA%E3%81%97/pngextraembedder-0.295.xpi) or Chrome-based (Down for "maintainance"))
For FF users, the extension is signed so you can just drag and drop it on your about:addons tab.

13
chrome/dist/main.js

@ -73,7 +73,7 @@
var define_BUILD_VERSION_default;
var init_define_BUILD_VERSION = __esm({
"<define:BUILD_VERSION>"() {
define_BUILD_VERSION_default = [0, 294];
define_BUILD_VERSION_default = [0, 295];
}
});
@ -21828,7 +21828,11 @@
if (!thumbLink)
return;
let res2 = void 0;
const op = +location.pathname.match(/\/thread\/(.*)/)[1];
let op;
if (cappState.isCatalog)
op = +post.id.slice(2);
else
op = +location.pathname.match(/\/thread\/(.*)/)[1];
const reportEmbed = () => {
if (!csettings5)
return;
@ -22008,7 +22012,10 @@ Use the WebExtension version of PEE if you want to use b4k!`);
try {
cp = new CommandProcessor();
} catch {
alert("You may be using 4chanX\n\nGo to 4chanX's settings, Advanced > JS Whitelist and add 'blob:' without quotes to the list.");
if (false)
alert("The page you're on has a CSP that prevents PEE from functionning properly.\n\n If using 4chanX, Add 'blob:' to the JS whitelist. Else, install PEE-companion.");
else
alert("You may be using 4chanX\n\nGo to 4chanX's settings, Advanced > JS Whitelist and add 'blob:' without quotes to the list.");
return;
}
if (!is4chanX && location.host.startsWith("boards.4chan")) {

2
chrome/manifest.json

@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "PngExtraEmbedder",
"description": "Discover embedded files on 4chan and archives!",
"version": "0.294",
"version": "0.295",
"icons": {
"64": "1449696017588.png"
},

13
dist/main.js

@ -73,7 +73,7 @@
var define_BUILD_VERSION_default;
var init_define_BUILD_VERSION = __esm({
"<define:BUILD_VERSION>"() {
define_BUILD_VERSION_default = [0, 294];
define_BUILD_VERSION_default = [0, 295];
}
});
@ -21662,7 +21662,11 @@
if (!thumbLink)
return;
let res2 = void 0;
const op = +location.pathname.match(/\/thread\/(.*)/)[1];
let op;
if (cappState.isCatalog)
op = +post.id.slice(2);
else
op = +location.pathname.match(/\/thread\/(.*)/)[1];
const reportEmbed = () => {
if (!csettings5)
return;
@ -21842,7 +21846,10 @@ Use the WebExtension version of PEE if you want to use b4k!`);
try {
cp = new CommandProcessor();
} catch {
alert("You may be using 4chanX\n\nGo to 4chanX's settings, Advanced > JS Whitelist and add 'blob:' without quotes to the list.");
if (true)
alert("The page you're on has a CSP that prevents PEE from functionning properly.\n\n If using 4chanX, Add 'blob:' to the JS whitelist. Else, install PEE-companion.");
else
alert("You may be using 4chanX\n\nGo to 4chanX's settings, Advanced > JS Whitelist and add 'blob:' without quotes to the list.");
return;
}
if (!is4chanX && location.host.startsWith("boards.4chan")) {

13
firefox/dist/main.js

@ -73,7 +73,7 @@
var define_BUILD_VERSION_default;
var init_define_BUILD_VERSION = __esm({
"<define:BUILD_VERSION>"() {
define_BUILD_VERSION_default = [0, 294];
define_BUILD_VERSION_default = [0, 295];
}
});
@ -21805,7 +21805,11 @@
if (!thumbLink)
return;
let res2 = void 0;
const op = +location.pathname.match(/\/thread\/(.*)/)[1];
let op;
if (cappState.isCatalog)
op = +post.id.slice(2);
else
op = +location.pathname.match(/\/thread\/(.*)/)[1];
const reportEmbed = () => {
if (!csettings5)
return;
@ -21985,7 +21989,10 @@ Use the WebExtension version of PEE if you want to use b4k!`);
try {
cp = new CommandProcessor();
} catch {
alert("You may be using 4chanX\n\nGo to 4chanX's settings, Advanced > JS Whitelist and add 'blob:' without quotes to the list.");
if (false)
alert("The page you're on has a CSP that prevents PEE from functionning properly.\n\n If using 4chanX, Add 'blob:' to the JS whitelist. Else, install PEE-companion.");
else
alert("You may be using 4chanX\n\nGo to 4chanX's settings, Advanced > JS Whitelist and add 'blob:' without quotes to the list.");
return;
}
if (!is4chanX && location.host.startsWith("boards.4chan")) {

2
firefox/manifest.json

@ -7,7 +7,7 @@
},
"name": "PngExtraEmbedder",
"description": "Discover embedded files on 4chan and archives!",
"version": "0.294",
"version": "0.295",
"icons": {
"64": "1449696017588.png"
},

2
firefox_update.json

@ -1 +1 @@
{"addons":{"{34ac4994-07f2-44d2-8599-682516a6c6a6}":{"updates":[{"version":"0.294","update_link":"https://git.coom.tech/fuckjannies/lolipiss/raw/branch/%E4%B8%AD%E5%87%BA%E3%81%97/pngextraembedder-0.294.xpi"}]}}}
{"addons":{"{34ac4994-07f2-44d2-8599-682516a6c6a6}":{"updates":[{"version":"0.295","update_link":"https://git.coom.tech/fuckjannies/lolipiss/raw/branch/%E4%B8%AD%E5%87%BA%E3%81%97/pngextraembedder-0.295.xpi"}]}}}

2
main.meta.js

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

15
main.user.js

@ -1,7 +1,7 @@
// ==UserScript==
// @name PNGExtraEmbed
// @namespace https://coom.tech/
// @version 0.294
// @version 0.295
// @description uhh
// @author You
// @match https://boards.4channel.org/*
@ -109,7 +109,7 @@ const _DOMParser = DOMParser;
var define_BUILD_VERSION_default;
var init_define_BUILD_VERSION = __esm({
"<define:BUILD_VERSION>"() {
define_BUILD_VERSION_default = [0, 294];
define_BUILD_VERSION_default = [0, 295];
}
});
@ -21698,7 +21698,11 @@ const _DOMParser = DOMParser;
if (!thumbLink)
return;
let res2 = void 0;
const op = +location.pathname.match(/\/thread\/(.*)/)[1];
let op;
if (cappState.isCatalog)
op = +post.id.slice(2);
else
op = +location.pathname.match(/\/thread\/(.*)/)[1];
const reportEmbed = () => {
if (!csettings5)
return;
@ -21878,7 +21882,10 @@ Use the WebExtension version of PEE if you want to use b4k!`);
try {
cp = new CommandProcessor();
} catch {
alert("You may be using 4chanX\n\nGo to 4chanX's settings, Advanced > JS Whitelist and add 'blob:' without quotes to the list.");
if (true)
alert("The page you're on has a CSP that prevents PEE from functionning properly.\n\n If using 4chanX, Add 'blob:' to the JS whitelist. Else, install PEE-companion.");
else
alert("You may be using 4chanX\n\nGo to 4chanX's settings, Advanced > JS Whitelist and add 'blob:' without quotes to the list.");
return;
}
if (!is4chanX && location.host.startsWith("boards.4chan")) {

BIN
pngextraembedder-0.295.xpi

Binary file not shown.

11
src/main.ts

@ -410,7 +410,11 @@ const processPost = async (post: HTMLDivElement) => {
return;
let res2: [WorkerEmbeddedFile[], boolean][] | undefined = undefined;
const op = +location.pathname.match(/\/thread\/(.*)/)![1];
let op: number;
if (cappState.isCatalog)
op = +post.id.slice(2);
else
op = +location.pathname.match(/\/thread\/(.*)/)![1];
const reportEmbed = () => {
if (!csettings)
return;
@ -746,7 +750,10 @@ const startup = async (is4chanX = true) => {
try {
cp = new CommandProcessor();
} catch {
alert("You may be using 4chanX\n\nGo to 4chanX's settings, Advanced > JS Whitelist and add 'blob:' without quotes to the list.");
if (execution_mode == "userscript")
alert("The page you're on has a CSP that prevents PEE from functionning properly.\n\n If using 4chanX, Add 'blob:' to the JS whitelist. Else, install PEE-companion.");
else
alert("You may be using 4chanX\n\nGo to 4chanX's settings, Advanced > JS Whitelist and add 'blob:' without quotes to the list.");
return;
}

Loading…
Cancel
Save