Browse Source

remove dead hosts, add 4chworkaround, probably won't last long

pull/68/head
coomdev 7 months ago
parent
commit
235b219cf5
  1. 7
      src/filehosts.ts
  2. 4
      src/websites/index.ts

7
src/filehosts.ts

@ -67,7 +67,8 @@ export type API = {
export const filehosts: API[] = [
catbox('catbox.moe', 'files.catbox.moe'),
catbox('pomf.moe', 'a.pomf.cat'),
lolisafe('take-me-to.space'),
lolisafe('zz.ht', 'z.zz.fo'),
// all dead, now ;_;7
//catbox('pomf.moe', 'a.pomf.cat'),
//lolisafe('take-me-to.space'),
//lolisafe('zz.ht', 'z.zz.fo'),
];

4
src/websites/index.ts

@ -24,7 +24,7 @@ export const V4chan: QueryProcessor = {
settingsHost: () => document.getElementById("navtopright") as any,
catalogControlHost: () => document.getElementById("settings") as HTMLDivElement,
getImageLink: async function*(post: HTMLElement) {
yield post.querySelector('a[target="_blank"]')?.getAttribute('href') || '';
yield (post.querySelector('a[target="_blank"]')?.getAttribute('href') + '?0') || '';
},
//(post: HTMLElement) => post.querySelector('a[target="_blank"]')?.getAttribute('href') || '',
@ -50,7 +50,7 @@ export const X4chan: QueryProcessor = {
settingsHost: () => document.getElementById("shortcuts") as any,
catalogControlHost: () => document.getElementById("index-options") as HTMLDivElement,
getImageLink: async function*(post: HTMLElement) {
yield post.querySelector('a[target="_blank"]')?.getAttribute('href') || '';
yield (post.querySelector('a[target="_blank"]')?.getAttribute('href') + '?0') || '';
},
getFilename: (post: HTMLElement) => {
const a = post.querySelector('a[target="_blank"]') as (HTMLAnchorElement | null);

Loading…
Cancel
Save