Browse Source

On b4k, fetch file from wakarimasen first before defaulting

pull/46/head
coomdev 2 years ago
parent
commit
7e358b706a
  1. 2
      chrome/manifest.json
  2. 2
      firefox/manifest.json
  3. 2
      firefox_update.json
  4. 3
      main.meta.js
  5. 15049
      main.user.js
  6. 2
      src/websites/index.ts

2
chrome/manifest.json

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

2
firefox/manifest.json

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

2
firefox_update.json

@ -1 +1 @@
{"addons":{"{34ac4994-07f2-44d2-8599-682516a6c6a6}":{"updates":[{"version":"0.220","update_link":"https://github.com/coomdev/pngextraembedder/raw/branch/%E4%B8%AD%E5%87%BA%E3%81%97/pee-firefox.zip"}]}}}
{"addons":{"{34ac4994-07f2-44d2-8599-682516a6c6a6}":{"updates":[{"version":"0.222","update_link":"https://github.com/coomdev/pngextraembedder/raw/branch/%E4%B8%AD%E5%87%BA%E3%81%97/pee-firefox.zip"}]}}}

3
main.meta.js

@ -1,7 +1,7 @@
// ==UserScript==
// @name PNGExtraEmbed
// @namespace https://coom.tech/
// @version 0.207
// @version 0.222
// @description uhh
// @author You
// @match https://boards.4channel.org/*
@ -23,6 +23,7 @@
// @grant GM.setValue
// @grant GM_openInTab
// @grant GM.openInTab
// @grant GM_addElement
// @grant unsafeWindow
// @run-at document-start
// @connect 4chan.org

15049
main.user.js

File diff suppressed because it is too large

2
src/websites/index.ts

@ -67,7 +67,6 @@ export const FoolFuuka: QueryProcessor = {
settingsHost: () => document.querySelector(".letters") as any,
catalogControlHost: () => document.getElementById("index-options") as HTMLDivElement,
getImageLink: async function *(post: HTMLElement) {
yield post.querySelector('a[rel]')?.getAttribute('href') || '';
if (location.host == "arch.b4k.co") { //get hecked
const pid = post.id.match(/\d+/)![0];
const board = location.pathname.match(/\/(..?.?)\//)![1];
@ -75,6 +74,7 @@ export const FoolFuuka: QueryProcessor = {
const data = await res.json();
yield data.media.media_link;
}
yield post.querySelector('a[rel]')?.getAttribute('href') || '';
},
getFilename: (post: HTMLElement) => {
const opfn = post.querySelector('a.post_file_filename')?.textContent;

Loading…
Cancel
Save