Browse Source

Add bulk import button so you can copypaste boorus from the readme

pull/46/head
coomdev 2 years ago
parent
commit
42e0f0b161
  1. 91
      README.md
  2. 328
      chrome/dist/main.js
  3. 2
      chrome/manifest.json
  4. 328
      dist/main.js
  5. 328
      firefox/dist/main.js
  6. 2
      firefox/manifest.json
  7. 2
      firefox_update.json
  8. 2
      main.meta.js
  9. 330
      main.user.js
  10. 14
      src/Components/App.svelte

91
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.275.xpi) or [Chrome-based](https://chrome.google.com/webstore/detail/pngextraembedder/bfhpobiikighljcapcfmfganodihbicj))
- 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.276.xpi) or [Chrome-based](https://chrome.google.com/webstore/detail/pngextraembedder/bfhpobiikighljcapcfmfganodihbicj))
For FF users, the extension is signed so you can just drag and drop it on your about:addons tab.
@ -51,41 +51,44 @@ If none of the above works for you, switch back to the userscript version and op
For compliance with CWS rules, PEE doesn't come with preconfigured domains for Third Eye. Here are the old settings in case you want to reproduce them. This shouldn't concern old time users as you already have those in your settings, unless explicitely removed.
Copy paste this and click "bulk-import"
```
name: "Gelbooru",
domain: "gelbooru.com",
endpoint: "/index.php?page=dapi&s=post&q=index&json=1&tags=md5:",
view: "https://gelbooru.com/index.php?page=post&s=view&id="
name: "Yandere",
domain: "yande.re",
endpoint: "/post.json?tags=md5:",
view: `https://yande.re/post/show/`
name: "Sankaku",
domain: "capi-v2.sankakucomplex.com",
endpoint: "/posts/keyset?tags=md5:",
view: `https://chan.sankakucomplex.com/post/show/`
name: "Rule34",
domain: "api.rule34.xxx",
endpoint: "/index.php?page=dapi&s=post&q=index&json=1&tags=md5:",
view: "https://rule34.xxx/index.php?page=post&s=view&id="
name: "Danbooru",
domain: "danbooru.donmai.us",
endpoint: "/posts.json?tags=md5:",
view: "https://danbooru.donmai.us/posts/"
name: "Lolibooru",
domain: "lolibooru.moe",
endpoint: "/post.json?tags=md5:",
view: "https://lolibooru.moe/post/show/"
name: "ATFbooru",
domain: "booru.allthefallen.moe",
endpoint: "/posts.json?tags=md5:",
view: "https://booru.allthefallen.moe/posts/"
[
{"name": "Gelbooru",
"domain": "gelbooru.com",
"endpoint": "/index.php?page=dapi&s=post&q=index&json=1&tags=md5:",
"view": "https://gelbooru.com/index.php?page=post&s=view&id="
},
{"name": "Yandere",
"domain": "yande.re",
"endpoint": "/post.json?tags=md5:",
"view": "https://yande.re/post/show/"
},
{"name": "Sankaku",
"domain": "capi-v2.sankakucomplex.com",
"endpoint": "/posts/keyset?tags=md5:",
"view": "https://chan.sankakucomplex.com/post/show/"
},
{"name": "Rule34",
"domain": "api.rule34.xxx",
"endpoint": "/index.php?page=dapi&s=post&q=index&json=1&tags=md5:",
"view": "https://rule34.xxx/index.php?page=post&s=view&id="
},
{"name": "Danbooru",
"domain": "danbooru.donmai.us",
"endpoint": "/posts.json?tags=md5:",
"view": "https://danbooru.donmai.us/posts/"
},
{"name": "Lolibooru",
"domain": "lolibooru.moe",
"endpoint": "/post.json?tags=md5:",
"view": "https://lolibooru.moe/post/show/"
},
{"name": "ATFbooru",
"domain": "booru.allthefallen.moe",
"endpoint": "/posts.json?tags=md5:",
"view": "https://booru.allthefallen.moe/posts/"
}]
```
How to Build
@ -158,8 +161,8 @@ The slowest machine I have available is an 8GB 2011 Sandy Bridge i5 with a 1660T
There are parts where slowness is unavoidable, for example if you have a slow internet connection and enabled preloading (what the h*ck are you doing?).
Even without preloading enabled, PEE still makes many requests at the start of a page as it fetches a small initial chunk of png/webm/gif files to know if something is embedded in there, only progressing further when something is detected. It also does boorus/catbox requests for the corresponding filenames.
Even without preloading enabled, PEE still makes many requests at the start of a page as it fetches a small initial chunk of png/webm/gif files to know if something is embedded in there, only progressing further when something is detected. It also does boorus/catbox requests for the corresponding "filenames"".
"""""
## Why is it so big
The file-type detection package is huge as it detect many file types, but also depends on node constructs that are also huge by themselves. There's also a webm parser that's relatively big that's used for embedding/extracting files in/from webms. There's also the svelte UI that compiles down to simple javascript.
@ -189,17 +192,17 @@ Their OPs are wrongfully being banned under the pretense of using proxies/VPNs,
Third Eye
---------
Third eye filenames are supported.
Filename just need to be made of 32 hex characters that correspond to a filename in any of the supported boorus.
Third eye "filenames" are supported.
"Filename" just "need" to be made of 32 hex characters that correspond to a ""filena"me" "in" any of the supported "boorus.
"""""
Catbox
------
Supports:
- Base64 filenames
- [\<host>=\<file>] filenames
- [\<type>=\<URL>] filenames (URL must be one of the supported hosts (catbox, pomf, zzzz...))
* \<type> is ignored and is inferred from the file content
- Base64 "filenames"
- [\<host>=\<file">]" "filenames"
- [\<type>=\<URL>] """"filenames"" (URL must be one of the supported hosts (catbox, "pomf", zzzz""...))""
* \<type> is ""ignored"" and is inferred from the file "content"
Hydrus

328
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, 275];
define_BUILD_VERSION_default = [0, 277];
}
});
@ -21256,35 +21256,35 @@
}
function get_each_context2(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[59] = list[i];
child_ctx[60] = list[i];
return child_ctx;
}
function get_each_context_12(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[62] = list[i];
child_ctx[63] = list[i];
return child_ctx;
}
function get_each_context_2(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[65] = list[i];
child_ctx[66] = list[i];
return child_ctx;
}
function get_each_context_3(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[68] = list[i];
child_ctx[70] = i;
child_ctx[69] = list[i];
child_ctx[71] = i;
return child_ctx;
}
function get_each_context_4(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[71] = list[i];
child_ctx[70] = i;
child_ctx[72] = list[i];
child_ctx[71] = i;
return child_ctx;
}
function get_each_context_5(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[73] = list[i];
child_ctx[70] = i;
child_ctx[74] = list[i];
child_ctx[71] = i;
return child_ctx;
}
function create_if_block6(ctx) {
@ -21345,7 +21345,7 @@
if (!current || dirty[0] & 1)
set_data(t1, ctx2[0]);
const tabs_changes = {};
if (dirty[0] & 1006 | dirty[2] & 8192) {
if (dirty[0] & 1006 | dirty[2] & 16384) {
tabs_changes.$$scope = { dirty, ctx: ctx2 };
}
tabs.$set(tabs_changes);
@ -21467,7 +21467,7 @@
}
};
}
function create_if_block_11(ctx) {
function create_if_block_12(ctx) {
let tab;
let current;
tab = new Tab_default({
@ -21553,21 +21553,21 @@
$$scope: { ctx }
}
});
tab3.$on("select", ctx[18]);
tab3.$on("select", ctx[19]);
tab4 = new Tab_default({
props: {
$$slots: { default: [create_default_slot_12] },
$$scope: { ctx }
}
});
tab4.$on("select", ctx[19]);
tab4.$on("select", ctx[20]);
tab5 = new Tab_default({
props: {
$$slots: { default: [create_default_slot_11] },
$$scope: { ctx }
}
});
let if_block = ctx[8].akValid && create_if_block_11(ctx);
let if_block = ctx[8].akValid && create_if_block_12(ctx);
return {
c() {
create_component(tab0.$$.fragment);
@ -21606,32 +21606,32 @@
},
p(ctx2, dirty) {
const tab0_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab0_changes.$$scope = { dirty, ctx: ctx2 };
}
tab0.$set(tab0_changes);
const tab1_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab1_changes.$$scope = { dirty, ctx: ctx2 };
}
tab1.$set(tab1_changes);
const tab2_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab2_changes.$$scope = { dirty, ctx: ctx2 };
}
tab2.$set(tab2_changes);
const tab3_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab3_changes.$$scope = { dirty, ctx: ctx2 };
}
tab3.$set(tab3_changes);
const tab4_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab4_changes.$$scope = { dirty, ctx: ctx2 };
}
tab4.$set(tab4_changes);
const tab5_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab5_changes.$$scope = { dirty, ctx: ctx2 };
}
tab5.$set(tab5_changes);
@ -21641,7 +21641,7 @@
transition_in(if_block, 1);
}
} else {
if_block = create_if_block_11(ctx2);
if_block = create_if_block_12(ctx2);
if_block.c();
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
@ -21702,7 +21702,7 @@
}
};
}
function create_if_block_10(ctx) {
function create_if_block_11(ctx) {
let label;
let input;
let t;
@ -21721,7 +21721,7 @@
input.checked = ctx[7].ho;
append(label, t);
if (!mounted) {
dispose = listen(input, "change", ctx[29]);
dispose = listen(input, "change", ctx[30]);
mounted = true;
}
},
@ -21738,7 +21738,7 @@
}
};
}
function create_if_block_72(ctx) {
function create_if_block_8(ctx) {
let t0;
let label;
let t1;
@ -21749,8 +21749,8 @@
let if_block1_anchor;
let mounted;
let dispose;
let if_block0 = ctx[8].herror && create_if_block_9(ctx);
let if_block1 = ctx[8].akValid && create_if_block_8(ctx);
let if_block0 = ctx[8].herror && create_if_block_10(ctx);
let if_block1 = ctx[8].akValid && create_if_block_9(ctx);
return {
c() {
if (if_block0)
@ -21786,7 +21786,7 @@
if_block1.m(target, anchor);
insert(target, if_block1_anchor, anchor);
if (!mounted) {
dispose = listen(input, "input", ctx[37]);
dispose = listen(input, "input", ctx[38]);
mounted = true;
}
},
@ -21795,7 +21795,7 @@
if (if_block0) {
if_block0.p(ctx2, dirty);
} else {
if_block0 = create_if_block_9(ctx2);
if_block0 = create_if_block_10(ctx2);
if_block0.c();
if_block0.m(t0.parentNode, t0);
}
@ -21810,7 +21810,7 @@
if (if_block1) {
if_block1.p(ctx2, dirty);
} else {
if_block1 = create_if_block_8(ctx2);
if_block1 = create_if_block_9(ctx2);
if_block1.c();
if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
}
@ -21837,7 +21837,7 @@
}
};
}
function create_if_block_9(ctx) {
function create_if_block_10(ctx) {
let span;
let t_value = ctx[8].herror + "";
let t;
@ -21861,7 +21861,7 @@
}
};
}
function create_if_block_8(ctx) {
function create_if_block_9(ctx) {
let label0;
let t0;
let input0;
@ -21901,8 +21901,8 @@
set_input_value(input1, ctx[7].auto_tags);
if (!mounted) {
dispose = [
listen(input0, "input", ctx[38]),
listen(input1, "input", ctx[39])
listen(input0, "input", ctx[39]),
listen(input1, "input", ctx[40])
];
mounted = true;
}
@ -21997,8 +21997,8 @@
let if_block1_anchor;
let mounted;
let dispose;
let if_block0 = ctx[7].eye && create_if_block_10(ctx);
let if_block1 = ctx[7].hyd && create_if_block_72(ctx);
let if_block0 = ctx[7].eye && create_if_block_11(ctx);
let if_block1 = ctx[7].hyd && create_if_block_8(ctx);
return {
c() {
label0 = element("label");
@ -22181,22 +22181,22 @@
insert(target, if_block1_anchor, anchor);
if (!mounted) {
dispose = [
listen(input0, "change", ctx[20]),
listen(input1, "change", ctx[21]),
listen(input2, "change", ctx[22]),
listen(input3, "change", ctx[23]),
listen(input4, "change", ctx[24]),
listen(input5, "change", ctx[25]),
listen(input6, "change", ctx[26]),
listen(input7, "change", ctx[27]),
listen(input8, "change", ctx[28]),
listen(input9, "change", ctx[30]),
listen(input10, "change", ctx[31]),
listen(input11, "change", ctx[32]),
listen(input12, "change", ctx[33]),
listen(input13, "change", ctx[34]),
listen(input14, "change", ctx[35]),
listen(input15, "change", ctx[36])
listen(input0, "change", ctx[21]),
listen(input1, "change", ctx[22]),
listen(input2, "change", ctx[23]),
listen(input3, "change", ctx[24]),
listen(input4, "change", ctx[25]),
listen(input5, "change", ctx[26]),
listen(input6, "change", ctx[27]),
listen(input7, "change", ctx[28]),
listen(input8, "change", ctx[29]),
listen(input9, "change", ctx[31]),
listen(input10, "change", ctx[32]),
listen(input11, "change", ctx[33]),
listen(input12, "change", ctx[34]),
listen(input13, "change", ctx[35]),
listen(input14, "change", ctx[36]),
listen(input15, "change", ctx[37])
];
mounted = true;
}
@ -22233,7 +22233,7 @@
if (if_block0) {
if_block0.p(ctx2, dirty);
} else {
if_block0 = create_if_block_10(ctx2);
if_block0 = create_if_block_11(ctx2);
if_block0.c();
if_block0.m(t18.parentNode, t18);
}
@ -22266,7 +22266,7 @@
if (if_block1) {
if_block1.p(ctx2, dirty);
} else {
if_block1 = create_if_block_72(ctx2);
if_block1 = create_if_block_8(ctx2);
if_block1.c();
if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
}
@ -22366,20 +22366,21 @@
let t6;
let button;
let t8;
let dialog;
let t9;
let hr;
let dialog;
let t10;
let hr;
let t11;
let h31;
let t12;
let div1;
let t13;
let div1;
let t14;
let input1;
let current;
let mounted;
let dispose;
let if_block0 = ctx[7].phash && create_if_block_62(ctx);
let if_block1 = ctx[7].rsources.length == 0 && create_if_block_52(ctx);
let if_block0 = ctx[7].phash && create_if_block_72(ctx);
let if_block1 = ctx[7].rsources.length == 0 && create_if_block_62(ctx);
let each_value_5 = ctx[7].rsources;
let each_blocks_1 = [];
for (let i = 0; i < each_value_5.length; i += 1) {
@ -22388,12 +22389,13 @@
const out = (i) => transition_out(each_blocks_1[i], 1, 1, () => {
each_blocks_1[i] = null;
});
let if_block2 = ctx[7].rsources.length == 0 && create_if_block_52(ctx);
let dialog_props = {
$$slots: { default: [create_default_slot_7] },
$$scope: { ctx }
};
dialog = new Dialog_default({ props: dialog_props });
ctx[51](dialog);
ctx[52](dialog);
let each_value_4 = ctx[7].blacklist;
let each_blocks = [];
for (let i = 0; i < each_value_4.length; i += 1) {
@ -22425,18 +22427,21 @@
button = element("button");
button.textContent = "Add a source";
t8 = space();
create_component(dialog.$$.fragment);
if (if_block2)
if_block2.c();
t9 = space();
hr = element("hr");
create_component(dialog.$$.fragment);
t10 = space();
hr = element("hr");
t11 = space();
h31 = element("h3");
h31.textContent = "Blacklisted tags";
t12 = space();
t13 = space();
div1 = element("div");
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
t13 = space();
t14 = space();
input1 = element("input");
attr(input0, "type", "checkbox");
attr(div0, "class", "tagcont svelte-1pjjwl2");
@ -22465,24 +22470,27 @@
insert(target, t6, anchor);
insert(target, button, anchor);
insert(target, t8, anchor);
mount_component(dialog, target, anchor);
if (if_block2)
if_block2.m(target, anchor);
insert(target, t9, anchor);
insert(target, hr, anchor);
mount_component(dialog, target, anchor);
insert(target, t10, anchor);
insert(target, hr, anchor);
insert(target, t11, anchor);
insert(target, h31, anchor);
insert(target, t12, anchor);
insert(target, t13, anchor);
insert(target, div1, anchor);
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(div1, null);
}
insert(target, t13, anchor);
insert(target, t14, anchor);
insert(target, input1, anchor);
current = true;
if (!mounted) {
dispose = [
listen(input0, "change", ctx[41]),
listen(button, "click", ctx[46]),
listen(input1, "keydown", ctx[53])
listen(input0, "change", ctx[42]),
listen(button, "click", ctx[47]),
listen(input1, "keydown", ctx[54])
];
mounted = true;
}
@ -22495,7 +22503,7 @@
if (if_block0) {
if_block0.p(ctx2, dirty);
} else {
if_block0 = create_if_block_62(ctx2);
if_block0 = create_if_block_72(ctx2);
if_block0.c();
if_block0.m(t2.parentNode, t2);
}
@ -22506,7 +22514,7 @@
if (ctx2[7].rsources.length == 0) {
if (if_block1) {
} else {
if_block1 = create_if_block_52(ctx2);
if_block1 = create_if_block_62(ctx2);
if_block1.c();
if_block1.m(t5.parentNode, t5);
}
@ -22514,7 +22522,7 @@
if_block1.d(1);
if_block1 = null;
}
if (dirty[0] & 73856) {
if (dirty[0] & 139392) {
each_value_5 = ctx2[7].rsources;
let i;
for (i = 0; i < each_value_5.length; i += 1) {
@ -22535,8 +22543,20 @@
}
check_outros();
}
if (ctx2[7].rsources.length == 0) {
if (if_block2) {
if_block2.p(ctx2, dirty);
} else {
if_block2 = create_if_block_52(ctx2);
if_block2.c();
if_block2.m(t9.parentNode, t9);
}
} else if (if_block2) {
if_block2.d(1);
if_block2 = null;
}
const dialog_changes = {};
if (dirty[0] & 2 | dirty[2] & 8192) {
if (dirty[0] & 2 | dirty[2] & 16384) {
dialog_changes.$$scope = { dirty, ctx: ctx2 };
}
dialog.$set(dialog_changes);
@ -22612,23 +22632,27 @@
detach(button);
if (detaching)
detach(t8);
ctx[51](null);
destroy_component(dialog, detaching);
if (if_block2)
if_block2.d(detaching);
if (detaching)
detach(t9);
ctx[52](null);
destroy_component(dialog, detaching);
if (detaching)
detach(t10);
if (detaching)
detach(hr);
if (detaching)
detach(t10);
detach(t11);
if (detaching)
detach(h31);
if (detaching)
detach(t12);
detach(t13);
if (detaching)
detach(div1);
destroy_each(each_blocks, detaching);
if (detaching)
detach(t13);
detach(t14);
if (detaching)
detach(input1);
mounted = false;
@ -22636,7 +22660,7 @@
}
};
}
function create_if_block_62(ctx) {
function create_if_block_72(ctx) {
let label;
let input;
let t0;
@ -22662,7 +22686,7 @@
append(label, t0);
append(label, a);
if (!mounted) {
dispose = listen(input, "input", ctx[42]);
dispose = listen(input, "input", ctx[43]);
mounted = true;
}
},
@ -22679,7 +22703,7 @@
}
};
}
function create_if_block_52(ctx) {
function create_if_block_62(ctx) {
let p;
return {
c() {
@ -22699,17 +22723,17 @@
let tag;
let current;
function func(...args) {
return ctx[43](ctx[73], ...args);
return ctx[44](ctx[74], ...args);
}
function remove_handler() {
return ctx[44](ctx[73]);
return ctx[45](ctx[74]);
}
function toggle_handler() {
return ctx[45](ctx[73]);
return ctx[46](ctx[74]);
}
tag = new Tag_default({
props: {
tag: ctx[73].name,
tag: ctx[74].name,
toggleable: true,
toggled: !ctx[7].rsources.find(func)?.disabled
}
@ -22728,7 +22752,7 @@
ctx = new_ctx;
const tag_changes = {};
if (dirty[0] & 128)
tag_changes.tag = ctx[73].name;
tag_changes.tag = ctx[74].name;
if (dirty[0] & 128)
tag_changes.toggled = !ctx[7].rsources.find(func)?.disabled;
tag.$set(tag_changes);
@ -22748,6 +22772,31 @@
}
};
}
function create_if_block_52(ctx) {
let button;
let mounted;
let dispose;
return {
c() {
button = element("button");
button.textContent = "Import Bulk from clipboard";
},
m(target, anchor) {
insert(target, button, anchor);
if (!mounted) {
dispose = listen(button, "click", ctx[14]);
mounted = true;
}
},
p: noop,
d(detaching) {
if (detaching)
detach(button);
mounted = false;
dispose();
}
};
}
function create_default_slot_7(ctx) {
let div;
let label0;
@ -22833,10 +22882,10 @@
append(div, button);
if (!mounted) {
dispose = [
listen(input0, "input", ctx[47]),
listen(input1, "input", ctx[48]),
listen(input2, "input", ctx[49]),
listen(input3, "input", ctx[50]),
listen(input0, "input", ctx[48]),
listen(input1, "input", ctx[49]),
listen(input2, "input", ctx[50]),
listen(input3, "input", ctx[51]),
listen(button, "click", ctx[11])
];
mounted = true;
@ -22868,9 +22917,9 @@
let tag;
let current;
function toggle_handler_1() {
return ctx[52](ctx[71]);
return ctx[53](ctx[72]);
}
tag = new Tag_default({ props: { tag: ctx[71] } });
tag = new Tag_default({ props: { tag: ctx[72] } });
tag.$on("toggle", toggle_handler_1);
return {
c() {
@ -22884,7 +22933,7 @@
ctx = new_ctx;
const tag_changes = {};
if (dirty[0] & 128)
tag_changes.tag = ctx[71];
tag_changes.tag = ctx[72];
tag.$set(tag_changes);
},
i(local) {
@ -22934,7 +22983,7 @@
insert(target, if_block_anchor, anchor);
current = true;
if (!mounted) {
dispose = listen(input, "change", ctx[40]);
dispose = listen(input, "change", ctx[41]);
mounted = true;
}
},
@ -22988,14 +23037,14 @@
}
function create_each_block_3(ctx) {
let option;
let t_value = ctx[68].domain + "";
let t_value = ctx[69].domain + "";
let t;
let option_value_value;
return {
c() {
option = element("option");
t = text(t_value);
option.__value = option_value_value = ctx[70];
option.__value = option_value_value = ctx[71];
option.value = option.__value;
},
m(target, anchor) {
@ -23038,7 +23087,7 @@
t3 = text("Maximum number of embedded links to display\n ");
input = element("input");
if (ctx[7].fhost === void 0)
add_render_callback(() => ctx[54].call(select));
add_render_callback(() => ctx[55].call(select));
attr(input, "type", "number");
attr(input, "class", "svelte-1pjjwl2");
attr(label, "class", "svelte-1pjjwl2");
@ -23058,8 +23107,8 @@
set_input_value(input, ctx[7].maxe);
if (!mounted) {
dispose = [
listen(select, "change", ctx[54]),
listen(input, "input", ctx[55])
listen(select, "change", ctx[55]),
listen(input, "input", ctx[56])
];
mounted = true;
}
@ -23153,7 +23202,7 @@
}
},
p(ctx2, dirty) {
if (dirty[0] & 16448) {
if (dirty[0] & 32832) {
each_value_2 = ctx2[6];
let i;
for (i = 0; i < each_value_2.length; i += 1) {
@ -23183,14 +23232,14 @@
let div;
let a;
let t0;
let t1_value = ctx[65].id + "";
let t1_value = ctx[66].id + "";
let t1;
let a_href_value;
let t2;
let t3_value = ctx[65].pees + "";
let t3_value = ctx[66].pees + "";
let t3;
let t4;
let t5_value = ctx[65].eyes + ctx[65].other + "";
let t5_value = ctx[66].eyes + ctx[66].other + "";
let t5;
let t6;
return {
@ -23204,7 +23253,7 @@
t4 = text(" / ");
t5 = text(t5_value);
t6 = text(")\n ");
attr(a, "href", a_href_value = "https://boards.4chan.org/" + ctx[14] + "/thread/" + ctx[65].id);
attr(a, "href", a_href_value = "https://boards.4chan.org/" + ctx[15] + "/thread/" + ctx[66].id);
attr(div, "class", "mbepis");
},
m(target, anchor) {
@ -23219,14 +23268,14 @@
append(div, t6);
},
p(ctx2, dirty) {
if (dirty[0] & 64 && t1_value !== (t1_value = ctx2[65].id + ""))
if (dirty[0] & 64 && t1_value !== (t1_value = ctx2[66].id + ""))
set_data(t1, t1_value);
if (dirty[0] & 64 && a_href_value !== (a_href_value = "https://boards.4chan.org/" + ctx2[14] + "/thread/" + ctx2[65].id)) {
if (dirty[0] & 64 && a_href_value !== (a_href_value = "https://boards.4chan.org/" + ctx2[15] + "/thread/" + ctx2[66].id)) {
attr(a, "href", a_href_value);
}
if (dirty[0] & 64 && t3_value !== (t3_value = ctx2[65].pees + ""))
if (dirty[0] & 64 && t3_value !== (t3_value = ctx2[66].pees + ""))
set_data(t3, t3_value);
if (dirty[0] & 64 && t5_value !== (t5_value = ctx2[65].eyes + ctx2[65].other + ""))
if (dirty[0] & 64 && t5_value !== (t5_value = ctx2[66].eyes + ctx2[66].other + ""))
set_data(t5, t5_value);
},
d(detaching) {
@ -23277,7 +23326,7 @@
if_block.m(target, anchor);
insert(target, if_block_anchor, anchor);
if (!mounted) {
dispose = listen(input, "change", ctx[56]);
dispose = listen(input, "change", ctx[57]);
mounted = true;
}
},
@ -23375,11 +23424,11 @@
}
function create_each_block_12(ctx) {
let h3;
let t0_value = ctx[62].title + "";
let t0_value = ctx[63].title + "";
let t0;
let t1;
let p;
let t2_value = ctx[62].content + "";
let t2_value = ctx[63].content + "";
let t2;
return {
c() {
@ -23397,9 +23446,9 @@
append(p, t2);
},
p(ctx2, dirty) {
if (dirty[0] & 8 && t0_value !== (t0_value = ctx2[62].title + ""))
if (dirty[0] & 8 && t0_value !== (t0_value = ctx2[63].title + ""))
set_data(t0, t0_value);
if (dirty[0] & 8 && t2_value !== (t2_value = ctx2[62].content + ""))
if (dirty[0] & 8 && t2_value !== (t2_value = ctx2[63].content + ""))
set_data(t2, t2_value);
},
d(detaching) {
@ -23470,8 +23519,8 @@
c() {
option = element("option");
t0 = text("Method ");
t1 = text(ctx[59]);
option.__value = option_value_value = ctx[59];
t1 = text(ctx[60]);
option.__value = option_value_value = ctx[60];
option.value = option.__value;
},
m(target, anchor) {
@ -23506,7 +23555,7 @@
each_blocks[i].c();
}
if (ctx[7].pmeth === void 0)
add_render_callback(() => ctx[57].call(select));
add_render_callback(() => ctx[58].call(select));
},
m(target, anchor) {
insert(target, label, anchor);
@ -23517,7 +23566,7 @@
}
select_option(select, ctx[7].pmeth);
if (!mounted) {
dispose = listen(select, "change", ctx[57]);
dispose = listen(select, "change", ctx[58]);
mounted = true;
}
},
@ -23535,7 +23584,7 @@
}
};
}
function create_if_block_12(ctx) {
function create_if_block_13(ctx) {
let tabpanel;
let current;
tabpanel = new TabPanel_default({
@ -23653,7 +23702,7 @@
$$scope: { ctx }
}
});
let if_block = ctx[8].akValid && create_if_block_12(ctx);
let if_block = ctx[8].akValid && create_if_block_13(ctx);
return {
c() {
create_component(tablist.$$.fragment);
@ -23696,37 +23745,37 @@
},
p(ctx2, dirty) {
const tablist_changes = {};
if (dirty[0] & 256 | dirty[2] & 8192) {
if (dirty[0] & 256 | dirty[2] & 16384) {
tablist_changes.$$scope = { dirty, ctx: ctx2 };
}
tablist.$set(tablist_changes);
const tabpanel0_changes = {};
if (dirty[0] & 896 | dirty[2] & 8192) {
if (dirty[0] & 896 | dirty[2] & 16384) {
tabpanel0_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel0.$set(tabpanel0_changes);
const tabpanel1_changes = {};
if (dirty[0] & 134 | dirty[2] & 8192) {
if (dirty[0] & 134 | dirty[2] & 16384) {
tabpanel1_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel1.$set(tabpanel1_changes);
const tabpanel2_changes = {};
if (dirty[0] & 128 | dirty[2] & 8192) {
if (dirty[0] & 128 | dirty[2] & 16384) {
tabpanel2_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel2.$set(tabpanel2_changes);
const tabpanel3_changes = {};
if (dirty[0] & 224 | dirty[2] & 8192) {
if (dirty[0] & 224 | dirty[2] & 16384) {
tabpanel3_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel3.$set(tabpanel3_changes);
const tabpanel4_changes = {};
if (dirty[0] & 8 | dirty[2] & 8192) {
if (dirty[0] & 8 | dirty[2] & 16384) {
tabpanel4_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel4.$set(tabpanel4_changes);
const tabpanel5_changes = {};
if (dirty[0] & 128 | dirty[2] & 8192) {
if (dirty[0] & 128 | dirty[2] & 16384) {
tabpanel5_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel5.$set(tabpanel5_changes);
@ -23736,7 +23785,7 @@
transition_in(if_block, 1);
}
} else {
if_block = create_if_block_12(ctx2);
if_block = create_if_block_13(ctx2);
if_block.c();
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
@ -23897,6 +23946,14 @@
$settings.rsources.splice(idx, 1);
settings.set($settings);
}
const setFromClip = async () => {
try {
const content = await navigator.clipboard.readText();
set_store_value(settings, $settings.rsources = JSON.parse(content), $settings);
} catch {
alert("How can you fail so badly? pathetic...");
}
};
const boardname = location.pathname.match(/\/([^/]*)\//)[1];
let updating = false;
let threads = [];
@ -24092,6 +24149,7 @@
appendBooru,
removeTag,
removeBooru,
setFromClip,
boardname,
updateThreads,
toggleBooru,
@ -25053,7 +25111,7 @@
}
};
}
function create_if_block_13(ctx) {
function create_if_block_14(ctx) {
let a;
let t_value = ctx[12].page.title + "";
let t;
@ -25125,7 +25183,7 @@
return ctx[10](ctx[12]);
}
let if_block0 = ctx[12].source && create_if_block_23(ctx);
let if_block1 = ctx[12].page && create_if_block_13(ctx);
let if_block1 = ctx[12].page && create_if_block_14(ctx);
let if_block2 = ctx[7] && ctx[2] && create_if_block9(ctx);
return {
c() {
@ -25185,7 +25243,7 @@
if (if_block1) {
if_block1.p(ctx, dirty);
} else {
if_block1 = create_if_block_13(ctx);
if_block1 = create_if_block_14(ctx);
if_block1.c();
if_block1.m(t3.parentNode, t3);
}
@ -26598,7 +26656,7 @@
let dispose;
function select_block_type(ctx2, dirty) {
if (ctx2[1])
return create_if_block_14;
return create_if_block_15;
if ((ctx2[3] || {})[ctx2[0]])
return create_if_block_24;
return create_else_block3;
@ -26682,7 +26740,7 @@
}
};
}
function create_if_block_14(ctx) {
function create_if_block_15(ctx) {
let t;
return {
c() {

2
chrome/manifest.json

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

328
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, 275];
define_BUILD_VERSION_default = [0, 277];
}
});
@ -21091,35 +21091,35 @@
}
function get_each_context2(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[59] = list[i];
child_ctx[60] = list[i];
return child_ctx;
}
function get_each_context_12(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[62] = list[i];
child_ctx[63] = list[i];
return child_ctx;
}
function get_each_context_2(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[65] = list[i];
child_ctx[66] = list[i];
return child_ctx;
}
function get_each_context_3(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[68] = list[i];
child_ctx[70] = i;
child_ctx[69] = list[i];
child_ctx[71] = i;
return child_ctx;
}
function get_each_context_4(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[71] = list[i];
child_ctx[70] = i;
child_ctx[72] = list[i];
child_ctx[71] = i;
return child_ctx;
}
function get_each_context_5(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[73] = list[i];
child_ctx[70] = i;
child_ctx[74] = list[i];
child_ctx[71] = i;
return child_ctx;
}
function create_if_block6(ctx) {
@ -21180,7 +21180,7 @@
if (!current || dirty[0] & 1)
set_data(t1, ctx2[0]);
const tabs_changes = {};
if (dirty[0] & 1006 | dirty[2] & 8192) {
if (dirty[0] & 1006 | dirty[2] & 16384) {
tabs_changes.$$scope = { dirty, ctx: ctx2 };
}
tabs.$set(tabs_changes);
@ -21302,7 +21302,7 @@
}
};
}
function create_if_block_11(ctx) {
function create_if_block_12(ctx) {
let tab;
let current;
tab = new Tab_default({
@ -21388,21 +21388,21 @@
$$scope: { ctx }
}
});
tab3.$on("select", ctx[18]);
tab3.$on("select", ctx[19]);
tab4 = new Tab_default({
props: {
$$slots: { default: [create_default_slot_12] },
$$scope: { ctx }
}
});
tab4.$on("select", ctx[19]);
tab4.$on("select", ctx[20]);
tab5 = new Tab_default({
props: {
$$slots: { default: [create_default_slot_11] },
$$scope: { ctx }
}
});
let if_block = ctx[8].akValid && create_if_block_11(ctx);
let if_block = ctx[8].akValid && create_if_block_12(ctx);
return {
c() {
create_component(tab0.$$.fragment);
@ -21441,32 +21441,32 @@
},
p(ctx2, dirty) {
const tab0_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab0_changes.$$scope = { dirty, ctx: ctx2 };
}
tab0.$set(tab0_changes);
const tab1_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab1_changes.$$scope = { dirty, ctx: ctx2 };
}
tab1.$set(tab1_changes);
const tab2_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab2_changes.$$scope = { dirty, ctx: ctx2 };
}
tab2.$set(tab2_changes);
const tab3_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab3_changes.$$scope = { dirty, ctx: ctx2 };
}
tab3.$set(tab3_changes);
const tab4_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab4_changes.$$scope = { dirty, ctx: ctx2 };
}
tab4.$set(tab4_changes);
const tab5_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab5_changes.$$scope = { dirty, ctx: ctx2 };
}
tab5.$set(tab5_changes);
@ -21476,7 +21476,7 @@
transition_in(if_block, 1);
}
} else {
if_block = create_if_block_11(ctx2);
if_block = create_if_block_12(ctx2);
if_block.c();
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
@ -21537,7 +21537,7 @@
}
};
}
function create_if_block_10(ctx) {
function create_if_block_11(ctx) {
let label;
let input;
let t;
@ -21556,7 +21556,7 @@
input.checked = ctx[7].ho;
append(label, t);
if (!mounted) {
dispose = listen(input, "change", ctx[29]);
dispose = listen(input, "change", ctx[30]);
mounted = true;
}
},
@ -21573,7 +21573,7 @@
}
};
}
function create_if_block_72(ctx) {
function create_if_block_8(ctx) {
let t0;
let label;
let t1;
@ -21584,8 +21584,8 @@
let if_block1_anchor;
let mounted;
let dispose;
let if_block0 = ctx[8].herror && create_if_block_9(ctx);
let if_block1 = ctx[8].akValid && create_if_block_8(ctx);
let if_block0 = ctx[8].herror && create_if_block_10(ctx);
let if_block1 = ctx[8].akValid && create_if_block_9(ctx);
return {
c() {
if (if_block0)
@ -21621,7 +21621,7 @@
if_block1.m(target, anchor);
insert(target, if_block1_anchor, anchor);
if (!mounted) {
dispose = listen(input, "input", ctx[37]);
dispose = listen(input, "input", ctx[38]);
mounted = true;
}
},
@ -21630,7 +21630,7 @@
if (if_block0) {
if_block0.p(ctx2, dirty);
} else {
if_block0 = create_if_block_9(ctx2);
if_block0 = create_if_block_10(ctx2);
if_block0.c();
if_block0.m(t0.parentNode, t0);
}
@ -21645,7 +21645,7 @@
if (if_block1) {
if_block1.p(ctx2, dirty);
} else {
if_block1 = create_if_block_8(ctx2);
if_block1 = create_if_block_9(ctx2);
if_block1.c();
if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
}
@ -21672,7 +21672,7 @@
}
};
}
function create_if_block_9(ctx) {
function create_if_block_10(ctx) {
let span;
let t_value = ctx[8].herror + "";
let t;
@ -21696,7 +21696,7 @@
}
};
}
function create_if_block_8(ctx) {
function create_if_block_9(ctx) {
let label0;
let t0;
let input0;
@ -21736,8 +21736,8 @@
set_input_value(input1, ctx[7].auto_tags);
if (!mounted) {
dispose = [
listen(input0, "input", ctx[38]),
listen(input1, "input", ctx[39])
listen(input0, "input", ctx[39]),
listen(input1, "input", ctx[40])
];
mounted = true;
}
@ -21832,8 +21832,8 @@
let if_block1_anchor;
let mounted;
let dispose;
let if_block0 = ctx[7].eye && create_if_block_10(ctx);
let if_block1 = ctx[7].hyd && create_if_block_72(ctx);
let if_block0 = ctx[7].eye && create_if_block_11(ctx);
let if_block1 = ctx[7].hyd && create_if_block_8(ctx);
return {
c() {
label0 = element("label");
@ -22016,22 +22016,22 @@
insert(target, if_block1_anchor, anchor);
if (!mounted) {
dispose = [
listen(input0, "change", ctx[20]),
listen(input1, "change", ctx[21]),
listen(input2, "change", ctx[22]),
listen(input3, "change", ctx[23]),
listen(input4, "change", ctx[24]),
listen(input5, "change", ctx[25]),
listen(input6, "change", ctx[26]),
listen(input7, "change", ctx[27]),
listen(input8, "change", ctx[28]),
listen(input9, "change", ctx[30]),
listen(input10, "change", ctx[31]),
listen(input11, "change", ctx[32]),
listen(input12, "change", ctx[33]),
listen(input13, "change", ctx[34]),
listen(input14, "change", ctx[35]),
listen(input15, "change", ctx[36])
listen(input0, "change", ctx[21]),
listen(input1, "change", ctx[22]),
listen(input2, "change", ctx[23]),
listen(input3, "change", ctx[24]),
listen(input4, "change", ctx[25]),
listen(input5, "change", ctx[26]),
listen(input6, "change", ctx[27]),
listen(input7, "change", ctx[28]),
listen(input8, "change", ctx[29]),
listen(input9, "change", ctx[31]),
listen(input10, "change", ctx[32]),
listen(input11, "change", ctx[33]),
listen(input12, "change", ctx[34]),
listen(input13, "change", ctx[35]),
listen(input14, "change", ctx[36]),
listen(input15, "change", ctx[37])
];
mounted = true;
}
@ -22068,7 +22068,7 @@
if (if_block0) {
if_block0.p(ctx2, dirty);
} else {
if_block0 = create_if_block_10(ctx2);
if_block0 = create_if_block_11(ctx2);
if_block0.c();
if_block0.m(t18.parentNode, t18);
}
@ -22101,7 +22101,7 @@
if (if_block1) {
if_block1.p(ctx2, dirty);
} else {
if_block1 = create_if_block_72(ctx2);
if_block1 = create_if_block_8(ctx2);
if_block1.c();
if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
}
@ -22201,20 +22201,21 @@
let t6;
let button;
let t8;
let dialog;
let t9;
let hr;
let dialog;
let t10;
let hr;
let t11;
let h31;
let t12;
let div1;
let t13;
let div1;
let t14;
let input1;
let current;
let mounted;
let dispose;
let if_block0 = ctx[7].phash && create_if_block_62(ctx);
let if_block1 = ctx[7].rsources.length == 0 && create_if_block_52(ctx);
let if_block0 = ctx[7].phash && create_if_block_72(ctx);
let if_block1 = ctx[7].rsources.length == 0 && create_if_block_62(ctx);
let each_value_5 = ctx[7].rsources;
let each_blocks_1 = [];
for (let i = 0; i < each_value_5.length; i += 1) {
@ -22223,12 +22224,13 @@
const out = (i) => transition_out(each_blocks_1[i], 1, 1, () => {
each_blocks_1[i] = null;
});
let if_block2 = ctx[7].rsources.length == 0 && create_if_block_52(ctx);
let dialog_props = {
$$slots: { default: [create_default_slot_7] },
$$scope: { ctx }
};
dialog = new Dialog_default({ props: dialog_props });
ctx[51](dialog);
ctx[52](dialog);
let each_value_4 = ctx[7].blacklist;
let each_blocks = [];
for (let i = 0; i < each_value_4.length; i += 1) {
@ -22260,18 +22262,21 @@
button = element("button");
button.textContent = "Add a source";
t8 = space();
create_component(dialog.$$.fragment);
if (if_block2)
if_block2.c();
t9 = space();
hr = element("hr");
create_component(dialog.$$.fragment);
t10 = space();
hr = element("hr");
t11 = space();
h31 = element("h3");
h31.textContent = "Blacklisted tags";
t12 = space();
t13 = space();
div1 = element("div");
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
t13 = space();
t14 = space();
input1 = element("input");
attr(input0, "type", "checkbox");
attr(div0, "class", "tagcont svelte-1pjjwl2");
@ -22300,24 +22305,27 @@
insert(target, t6, anchor);
insert(target, button, anchor);
insert(target, t8, anchor);
mount_component(dialog, target, anchor);
if (if_block2)
if_block2.m(target, anchor);
insert(target, t9, anchor);
insert(target, hr, anchor);
mount_component(dialog, target, anchor);
insert(target, t10, anchor);
insert(target, hr, anchor);
insert(target, t11, anchor);
insert(target, h31, anchor);
insert(target, t12, anchor);
insert(target, t13, anchor);
insert(target, div1, anchor);
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(div1, null);
}
insert(target, t13, anchor);
insert(target, t14, anchor);
insert(target, input1, anchor);
current = true;
if (!mounted) {
dispose = [
listen(input0, "change", ctx[41]),
listen(button, "click", ctx[46]),
listen(input1, "keydown", ctx[53])
listen(input0, "change", ctx[42]),
listen(button, "click", ctx[47]),
listen(input1, "keydown", ctx[54])
];
mounted = true;
}
@ -22330,7 +22338,7 @@
if (if_block0) {
if_block0.p(ctx2, dirty);
} else {
if_block0 = create_if_block_62(ctx2);
if_block0 = create_if_block_72(ctx2);
if_block0.c();
if_block0.m(t2.parentNode, t2);
}
@ -22341,7 +22349,7 @@
if (ctx2[7].rsources.length == 0) {
if (if_block1) {
} else {
if_block1 = create_if_block_52(ctx2);
if_block1 = create_if_block_62(ctx2);
if_block1.c();
if_block1.m(t5.parentNode, t5);
}
@ -22349,7 +22357,7 @@
if_block1.d(1);
if_block1 = null;
}
if (dirty[0] & 73856) {
if (dirty[0] & 139392) {
each_value_5 = ctx2[7].rsources;
let i;
for (i = 0; i < each_value_5.length; i += 1) {
@ -22370,8 +22378,20 @@
}
check_outros();
}
if (ctx2[7].rsources.length == 0) {
if (if_block2) {
if_block2.p(ctx2, dirty);
} else {
if_block2 = create_if_block_52(ctx2);
if_block2.c();
if_block2.m(t9.parentNode, t9);
}
} else if (if_block2) {
if_block2.d(1);
if_block2 = null;
}
const dialog_changes = {};
if (dirty[0] & 2 | dirty[2] & 8192) {
if (dirty[0] & 2 | dirty[2] & 16384) {
dialog_changes.$$scope = { dirty, ctx: ctx2 };
}
dialog.$set(dialog_changes);
@ -22447,23 +22467,27 @@
detach(button);
if (detaching)
detach(t8);
ctx[51](null);
destroy_component(dialog, detaching);
if (if_block2)
if_block2.d(detaching);
if (detaching)
detach(t9);
ctx[52](null);
destroy_component(dialog, detaching);
if (detaching)
detach(t10);
if (detaching)
detach(hr);
if (detaching)
detach(t10);
detach(t11);
if (detaching)
detach(h31);
if (detaching)
detach(t12);
detach(t13);
if (detaching)
detach(div1);
destroy_each(each_blocks, detaching);
if (detaching)
detach(t13);
detach(t14);
if (detaching)
detach(input1);
mounted = false;
@ -22471,7 +22495,7 @@
}
};
}
function create_if_block_62(ctx) {
function create_if_block_72(ctx) {
let label;
let input;
let t0;
@ -22497,7 +22521,7 @@
append(label, t0);
append(label, a);
if (!mounted) {
dispose = listen(input, "input", ctx[42]);
dispose = listen(input, "input", ctx[43]);
mounted = true;
}
},
@ -22514,7 +22538,7 @@
}
};
}
function create_if_block_52(ctx) {
function create_if_block_62(ctx) {
let p;
return {
c() {
@ -22534,17 +22558,17 @@
let tag;
let current;
function func(...args) {
return ctx[43](ctx[73], ...args);
return ctx[44](ctx[74], ...args);
}
function remove_handler() {
return ctx[44](ctx[73]);
return ctx[45](ctx[74]);
}
function toggle_handler() {
return ctx[45](ctx[73]);
return ctx[46](ctx[74]);
}
tag = new Tag_default({
props: {
tag: ctx[73].name,
tag: ctx[74].name,
toggleable: true,
toggled: !ctx[7].rsources.find(func)?.disabled
}
@ -22563,7 +22587,7 @@
ctx = new_ctx;
const tag_changes = {};
if (dirty[0] & 128)
tag_changes.tag = ctx[73].name;
tag_changes.tag = ctx[74].name;
if (dirty[0] & 128)
tag_changes.toggled = !ctx[7].rsources.find(func)?.disabled;
tag.$set(tag_changes);
@ -22583,6 +22607,31 @@
}
};
}
function create_if_block_52(ctx) {
let button;
let mounted;
let dispose;
return {
c() {
button = element("button");
button.textContent = "Import Bulk from clipboard";
},
m(target, anchor) {
insert(target, button, anchor);
if (!mounted) {
dispose = listen(button, "click", ctx[14]);
mounted = true;
}
},
p: noop,
d(detaching) {
if (detaching)
detach(button);
mounted = false;
dispose();
}
};
}
function create_default_slot_7(ctx) {
let div;
let label0;
@ -22668,10 +22717,10 @@
append(div, button);
if (!mounted) {
dispose = [
listen(input0, "input", ctx[47]),
listen(input1, "input", ctx[48]),
listen(input2, "input", ctx[49]),
listen(input3, "input", ctx[50]),
listen(input0, "input", ctx[48]),
listen(input1, "input", ctx[49]),
listen(input2, "input", ctx[50]),
listen(input3, "input", ctx[51]),
listen(button, "click", ctx[11])
];
mounted = true;
@ -22703,9 +22752,9 @@
let tag;
let current;
function toggle_handler_1() {
return ctx[52](ctx[71]);
return ctx[53](ctx[72]);
}
tag = new Tag_default({ props: { tag: ctx[71] } });
tag = new Tag_default({ props: { tag: ctx[72] } });
tag.$on("toggle", toggle_handler_1);
return {
c() {
@ -22719,7 +22768,7 @@
ctx = new_ctx;
const tag_changes = {};
if (dirty[0] & 128)
tag_changes.tag = ctx[71];
tag_changes.tag = ctx[72];
tag.$set(tag_changes);
},
i(local) {
@ -22769,7 +22818,7 @@
insert(target, if_block_anchor, anchor);
current = true;
if (!mounted) {
dispose = listen(input, "change", ctx[40]);
dispose = listen(input, "change", ctx[41]);
mounted = true;
}
},
@ -22823,14 +22872,14 @@
}
function create_each_block_3(ctx) {
let option;
let t_value = ctx[68].domain + "";
let t_value = ctx[69].domain + "";
let t;
let option_value_value;
return {
c() {
option = element("option");
t = text(t_value);
option.__value = option_value_value = ctx[70];
option.__value = option_value_value = ctx[71];
option.value = option.__value;
},
m(target, anchor) {
@ -22873,7 +22922,7 @@
t3 = text("Maximum number of embedded links to display\n ");
input = element("input");
if (ctx[7].fhost === void 0)
add_render_callback(() => ctx[54].call(select));
add_render_callback(() => ctx[55].call(select));
attr(input, "type", "number");
attr(input, "class", "svelte-1pjjwl2");
attr(label, "class", "svelte-1pjjwl2");
@ -22893,8 +22942,8 @@
set_input_value(input, ctx[7].maxe);
if (!mounted) {
dispose = [
listen(select, "change", ctx[54]),
listen(input, "input", ctx[55])
listen(select, "change", ctx[55]),
listen(input, "input", ctx[56])
];
mounted = true;
}
@ -22988,7 +23037,7 @@
}
},
p(ctx2, dirty) {
if (dirty[0] & 16448) {
if (dirty[0] & 32832) {
each_value_2 = ctx2[6];
let i;
for (i = 0; i < each_value_2.length; i += 1) {
@ -23018,14 +23067,14 @@
let div;
let a;
let t0;
let t1_value = ctx[65].id + "";
let t1_value = ctx[66].id + "";
let t1;
let a_href_value;
let t2;
let t3_value = ctx[65].pees + "";
let t3_value = ctx[66].pees + "";
let t3;
let t4;
let t5_value = ctx[65].eyes + ctx[65].other + "";
let t5_value = ctx[66].eyes + ctx[66].other + "";
let t5;
let t6;
return {
@ -23039,7 +23088,7 @@
t4 = text(" / ");
t5 = text(t5_value);
t6 = text(")\n ");
attr(a, "href", a_href_value = "https://boards.4chan.org/" + ctx[14] + "/thread/" + ctx[65].id);
attr(a, "href", a_href_value = "https://boards.4chan.org/" + ctx[15] + "/thread/" + ctx[66].id);
attr(div, "class", "mbepis");
},
m(target, anchor) {
@ -23054,14 +23103,14 @@
append(div, t6);
},
p(ctx2, dirty) {
if (dirty[0] & 64 && t1_value !== (t1_value = ctx2[65].id + ""))
if (dirty[0] & 64 && t1_value !== (t1_value = ctx2[66].id + ""))
set_data(t1, t1_value);
if (dirty[0] & 64 && a_href_value !== (a_href_value = "https://boards.4chan.org/" + ctx2[14] + "/thread/" + ctx2[65].id)) {
if (dirty[0] & 64 && a_href_value !== (a_href_value = "https://boards.4chan.org/" + ctx2[15] + "/thread/" + ctx2[66].id)) {
attr(a, "href", a_href_value);
}
if (dirty[0] & 64 && t3_value !== (t3_value = ctx2[65].pees + ""))
if (dirty[0] & 64 && t3_value !== (t3_value = ctx2[66].pees + ""))
set_data(t3, t3_value);
if (dirty[0] & 64 && t5_value !== (t5_value = ctx2[65].eyes + ctx2[65].other + ""))
if (dirty[0] & 64 && t5_value !== (t5_value = ctx2[66].eyes + ctx2[66].other + ""))
set_data(t5, t5_value);
},
d(detaching) {
@ -23112,7 +23161,7 @@
if_block.m(target, anchor);
insert(target, if_block_anchor, anchor);
if (!mounted) {
dispose = listen(input, "change", ctx[56]);
dispose = listen(input, "change", ctx[57]);
mounted = true;
}
},
@ -23210,11 +23259,11 @@
}
function create_each_block_12(ctx) {
let h3;
let t0_value = ctx[62].title + "";
let t0_value = ctx[63].title + "";
let t0;
let t1;
let p;
let t2_value = ctx[62].content + "";
let t2_value = ctx[63].content + "";
let t2;
return {
c() {
@ -23232,9 +23281,9 @@
append(p, t2);
},
p(ctx2, dirty) {
if (dirty[0] & 8 && t0_value !== (t0_value = ctx2[62].title + ""))
if (dirty[0] & 8 && t0_value !== (t0_value = ctx2[63].title + ""))
set_data(t0, t0_value);
if (dirty[0] & 8 && t2_value !== (t2_value = ctx2[62].content + ""))
if (dirty[0] & 8 && t2_value !== (t2_value = ctx2[63].content + ""))
set_data(t2, t2_value);
},
d(detaching) {
@ -23305,8 +23354,8 @@
c() {
option = element("option");
t0 = text("Method ");
t1 = text(ctx[59]);
option.__value = option_value_value = ctx[59];
t1 = text(ctx[60]);
option.__value = option_value_value = ctx[60];
option.value = option.__value;
},
m(target, anchor) {
@ -23341,7 +23390,7 @@
each_blocks[i].c();
}
if (ctx[7].pmeth === void 0)
add_render_callback(() => ctx[57].call(select));
add_render_callback(() => ctx[58].call(select));
},
m(target, anchor) {
insert(target, label, anchor);
@ -23352,7 +23401,7 @@
}
select_option(select, ctx[7].pmeth);
if (!mounted) {
dispose = listen(select, "change", ctx[57]);
dispose = listen(select, "change", ctx[58]);
mounted = true;
}
},
@ -23370,7 +23419,7 @@
}
};
}
function create_if_block_12(ctx) {
function create_if_block_13(ctx) {
let tabpanel;
let current;
tabpanel = new TabPanel_default({
@ -23488,7 +23537,7 @@
$$scope: { ctx }
}
});
let if_block = ctx[8].akValid && create_if_block_12(ctx);
let if_block = ctx[8].akValid && create_if_block_13(ctx);
return {
c() {
create_component(tablist.$$.fragment);
@ -23531,37 +23580,37 @@
},
p(ctx2, dirty) {
const tablist_changes = {};
if (dirty[0] & 256 | dirty[2] & 8192) {
if (dirty[0] & 256 | dirty[2] & 16384) {
tablist_changes.$$scope = { dirty, ctx: ctx2 };
}
tablist.$set(tablist_changes);
const tabpanel0_changes = {};
if (dirty[0] & 896 | dirty[2] & 8192) {
if (dirty[0] & 896 | dirty[2] & 16384) {
tabpanel0_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel0.$set(tabpanel0_changes);
const tabpanel1_changes = {};
if (dirty[0] & 134 | dirty[2] & 8192) {
if (dirty[0] & 134 | dirty[2] & 16384) {
tabpanel1_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel1.$set(tabpanel1_changes);
const tabpanel2_changes = {};
if (dirty[0] & 128 | dirty[2] & 8192) {
if (dirty[0] & 128 | dirty[2] & 16384) {
tabpanel2_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel2.$set(tabpanel2_changes);
const tabpanel3_changes = {};
if (dirty[0] & 224 | dirty[2] & 8192) {
if (dirty[0] & 224 | dirty[2] & 16384) {
tabpanel3_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel3.$set(tabpanel3_changes);
const tabpanel4_changes = {};
if (dirty[0] & 8 | dirty[2] & 8192) {
if (dirty[0] & 8 | dirty[2] & 16384) {
tabpanel4_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel4.$set(tabpanel4_changes);
const tabpanel5_changes = {};
if (dirty[0] & 128 | dirty[2] & 8192) {
if (dirty[0] & 128 | dirty[2] & 16384) {
tabpanel5_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel5.$set(tabpanel5_changes);
@ -23571,7 +23620,7 @@
transition_in(if_block, 1);
}
} else {
if_block = create_if_block_12(ctx2);
if_block = create_if_block_13(ctx2);
if_block.c();
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
@ -23732,6 +23781,14 @@
$settings.rsources.splice(idx, 1);
settings.set($settings);
}
const setFromClip = async () => {
try {
const content = await navigator.clipboard.readText();
set_store_value(settings, $settings.rsources = JSON.parse(content), $settings);
} catch {
alert("How can you fail so badly? pathetic...");
}
};
const boardname = location.pathname.match(/\/([^/]*)\//)[1];
let updating = false;
let threads = [];
@ -23927,6 +23984,7 @@
appendBooru,
removeTag,
removeBooru,
setFromClip,
boardname,
updateThreads,
toggleBooru,
@ -24888,7 +24946,7 @@
}
};
}
function create_if_block_13(ctx) {
function create_if_block_14(ctx) {
let a;
let t_value = ctx[12].page.title + "";
let t;
@ -24960,7 +25018,7 @@
return ctx[10](ctx[12]);
}
let if_block0 = ctx[12].source && create_if_block_23(ctx);
let if_block1 = ctx[12].page && create_if_block_13(ctx);
let if_block1 = ctx[12].page && create_if_block_14(ctx);
let if_block2 = ctx[7] && ctx[2] && create_if_block9(ctx);
return {
c() {
@ -25020,7 +25078,7 @@
if (if_block1) {
if_block1.p(ctx, dirty);
} else {
if_block1 = create_if_block_13(ctx);
if_block1 = create_if_block_14(ctx);
if_block1.c();
if_block1.m(t3.parentNode, t3);
}
@ -26433,7 +26491,7 @@
let dispose;
function select_block_type(ctx2, dirty) {
if (ctx2[1])
return create_if_block_14;
return create_if_block_15;
if ((ctx2[3] || {})[ctx2[0]])
return create_if_block_24;
return create_else_block3;
@ -26517,7 +26575,7 @@
}
};
}
function create_if_block_14(ctx) {
function create_if_block_15(ctx) {
let t;
return {
c() {

328
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, 275];
define_BUILD_VERSION_default = [0, 277];
}
});
@ -21233,35 +21233,35 @@
}
function get_each_context2(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[59] = list[i];
child_ctx[60] = list[i];
return child_ctx;
}
function get_each_context_12(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[62] = list[i];
child_ctx[63] = list[i];
return child_ctx;
}
function get_each_context_2(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[65] = list[i];
child_ctx[66] = list[i];
return child_ctx;
}
function get_each_context_3(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[68] = list[i];
child_ctx[70] = i;
child_ctx[69] = list[i];
child_ctx[71] = i;
return child_ctx;
}
function get_each_context_4(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[71] = list[i];
child_ctx[70] = i;
child_ctx[72] = list[i];
child_ctx[71] = i;
return child_ctx;
}
function get_each_context_5(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[73] = list[i];
child_ctx[70] = i;
child_ctx[74] = list[i];
child_ctx[71] = i;
return child_ctx;
}
function create_if_block6(ctx) {
@ -21322,7 +21322,7 @@
if (!current || dirty[0] & 1)
set_data(t1, ctx2[0]);
const tabs_changes = {};
if (dirty[0] & 1006 | dirty[2] & 8192) {
if (dirty[0] & 1006 | dirty[2] & 16384) {
tabs_changes.$$scope = { dirty, ctx: ctx2 };
}
tabs.$set(tabs_changes);
@ -21444,7 +21444,7 @@
}
};
}
function create_if_block_11(ctx) {
function create_if_block_12(ctx) {
let tab;
let current;
tab = new Tab_default({
@ -21530,21 +21530,21 @@
$$scope: { ctx }
}
});
tab3.$on("select", ctx[18]);
tab3.$on("select", ctx[19]);
tab4 = new Tab_default({
props: {
$$slots: { default: [create_default_slot_12] },
$$scope: { ctx }
}
});
tab4.$on("select", ctx[19]);
tab4.$on("select", ctx[20]);
tab5 = new Tab_default({
props: {
$$slots: { default: [create_default_slot_11] },
$$scope: { ctx }
}
});
let if_block = ctx[8].akValid && create_if_block_11(ctx);
let if_block = ctx[8].akValid && create_if_block_12(ctx);
return {
c() {
create_component(tab0.$$.fragment);
@ -21583,32 +21583,32 @@
},
p(ctx2, dirty) {
const tab0_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab0_changes.$$scope = { dirty, ctx: ctx2 };
}
tab0.$set(tab0_changes);
const tab1_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab1_changes.$$scope = { dirty, ctx: ctx2 };
}
tab1.$set(tab1_changes);
const tab2_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab2_changes.$$scope = { dirty, ctx: ctx2 };
}
tab2.$set(tab2_changes);
const tab3_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab3_changes.$$scope = { dirty, ctx: ctx2 };
}
tab3.$set(tab3_changes);
const tab4_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab4_changes.$$scope = { dirty, ctx: ctx2 };
}
tab4.$set(tab4_changes);
const tab5_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab5_changes.$$scope = { dirty, ctx: ctx2 };
}
tab5.$set(tab5_changes);
@ -21618,7 +21618,7 @@
transition_in(if_block, 1);
}
} else {
if_block = create_if_block_11(ctx2);
if_block = create_if_block_12(ctx2);
if_block.c();
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
@ -21679,7 +21679,7 @@
}
};
}
function create_if_block_10(ctx) {
function create_if_block_11(ctx) {
let label;
let input;
let t;
@ -21698,7 +21698,7 @@
input.checked = ctx[7].ho;
append(label, t);
if (!mounted) {
dispose = listen(input, "change", ctx[29]);
dispose = listen(input, "change", ctx[30]);
mounted = true;
}
},
@ -21715,7 +21715,7 @@
}
};
}
function create_if_block_72(ctx) {
function create_if_block_8(ctx) {
let t0;
let label;
let t1;
@ -21726,8 +21726,8 @@
let if_block1_anchor;
let mounted;
let dispose;
let if_block0 = ctx[8].herror && create_if_block_9(ctx);
let if_block1 = ctx[8].akValid && create_if_block_8(ctx);
let if_block0 = ctx[8].herror && create_if_block_10(ctx);
let if_block1 = ctx[8].akValid && create_if_block_9(ctx);
return {
c() {
if (if_block0)
@ -21763,7 +21763,7 @@
if_block1.m(target, anchor);
insert(target, if_block1_anchor, anchor);
if (!mounted) {
dispose = listen(input, "input", ctx[37]);
dispose = listen(input, "input", ctx[38]);
mounted = true;
}
},
@ -21772,7 +21772,7 @@
if (if_block0) {
if_block0.p(ctx2, dirty);
} else {
if_block0 = create_if_block_9(ctx2);
if_block0 = create_if_block_10(ctx2);
if_block0.c();
if_block0.m(t0.parentNode, t0);
}
@ -21787,7 +21787,7 @@
if (if_block1) {
if_block1.p(ctx2, dirty);
} else {
if_block1 = create_if_block_8(ctx2);
if_block1 = create_if_block_9(ctx2);
if_block1.c();
if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
}
@ -21814,7 +21814,7 @@
}
};
}
function create_if_block_9(ctx) {
function create_if_block_10(ctx) {
let span;
let t_value = ctx[8].herror + "";
let t;
@ -21838,7 +21838,7 @@
}
};
}
function create_if_block_8(ctx) {
function create_if_block_9(ctx) {
let label0;
let t0;
let input0;
@ -21878,8 +21878,8 @@
set_input_value(input1, ctx[7].auto_tags);
if (!mounted) {
dispose = [
listen(input0, "input", ctx[38]),
listen(input1, "input", ctx[39])
listen(input0, "input", ctx[39]),
listen(input1, "input", ctx[40])
];
mounted = true;
}
@ -21974,8 +21974,8 @@
let if_block1_anchor;
let mounted;
let dispose;
let if_block0 = ctx[7].eye && create_if_block_10(ctx);
let if_block1 = ctx[7].hyd && create_if_block_72(ctx);
let if_block0 = ctx[7].eye && create_if_block_11(ctx);
let if_block1 = ctx[7].hyd && create_if_block_8(ctx);
return {
c() {
label0 = element("label");
@ -22158,22 +22158,22 @@
insert(target, if_block1_anchor, anchor);
if (!mounted) {
dispose = [
listen(input0, "change", ctx[20]),
listen(input1, "change", ctx[21]),
listen(input2, "change", ctx[22]),
listen(input3, "change", ctx[23]),
listen(input4, "change", ctx[24]),
listen(input5, "change", ctx[25]),
listen(input6, "change", ctx[26]),
listen(input7, "change", ctx[27]),
listen(input8, "change", ctx[28]),
listen(input9, "change", ctx[30]),
listen(input10, "change", ctx[31]),
listen(input11, "change", ctx[32]),
listen(input12, "change", ctx[33]),
listen(input13, "change", ctx[34]),
listen(input14, "change", ctx[35]),
listen(input15, "change", ctx[36])
listen(input0, "change", ctx[21]),
listen(input1, "change", ctx[22]),
listen(input2, "change", ctx[23]),
listen(input3, "change", ctx[24]),
listen(input4, "change", ctx[25]),
listen(input5, "change", ctx[26]),
listen(input6, "change", ctx[27]),
listen(input7, "change", ctx[28]),
listen(input8, "change", ctx[29]),
listen(input9, "change", ctx[31]),
listen(input10, "change", ctx[32]),
listen(input11, "change", ctx[33]),
listen(input12, "change", ctx[34]),
listen(input13, "change", ctx[35]),
listen(input14, "change", ctx[36]),
listen(input15, "change", ctx[37])
];
mounted = true;
}
@ -22210,7 +22210,7 @@
if (if_block0) {
if_block0.p(ctx2, dirty);
} else {
if_block0 = create_if_block_10(ctx2);
if_block0 = create_if_block_11(ctx2);
if_block0.c();
if_block0.m(t18.parentNode, t18);
}
@ -22243,7 +22243,7 @@
if (if_block1) {
if_block1.p(ctx2, dirty);
} else {
if_block1 = create_if_block_72(ctx2);
if_block1 = create_if_block_8(ctx2);
if_block1.c();
if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
}
@ -22343,20 +22343,21 @@
let t6;
let button;
let t8;
let dialog;
let t9;
let hr;
let dialog;
let t10;
let hr;
let t11;
let h31;
let t12;
let div1;
let t13;
let div1;
let t14;
let input1;
let current;
let mounted;
let dispose;
let if_block0 = ctx[7].phash && create_if_block_62(ctx);
let if_block1 = ctx[7].rsources.length == 0 && create_if_block_52(ctx);
let if_block0 = ctx[7].phash && create_if_block_72(ctx);
let if_block1 = ctx[7].rsources.length == 0 && create_if_block_62(ctx);
let each_value_5 = ctx[7].rsources;
let each_blocks_1 = [];
for (let i = 0; i < each_value_5.length; i += 1) {
@ -22365,12 +22366,13 @@
const out = (i) => transition_out(each_blocks_1[i], 1, 1, () => {
each_blocks_1[i] = null;
});
let if_block2 = ctx[7].rsources.length == 0 && create_if_block_52(ctx);
let dialog_props = {
$$slots: { default: [create_default_slot_7] },
$$scope: { ctx }
};
dialog = new Dialog_default({ props: dialog_props });
ctx[51](dialog);
ctx[52](dialog);
let each_value_4 = ctx[7].blacklist;
let each_blocks = [];
for (let i = 0; i < each_value_4.length; i += 1) {
@ -22402,18 +22404,21 @@
button = element("button");
button.textContent = "Add a source";
t8 = space();
create_component(dialog.$$.fragment);
if (if_block2)
if_block2.c();
t9 = space();
hr = element("hr");
create_component(dialog.$$.fragment);
t10 = space();
hr = element("hr");
t11 = space();
h31 = element("h3");
h31.textContent = "Blacklisted tags";
t12 = space();
t13 = space();
div1 = element("div");
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
t13 = space();
t14 = space();
input1 = element("input");
attr(input0, "type", "checkbox");
attr(div0, "class", "tagcont svelte-1pjjwl2");
@ -22442,24 +22447,27 @@
insert(target, t6, anchor);
insert(target, button, anchor);
insert(target, t8, anchor);
mount_component(dialog, target, anchor);
if (if_block2)
if_block2.m(target, anchor);
insert(target, t9, anchor);
insert(target, hr, anchor);
mount_component(dialog, target, anchor);
insert(target, t10, anchor);
insert(target, hr, anchor);
insert(target, t11, anchor);
insert(target, h31, anchor);
insert(target, t12, anchor);
insert(target, t13, anchor);
insert(target, div1, anchor);
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(div1, null);
}
insert(target, t13, anchor);
insert(target, t14, anchor);
insert(target, input1, anchor);
current = true;
if (!mounted) {
dispose = [
listen(input0, "change", ctx[41]),
listen(button, "click", ctx[46]),
listen(input1, "keydown", ctx[53])
listen(input0, "change", ctx[42]),
listen(button, "click", ctx[47]),
listen(input1, "keydown", ctx[54])
];
mounted = true;
}
@ -22472,7 +22480,7 @@
if (if_block0) {
if_block0.p(ctx2, dirty);
} else {
if_block0 = create_if_block_62(ctx2);
if_block0 = create_if_block_72(ctx2);
if_block0.c();
if_block0.m(t2.parentNode, t2);
}
@ -22483,7 +22491,7 @@
if (ctx2[7].rsources.length == 0) {
if (if_block1) {
} else {
if_block1 = create_if_block_52(ctx2);
if_block1 = create_if_block_62(ctx2);
if_block1.c();
if_block1.m(t5.parentNode, t5);
}
@ -22491,7 +22499,7 @@
if_block1.d(1);
if_block1 = null;
}
if (dirty[0] & 73856) {
if (dirty[0] & 139392) {
each_value_5 = ctx2[7].rsources;
let i;
for (i = 0; i < each_value_5.length; i += 1) {
@ -22512,8 +22520,20 @@
}
check_outros();
}
if (ctx2[7].rsources.length == 0) {
if (if_block2) {
if_block2.p(ctx2, dirty);
} else {
if_block2 = create_if_block_52(ctx2);
if_block2.c();
if_block2.m(t9.parentNode, t9);
}
} else if (if_block2) {
if_block2.d(1);
if_block2 = null;
}
const dialog_changes = {};
if (dirty[0] & 2 | dirty[2] & 8192) {
if (dirty[0] & 2 | dirty[2] & 16384) {
dialog_changes.$$scope = { dirty, ctx: ctx2 };
}
dialog.$set(dialog_changes);
@ -22589,23 +22609,27 @@
detach(button);
if (detaching)
detach(t8);
ctx[51](null);
destroy_component(dialog, detaching);
if (if_block2)
if_block2.d(detaching);
if (detaching)
detach(t9);
ctx[52](null);
destroy_component(dialog, detaching);
if (detaching)
detach(t10);
if (detaching)
detach(hr);
if (detaching)
detach(t10);
detach(t11);
if (detaching)
detach(h31);
if (detaching)
detach(t12);
detach(t13);
if (detaching)
detach(div1);
destroy_each(each_blocks, detaching);
if (detaching)
detach(t13);
detach(t14);
if (detaching)
detach(input1);
mounted = false;
@ -22613,7 +22637,7 @@
}
};
}
function create_if_block_62(ctx) {
function create_if_block_72(ctx) {
let label;
let input;
let t0;
@ -22639,7 +22663,7 @@
append(label, t0);
append(label, a);
if (!mounted) {
dispose = listen(input, "input", ctx[42]);
dispose = listen(input, "input", ctx[43]);
mounted = true;
}
},
@ -22656,7 +22680,7 @@
}
};
}
function create_if_block_52(ctx) {
function create_if_block_62(ctx) {
let p;
return {
c() {
@ -22676,17 +22700,17 @@
let tag;
let current;
function func(...args) {
return ctx[43](ctx[73], ...args);
return ctx[44](ctx[74], ...args);
}
function remove_handler() {
return ctx[44](ctx[73]);
return ctx[45](ctx[74]);
}
function toggle_handler() {
return ctx[45](ctx[73]);
return ctx[46](ctx[74]);
}
tag = new Tag_default({
props: {
tag: ctx[73].name,
tag: ctx[74].name,
toggleable: true,
toggled: !ctx[7].rsources.find(func)?.disabled
}
@ -22705,7 +22729,7 @@
ctx = new_ctx;
const tag_changes = {};
if (dirty[0] & 128)
tag_changes.tag = ctx[73].name;
tag_changes.tag = ctx[74].name;
if (dirty[0] & 128)
tag_changes.toggled = !ctx[7].rsources.find(func)?.disabled;
tag.$set(tag_changes);
@ -22725,6 +22749,31 @@
}
};
}
function create_if_block_52(ctx) {
let button;
let mounted;
let dispose;
return {
c() {
button = element("button");
button.textContent = "Import Bulk from clipboard";
},
m(target, anchor) {
insert(target, button, anchor);
if (!mounted) {
dispose = listen(button, "click", ctx[14]);
mounted = true;
}
},
p: noop,
d(detaching) {
if (detaching)
detach(button);
mounted = false;
dispose();
}
};
}
function create_default_slot_7(ctx) {
let div;
let label0;
@ -22810,10 +22859,10 @@
append(div, button);
if (!mounted) {
dispose = [
listen(input0, "input", ctx[47]),
listen(input1, "input", ctx[48]),
listen(input2, "input", ctx[49]),
listen(input3, "input", ctx[50]),
listen(input0, "input", ctx[48]),
listen(input1, "input", ctx[49]),
listen(input2, "input", ctx[50]),
listen(input3, "input", ctx[51]),
listen(button, "click", ctx[11])
];
mounted = true;
@ -22845,9 +22894,9 @@
let tag;
let current;
function toggle_handler_1() {
return ctx[52](ctx[71]);
return ctx[53](ctx[72]);
}
tag = new Tag_default({ props: { tag: ctx[71] } });
tag = new Tag_default({ props: { tag: ctx[72] } });
tag.$on("toggle", toggle_handler_1);
return {
c() {
@ -22861,7 +22910,7 @@
ctx = new_ctx;
const tag_changes = {};
if (dirty[0] & 128)
tag_changes.tag = ctx[71];
tag_changes.tag = ctx[72];
tag.$set(tag_changes);
},
i(local) {
@ -22911,7 +22960,7 @@
insert(target, if_block_anchor, anchor);
current = true;
if (!mounted) {
dispose = listen(input, "change", ctx[40]);
dispose = listen(input, "change", ctx[41]);
mounted = true;
}
},
@ -22965,14 +23014,14 @@
}
function create_each_block_3(ctx) {
let option;
let t_value = ctx[68].domain + "";
let t_value = ctx[69].domain + "";
let t;
let option_value_value;
return {
c() {
option = element("option");
t = text(t_value);
option.__value = option_value_value = ctx[70];
option.__value = option_value_value = ctx[71];
option.value = option.__value;
},
m(target, anchor) {
@ -23015,7 +23064,7 @@
t3 = text("Maximum number of embedded links to display\n ");
input = element("input");
if (ctx[7].fhost === void 0)
add_render_callback(() => ctx[54].call(select));
add_render_callback(() => ctx[55].call(select));
attr(input, "type", "number");
attr(input, "class", "svelte-1pjjwl2");
attr(label, "class", "svelte-1pjjwl2");
@ -23035,8 +23084,8 @@
set_input_value(input, ctx[7].maxe);
if (!mounted) {
dispose = [
listen(select, "change", ctx[54]),
listen(input, "input", ctx[55])
listen(select, "change", ctx[55]),
listen(input, "input", ctx[56])
];
mounted = true;
}
@ -23130,7 +23179,7 @@
}
},
p(ctx2, dirty) {
if (dirty[0] & 16448) {
if (dirty[0] & 32832) {
each_value_2 = ctx2[6];
let i;
for (i = 0; i < each_value_2.length; i += 1) {
@ -23160,14 +23209,14 @@
let div;
let a;
let t0;
let t1_value = ctx[65].id + "";
let t1_value = ctx[66].id + "";
let t1;
let a_href_value;
let t2;
let t3_value = ctx[65].pees + "";
let t3_value = ctx[66].pees + "";
let t3;
let t4;
let t5_value = ctx[65].eyes + ctx[65].other + "";
let t5_value = ctx[66].eyes + ctx[66].other + "";
let t5;
let t6;
return {
@ -23181,7 +23230,7 @@
t4 = text(" / ");
t5 = text(t5_value);
t6 = text(")\n ");
attr(a, "href", a_href_value = "https://boards.4chan.org/" + ctx[14] + "/thread/" + ctx[65].id);
attr(a, "href", a_href_value = "https://boards.4chan.org/" + ctx[15] + "/thread/" + ctx[66].id);
attr(div, "class", "mbepis");
},
m(target, anchor) {
@ -23196,14 +23245,14 @@
append(div, t6);
},
p(ctx2, dirty) {
if (dirty[0] & 64 && t1_value !== (t1_value = ctx2[65].id + ""))
if (dirty[0] & 64 && t1_value !== (t1_value = ctx2[66].id + ""))
set_data(t1, t1_value);
if (dirty[0] & 64 && a_href_value !== (a_href_value = "https://boards.4chan.org/" + ctx2[14] + "/thread/" + ctx2[65].id)) {
if (dirty[0] & 64 && a_href_value !== (a_href_value = "https://boards.4chan.org/" + ctx2[15] + "/thread/" + ctx2[66].id)) {
attr(a, "href", a_href_value);
}
if (dirty[0] & 64 && t3_value !== (t3_value = ctx2[65].pees + ""))
if (dirty[0] & 64 && t3_value !== (t3_value = ctx2[66].pees + ""))
set_data(t3, t3_value);
if (dirty[0] & 64 && t5_value !== (t5_value = ctx2[65].eyes + ctx2[65].other + ""))
if (dirty[0] & 64 && t5_value !== (t5_value = ctx2[66].eyes + ctx2[66].other + ""))
set_data(t5, t5_value);
},
d(detaching) {
@ -23254,7 +23303,7 @@
if_block.m(target, anchor);
insert(target, if_block_anchor, anchor);
if (!mounted) {
dispose = listen(input, "change", ctx[56]);
dispose = listen(input, "change", ctx[57]);
mounted = true;
}
},
@ -23352,11 +23401,11 @@
}
function create_each_block_12(ctx) {
let h3;
let t0_value = ctx[62].title + "";
let t0_value = ctx[63].title + "";
let t0;
let t1;
let p;
let t2_value = ctx[62].content + "";
let t2_value = ctx[63].content + "";
let t2;
return {
c() {
@ -23374,9 +23423,9 @@
append(p, t2);
},
p(ctx2, dirty) {
if (dirty[0] & 8 && t0_value !== (t0_value = ctx2[62].title + ""))
if (dirty[0] & 8 && t0_value !== (t0_value = ctx2[63].title + ""))
set_data(t0, t0_value);
if (dirty[0] & 8 && t2_value !== (t2_value = ctx2[62].content + ""))
if (dirty[0] & 8 && t2_value !== (t2_value = ctx2[63].content + ""))
set_data(t2, t2_value);
},
d(detaching) {
@ -23447,8 +23496,8 @@
c() {
option = element("option");
t0 = text("Method ");
t1 = text(ctx[59]);
option.__value = option_value_value = ctx[59];
t1 = text(ctx[60]);
option.__value = option_value_value = ctx[60];
option.value = option.__value;
},
m(target, anchor) {
@ -23483,7 +23532,7 @@
each_blocks[i].c();
}
if (ctx[7].pmeth === void 0)
add_render_callback(() => ctx[57].call(select));
add_render_callback(() => ctx[58].call(select));
},
m(target, anchor) {
insert(target, label, anchor);
@ -23494,7 +23543,7 @@
}
select_option(select, ctx[7].pmeth);
if (!mounted) {
dispose = listen(select, "change", ctx[57]);
dispose = listen(select, "change", ctx[58]);
mounted = true;
}
},
@ -23512,7 +23561,7 @@
}
};
}
function create_if_block_12(ctx) {
function create_if_block_13(ctx) {
let tabpanel;
let current;
tabpanel = new TabPanel_default({
@ -23630,7 +23679,7 @@
$$scope: { ctx }
}
});
let if_block = ctx[8].akValid && create_if_block_12(ctx);
let if_block = ctx[8].akValid && create_if_block_13(ctx);
return {
c() {
create_component(tablist.$$.fragment);
@ -23673,37 +23722,37 @@
},
p(ctx2, dirty) {
const tablist_changes = {};
if (dirty[0] & 256 | dirty[2] & 8192) {
if (dirty[0] & 256 | dirty[2] & 16384) {
tablist_changes.$$scope = { dirty, ctx: ctx2 };
}
tablist.$set(tablist_changes);
const tabpanel0_changes = {};
if (dirty[0] & 896 | dirty[2] & 8192) {
if (dirty[0] & 896 | dirty[2] & 16384) {
tabpanel0_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel0.$set(tabpanel0_changes);
const tabpanel1_changes = {};
if (dirty[0] & 134 | dirty[2] & 8192) {
if (dirty[0] & 134 | dirty[2] & 16384) {
tabpanel1_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel1.$set(tabpanel1_changes);
const tabpanel2_changes = {};
if (dirty[0] & 128 | dirty[2] & 8192) {
if (dirty[0] & 128 | dirty[2] & 16384) {
tabpanel2_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel2.$set(tabpanel2_changes);
const tabpanel3_changes = {};
if (dirty[0] & 224 | dirty[2] & 8192) {
if (dirty[0] & 224 | dirty[2] & 16384) {
tabpanel3_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel3.$set(tabpanel3_changes);
const tabpanel4_changes = {};
if (dirty[0] & 8 | dirty[2] & 8192) {
if (dirty[0] & 8 | dirty[2] & 16384) {
tabpanel4_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel4.$set(tabpanel4_changes);
const tabpanel5_changes = {};
if (dirty[0] & 128 | dirty[2] & 8192) {
if (dirty[0] & 128 | dirty[2] & 16384) {
tabpanel5_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel5.$set(tabpanel5_changes);
@ -23713,7 +23762,7 @@
transition_in(if_block, 1);
}
} else {
if_block = create_if_block_12(ctx2);
if_block = create_if_block_13(ctx2);
if_block.c();
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
@ -23874,6 +23923,14 @@
$settings.rsources.splice(idx, 1);
settings.set($settings);
}
const setFromClip = async () => {
try {
const content = await navigator.clipboard.readText();
set_store_value(settings, $settings.rsources = JSON.parse(content), $settings);
} catch {
alert("How can you fail so badly? pathetic...");
}
};
const boardname = location.pathname.match(/\/([^/]*)\//)[1];
let updating = false;
let threads = [];
@ -24069,6 +24126,7 @@
appendBooru,
removeTag,
removeBooru,
setFromClip,
boardname,
updateThreads,
toggleBooru,
@ -25030,7 +25088,7 @@
}
};
}
function create_if_block_13(ctx) {
function create_if_block_14(ctx) {
let a;
let t_value = ctx[12].page.title + "";
let t;
@ -25102,7 +25160,7 @@
return ctx[10](ctx[12]);
}
let if_block0 = ctx[12].source && create_if_block_23(ctx);
let if_block1 = ctx[12].page && create_if_block_13(ctx);
let if_block1 = ctx[12].page && create_if_block_14(ctx);
let if_block2 = ctx[7] && ctx[2] && create_if_block9(ctx);
return {
c() {
@ -25162,7 +25220,7 @@
if (if_block1) {
if_block1.p(ctx, dirty);
} else {
if_block1 = create_if_block_13(ctx);
if_block1 = create_if_block_14(ctx);
if_block1.c();
if_block1.m(t3.parentNode, t3);
}
@ -26575,7 +26633,7 @@
let dispose;
function select_block_type(ctx2, dirty) {
if (ctx2[1])
return create_if_block_14;
return create_if_block_15;
if ((ctx2[3] || {})[ctx2[0]])
return create_if_block_24;
return create_else_block3;
@ -26659,7 +26717,7 @@
}
};
}
function create_if_block_14(ctx) {
function create_if_block_15(ctx) {
let t;
return {
c() {

2
firefox/manifest.json

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

2
firefox_update.json

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

2
main.meta.js

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

330
main.user.js

@ -1,7 +1,7 @@
// ==UserScript==
// @name PNGExtraEmbed
// @namespace https://coom.tech/
// @version 0.275
// @version 0.277
// @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, 275];
define_BUILD_VERSION_default = [0, 277];
}
});
@ -21127,35 +21127,35 @@ const _DOMParser = DOMParser;
}
function get_each_context2(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[59] = list[i];
child_ctx[60] = list[i];
return child_ctx;
}
function get_each_context_12(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[62] = list[i];
child_ctx[63] = list[i];
return child_ctx;
}
function get_each_context_2(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[65] = list[i];
child_ctx[66] = list[i];
return child_ctx;
}
function get_each_context_3(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[68] = list[i];
child_ctx[70] = i;
child_ctx[69] = list[i];
child_ctx[71] = i;
return child_ctx;
}
function get_each_context_4(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[71] = list[i];
child_ctx[70] = i;
child_ctx[72] = list[i];
child_ctx[71] = i;
return child_ctx;
}
function get_each_context_5(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[73] = list[i];
child_ctx[70] = i;
child_ctx[74] = list[i];
child_ctx[71] = i;
return child_ctx;
}
function create_if_block6(ctx) {
@ -21216,7 +21216,7 @@ const _DOMParser = DOMParser;
if (!current || dirty[0] & 1)
set_data(t1, ctx2[0]);
const tabs_changes = {};
if (dirty[0] & 1006 | dirty[2] & 8192) {
if (dirty[0] & 1006 | dirty[2] & 16384) {
tabs_changes.$$scope = { dirty, ctx: ctx2 };
}
tabs.$set(tabs_changes);
@ -21338,7 +21338,7 @@ const _DOMParser = DOMParser;
}
};
}
function create_if_block_11(ctx) {
function create_if_block_12(ctx) {
let tab;
let current;
tab = new Tab_default({
@ -21424,21 +21424,21 @@ const _DOMParser = DOMParser;
$$scope: { ctx }
}
});
tab3.$on("select", ctx[18]);
tab3.$on("select", ctx[19]);
tab4 = new Tab_default({
props: {
$$slots: { default: [create_default_slot_12] },
$$scope: { ctx }
}
});
tab4.$on("select", ctx[19]);
tab4.$on("select", ctx[20]);
tab5 = new Tab_default({
props: {
$$slots: { default: [create_default_slot_11] },
$$scope: { ctx }
}
});
let if_block = ctx[8].akValid && create_if_block_11(ctx);
let if_block = ctx[8].akValid && create_if_block_12(ctx);
return {
c() {
create_component(tab0.$$.fragment);
@ -21477,32 +21477,32 @@ const _DOMParser = DOMParser;
},
p(ctx2, dirty) {
const tab0_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab0_changes.$$scope = { dirty, ctx: ctx2 };
}
tab0.$set(tab0_changes);
const tab1_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab1_changes.$$scope = { dirty, ctx: ctx2 };
}
tab1.$set(tab1_changes);
const tab2_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab2_changes.$$scope = { dirty, ctx: ctx2 };
}
tab2.$set(tab2_changes);
const tab3_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab3_changes.$$scope = { dirty, ctx: ctx2 };
}
tab3.$set(tab3_changes);
const tab4_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab4_changes.$$scope = { dirty, ctx: ctx2 };
}
tab4.$set(tab4_changes);
const tab5_changes = {};
if (dirty[2] & 8192) {
if (dirty[2] & 16384) {
tab5_changes.$$scope = { dirty, ctx: ctx2 };
}
tab5.$set(tab5_changes);
@ -21512,7 +21512,7 @@ const _DOMParser = DOMParser;
transition_in(if_block, 1);
}
} else {
if_block = create_if_block_11(ctx2);
if_block = create_if_block_12(ctx2);
if_block.c();
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
@ -21573,7 +21573,7 @@ const _DOMParser = DOMParser;
}
};
}
function create_if_block_10(ctx) {
function create_if_block_11(ctx) {
let label;
let input;
let t;
@ -21592,7 +21592,7 @@ const _DOMParser = DOMParser;
input.checked = ctx[7].ho;
append(label, t);
if (!mounted) {
dispose = listen(input, "change", ctx[29]);
dispose = listen(input, "change", ctx[30]);
mounted = true;
}
},
@ -21609,7 +21609,7 @@ const _DOMParser = DOMParser;
}
};
}
function create_if_block_72(ctx) {
function create_if_block_8(ctx) {
let t0;
let label;
let t1;
@ -21620,8 +21620,8 @@ const _DOMParser = DOMParser;
let if_block1_anchor;
let mounted;
let dispose;
let if_block0 = ctx[8].herror && create_if_block_9(ctx);
let if_block1 = ctx[8].akValid && create_if_block_8(ctx);
let if_block0 = ctx[8].herror && create_if_block_10(ctx);
let if_block1 = ctx[8].akValid && create_if_block_9(ctx);
return {
c() {
if (if_block0)
@ -21657,7 +21657,7 @@ const _DOMParser = DOMParser;
if_block1.m(target, anchor);
insert(target, if_block1_anchor, anchor);
if (!mounted) {
dispose = listen(input, "input", ctx[37]);
dispose = listen(input, "input", ctx[38]);
mounted = true;
}
},
@ -21666,7 +21666,7 @@ const _DOMParser = DOMParser;
if (if_block0) {
if_block0.p(ctx2, dirty);
} else {
if_block0 = create_if_block_9(ctx2);
if_block0 = create_if_block_10(ctx2);
if_block0.c();
if_block0.m(t0.parentNode, t0);
}
@ -21681,7 +21681,7 @@ const _DOMParser = DOMParser;
if (if_block1) {
if_block1.p(ctx2, dirty);
} else {
if_block1 = create_if_block_8(ctx2);
if_block1 = create_if_block_9(ctx2);
if_block1.c();
if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
}
@ -21708,7 +21708,7 @@ const _DOMParser = DOMParser;
}
};
}
function create_if_block_9(ctx) {
function create_if_block_10(ctx) {
let span;
let t_value = ctx[8].herror + "";
let t;
@ -21732,7 +21732,7 @@ const _DOMParser = DOMParser;
}
};
}
function create_if_block_8(ctx) {
function create_if_block_9(ctx) {
let label0;
let t0;
let input0;
@ -21772,8 +21772,8 @@ const _DOMParser = DOMParser;
set_input_value(input1, ctx[7].auto_tags);
if (!mounted) {
dispose = [
listen(input0, "input", ctx[38]),
listen(input1, "input", ctx[39])
listen(input0, "input", ctx[39]),
listen(input1, "input", ctx[40])
];
mounted = true;
}
@ -21868,8 +21868,8 @@ const _DOMParser = DOMParser;
let if_block1_anchor;
let mounted;
let dispose;
let if_block0 = ctx[7].eye && create_if_block_10(ctx);
let if_block1 = ctx[7].hyd && create_if_block_72(ctx);
let if_block0 = ctx[7].eye && create_if_block_11(ctx);
let if_block1 = ctx[7].hyd && create_if_block_8(ctx);
return {
c() {
label0 = element("label");
@ -22052,22 +22052,22 @@ const _DOMParser = DOMParser;
insert(target, if_block1_anchor, anchor);
if (!mounted) {
dispose = [
listen(input0, "change", ctx[20]),
listen(input1, "change", ctx[21]),
listen(input2, "change", ctx[22]),
listen(input3, "change", ctx[23]),
listen(input4, "change", ctx[24]),
listen(input5, "change", ctx[25]),
listen(input6, "change", ctx[26]),
listen(input7, "change", ctx[27]),
listen(input8, "change", ctx[28]),
listen(input9, "change", ctx[30]),
listen(input10, "change", ctx[31]),
listen(input11, "change", ctx[32]),
listen(input12, "change", ctx[33]),
listen(input13, "change", ctx[34]),
listen(input14, "change", ctx[35]),
listen(input15, "change", ctx[36])
listen(input0, "change", ctx[21]),
listen(input1, "change", ctx[22]),
listen(input2, "change", ctx[23]),
listen(input3, "change", ctx[24]),
listen(input4, "change", ctx[25]),
listen(input5, "change", ctx[26]),
listen(input6, "change", ctx[27]),
listen(input7, "change", ctx[28]),
listen(input8, "change", ctx[29]),
listen(input9, "change", ctx[31]),
listen(input10, "change", ctx[32]),
listen(input11, "change", ctx[33]),
listen(input12, "change", ctx[34]),
listen(input13, "change", ctx[35]),
listen(input14, "change", ctx[36]),
listen(input15, "change", ctx[37])
];
mounted = true;
}
@ -22104,7 +22104,7 @@ const _DOMParser = DOMParser;
if (if_block0) {
if_block0.p(ctx2, dirty);
} else {
if_block0 = create_if_block_10(ctx2);
if_block0 = create_if_block_11(ctx2);
if_block0.c();
if_block0.m(t18.parentNode, t18);
}
@ -22137,7 +22137,7 @@ const _DOMParser = DOMParser;
if (if_block1) {
if_block1.p(ctx2, dirty);
} else {
if_block1 = create_if_block_72(ctx2);
if_block1 = create_if_block_8(ctx2);
if_block1.c();
if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
}
@ -22237,20 +22237,21 @@ const _DOMParser = DOMParser;
let t6;
let button;
let t8;
let dialog;
let t9;
let hr;
let dialog;
let t10;
let hr;
let t11;
let h31;
let t12;
let div1;
let t13;
let div1;
let t14;
let input1;
let current;
let mounted;
let dispose;
let if_block0 = ctx[7].phash && create_if_block_62(ctx);
let if_block1 = ctx[7].rsources.length == 0 && create_if_block_52(ctx);
let if_block0 = ctx[7].phash && create_if_block_72(ctx);
let if_block1 = ctx[7].rsources.length == 0 && create_if_block_62(ctx);
let each_value_5 = ctx[7].rsources;
let each_blocks_1 = [];
for (let i = 0; i < each_value_5.length; i += 1) {
@ -22259,12 +22260,13 @@ const _DOMParser = DOMParser;
const out = (i) => transition_out(each_blocks_1[i], 1, 1, () => {
each_blocks_1[i] = null;
});
let if_block2 = ctx[7].rsources.length == 0 && create_if_block_52(ctx);
let dialog_props = {
$$slots: { default: [create_default_slot_7] },
$$scope: { ctx }
};
dialog = new Dialog_default({ props: dialog_props });
ctx[51](dialog);
ctx[52](dialog);
let each_value_4 = ctx[7].blacklist;
let each_blocks = [];
for (let i = 0; i < each_value_4.length; i += 1) {
@ -22296,18 +22298,21 @@ const _DOMParser = DOMParser;
button = element("button");
button.textContent = "Add a source";
t8 = space();
create_component(dialog.$$.fragment);
if (if_block2)
if_block2.c();
t9 = space();
hr = element("hr");
create_component(dialog.$$.fragment);
t10 = space();
hr = element("hr");
t11 = space();
h31 = element("h3");
h31.textContent = "Blacklisted tags";
t12 = space();
t13 = space();
div1 = element("div");
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
t13 = space();
t14 = space();
input1 = element("input");
attr(input0, "type", "checkbox");
attr(div0, "class", "tagcont svelte-1pjjwl2");
@ -22336,24 +22341,27 @@ const _DOMParser = DOMParser;
insert(target, t6, anchor);
insert(target, button, anchor);
insert(target, t8, anchor);
mount_component(dialog, target, anchor);
if (if_block2)
if_block2.m(target, anchor);
insert(target, t9, anchor);
insert(target, hr, anchor);
mount_component(dialog, target, anchor);
insert(target, t10, anchor);
insert(target, hr, anchor);
insert(target, t11, anchor);
insert(target, h31, anchor);
insert(target, t12, anchor);
insert(target, t13, anchor);
insert(target, div1, anchor);
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(div1, null);
}
insert(target, t13, anchor);
insert(target, t14, anchor);
insert(target, input1, anchor);
current = true;
if (!mounted) {
dispose = [
listen(input0, "change", ctx[41]),
listen(button, "click", ctx[46]),
listen(input1, "keydown", ctx[53])
listen(input0, "change", ctx[42]),
listen(button, "click", ctx[47]),
listen(input1, "keydown", ctx[54])
];
mounted = true;
}
@ -22366,7 +22374,7 @@ const _DOMParser = DOMParser;
if (if_block0) {
if_block0.p(ctx2, dirty);
} else {
if_block0 = create_if_block_62(ctx2);
if_block0 = create_if_block_72(ctx2);
if_block0.c();
if_block0.m(t2.parentNode, t2);
}
@ -22377,7 +22385,7 @@ const _DOMParser = DOMParser;
if (ctx2[7].rsources.length == 0) {
if (if_block1) {
} else {
if_block1 = create_if_block_52(ctx2);
if_block1 = create_if_block_62(ctx2);
if_block1.c();
if_block1.m(t5.parentNode, t5);
}
@ -22385,7 +22393,7 @@ const _DOMParser = DOMParser;
if_block1.d(1);
if_block1 = null;
}
if (dirty[0] & 73856) {
if (dirty[0] & 139392) {
each_value_5 = ctx2[7].rsources;
let i;
for (i = 0; i < each_value_5.length; i += 1) {
@ -22406,8 +22414,20 @@ const _DOMParser = DOMParser;
}
check_outros();
}
if (ctx2[7].rsources.length == 0) {
if (if_block2) {
if_block2.p(ctx2, dirty);
} else {
if_block2 = create_if_block_52(ctx2);
if_block2.c();
if_block2.m(t9.parentNode, t9);
}
} else if (if_block2) {
if_block2.d(1);
if_block2 = null;
}
const dialog_changes = {};
if (dirty[0] & 2 | dirty[2] & 8192) {
if (dirty[0] & 2 | dirty[2] & 16384) {
dialog_changes.$$scope = { dirty, ctx: ctx2 };
}
dialog.$set(dialog_changes);
@ -22483,23 +22503,27 @@ const _DOMParser = DOMParser;
detach(button);
if (detaching)
detach(t8);
ctx[51](null);
destroy_component(dialog, detaching);
if (if_block2)
if_block2.d(detaching);
if (detaching)
detach(t9);
ctx[52](null);
destroy_component(dialog, detaching);
if (detaching)
detach(t10);
if (detaching)
detach(hr);
if (detaching)
detach(t10);
detach(t11);
if (detaching)
detach(h31);
if (detaching)
detach(t12);
detach(t13);
if (detaching)
detach(div1);
destroy_each(each_blocks, detaching);
if (detaching)
detach(t13);
detach(t14);
if (detaching)
detach(input1);
mounted = false;
@ -22507,7 +22531,7 @@ const _DOMParser = DOMParser;
}
};
}
function create_if_block_62(ctx) {
function create_if_block_72(ctx) {
let label;
let input;
let t0;
@ -22533,7 +22557,7 @@ const _DOMParser = DOMParser;
append(label, t0);
append(label, a);
if (!mounted) {
dispose = listen(input, "input", ctx[42]);
dispose = listen(input, "input", ctx[43]);
mounted = true;
}
},
@ -22550,7 +22574,7 @@ const _DOMParser = DOMParser;
}
};
}
function create_if_block_52(ctx) {
function create_if_block_62(ctx) {
let p;
return {
c() {
@ -22570,17 +22594,17 @@ const _DOMParser = DOMParser;
let tag;
let current;
function func(...args) {
return ctx[43](ctx[73], ...args);
return ctx[44](ctx[74], ...args);
}
function remove_handler() {
return ctx[44](ctx[73]);
return ctx[45](ctx[74]);
}
function toggle_handler() {
return ctx[45](ctx[73]);
return ctx[46](ctx[74]);
}
tag = new Tag_default({
props: {
tag: ctx[73].name,
tag: ctx[74].name,
toggleable: true,
toggled: !ctx[7].rsources.find(func)?.disabled
}
@ -22599,7 +22623,7 @@ const _DOMParser = DOMParser;
ctx = new_ctx;
const tag_changes = {};
if (dirty[0] & 128)
tag_changes.tag = ctx[73].name;
tag_changes.tag = ctx[74].name;
if (dirty[0] & 128)
tag_changes.toggled = !ctx[7].rsources.find(func)?.disabled;
tag.$set(tag_changes);
@ -22619,6 +22643,31 @@ const _DOMParser = DOMParser;
}
};
}
function create_if_block_52(ctx) {
let button;
let mounted;
let dispose;
return {
c() {
button = element("button");
button.textContent = "Import Bulk from clipboard";
},
m(target, anchor) {
insert(target, button, anchor);
if (!mounted) {
dispose = listen(button, "click", ctx[14]);
mounted = true;
}
},
p: noop,
d(detaching) {
if (detaching)
detach(button);
mounted = false;
dispose();
}
};
}
function create_default_slot_7(ctx) {
let div;
let label0;
@ -22704,10 +22753,10 @@ const _DOMParser = DOMParser;
append(div, button);
if (!mounted) {
dispose = [
listen(input0, "input", ctx[47]),
listen(input1, "input", ctx[48]),
listen(input2, "input", ctx[49]),
listen(input3, "input", ctx[50]),
listen(input0, "input", ctx[48]),
listen(input1, "input", ctx[49]),
listen(input2, "input", ctx[50]),
listen(input3, "input", ctx[51]),
listen(button, "click", ctx[11])
];
mounted = true;
@ -22739,9 +22788,9 @@ const _DOMParser = DOMParser;
let tag;
let current;
function toggle_handler_1() {
return ctx[52](ctx[71]);
return ctx[53](ctx[72]);
}
tag = new Tag_default({ props: { tag: ctx[71] } });
tag = new Tag_default({ props: { tag: ctx[72] } });
tag.$on("toggle", toggle_handler_1);
return {
c() {
@ -22755,7 +22804,7 @@ const _DOMParser = DOMParser;
ctx = new_ctx;
const tag_changes = {};
if (dirty[0] & 128)
tag_changes.tag = ctx[71];
tag_changes.tag = ctx[72];
tag.$set(tag_changes);
},
i(local) {
@ -22805,7 +22854,7 @@ const _DOMParser = DOMParser;
insert(target, if_block_anchor, anchor);
current = true;
if (!mounted) {
dispose = listen(input, "change", ctx[40]);
dispose = listen(input, "change", ctx[41]);
mounted = true;
}
},
@ -22859,14 +22908,14 @@ const _DOMParser = DOMParser;
}
function create_each_block_3(ctx) {
let option;
let t_value = ctx[68].domain + "";
let t_value = ctx[69].domain + "";
let t;
let option_value_value;
return {
c() {
option = element("option");
t = text(t_value);
option.__value = option_value_value = ctx[70];
option.__value = option_value_value = ctx[71];
option.value = option.__value;
},
m(target, anchor) {
@ -22909,7 +22958,7 @@ const _DOMParser = DOMParser;
t3 = text("Maximum number of embedded links to display\n ");
input = element("input");
if (ctx[7].fhost === void 0)
add_render_callback(() => ctx[54].call(select));
add_render_callback(() => ctx[55].call(select));
attr(input, "type", "number");
attr(input, "class", "svelte-1pjjwl2");
attr(label, "class", "svelte-1pjjwl2");
@ -22929,8 +22978,8 @@ const _DOMParser = DOMParser;
set_input_value(input, ctx[7].maxe);
if (!mounted) {
dispose = [
listen(select, "change", ctx[54]),
listen(input, "input", ctx[55])
listen(select, "change", ctx[55]),
listen(input, "input", ctx[56])
];
mounted = true;
}
@ -23024,7 +23073,7 @@ const _DOMParser = DOMParser;
}
},
p(ctx2, dirty) {
if (dirty[0] & 16448) {
if (dirty[0] & 32832) {
each_value_2 = ctx2[6];
let i;
for (i = 0; i < each_value_2.length; i += 1) {
@ -23054,14 +23103,14 @@ const _DOMParser = DOMParser;
let div;
let a;
let t0;
let t1_value = ctx[65].id + "";
let t1_value = ctx[66].id + "";
let t1;
let a_href_value;
let t2;
let t3_value = ctx[65].pees + "";
let t3_value = ctx[66].pees + "";
let t3;
let t4;
let t5_value = ctx[65].eyes + ctx[65].other + "";
let t5_value = ctx[66].eyes + ctx[66].other + "";
let t5;
let t6;
return {
@ -23075,7 +23124,7 @@ const _DOMParser = DOMParser;
t4 = text(" / ");
t5 = text(t5_value);
t6 = text(")\n ");
attr(a, "href", a_href_value = "https://boards.4chan.org/" + ctx[14] + "/thread/" + ctx[65].id);
attr(a, "href", a_href_value = "https://boards.4chan.org/" + ctx[15] + "/thread/" + ctx[66].id);
attr(div, "class", "mbepis");
},
m(target, anchor) {
@ -23090,14 +23139,14 @@ const _DOMParser = DOMParser;
append(div, t6);
},
p(ctx2, dirty) {
if (dirty[0] & 64 && t1_value !== (t1_value = ctx2[65].id + ""))
if (dirty[0] & 64 && t1_value !== (t1_value = ctx2[66].id + ""))
set_data(t1, t1_value);
if (dirty[0] & 64 && a_href_value !== (a_href_value = "https://boards.4chan.org/" + ctx2[14] + "/thread/" + ctx2[65].id)) {
if (dirty[0] & 64 && a_href_value !== (a_href_value = "https://boards.4chan.org/" + ctx2[15] + "/thread/" + ctx2[66].id)) {
attr(a, "href", a_href_value);
}
if (dirty[0] & 64 && t3_value !== (t3_value = ctx2[65].pees + ""))
if (dirty[0] & 64 && t3_value !== (t3_value = ctx2[66].pees + ""))
set_data(t3, t3_value);
if (dirty[0] & 64 && t5_value !== (t5_value = ctx2[65].eyes + ctx2[65].other + ""))
if (dirty[0] & 64 && t5_value !== (t5_value = ctx2[66].eyes + ctx2[66].other + ""))
set_data(t5, t5_value);
},
d(detaching) {
@ -23148,7 +23197,7 @@ const _DOMParser = DOMParser;
if_block.m(target, anchor);
insert(target, if_block_anchor, anchor);
if (!mounted) {
dispose = listen(input, "change", ctx[56]);
dispose = listen(input, "change", ctx[57]);
mounted = true;
}
},
@ -23246,11 +23295,11 @@ const _DOMParser = DOMParser;
}
function create_each_block_12(ctx) {
let h3;
let t0_value = ctx[62].title + "";
let t0_value = ctx[63].title + "";
let t0;
let t1;
let p;
let t2_value = ctx[62].content + "";
let t2_value = ctx[63].content + "";
let t2;
return {
c() {
@ -23268,9 +23317,9 @@ const _DOMParser = DOMParser;
append(p, t2);
},
p(ctx2, dirty) {
if (dirty[0] & 8 && t0_value !== (t0_value = ctx2[62].title + ""))
if (dirty[0] & 8 && t0_value !== (t0_value = ctx2[63].title + ""))
set_data(t0, t0_value);
if (dirty[0] & 8 && t2_value !== (t2_value = ctx2[62].content + ""))
if (dirty[0] & 8 && t2_value !== (t2_value = ctx2[63].content + ""))
set_data(t2, t2_value);
},
d(detaching) {
@ -23341,8 +23390,8 @@ const _DOMParser = DOMParser;
c() {
option = element("option");
t0 = text("Method ");
t1 = text(ctx[59]);
option.__value = option_value_value = ctx[59];
t1 = text(ctx[60]);
option.__value = option_value_value = ctx[60];
option.value = option.__value;
},
m(target, anchor) {
@ -23377,7 +23426,7 @@ const _DOMParser = DOMParser;
each_blocks[i].c();
}
if (ctx[7].pmeth === void 0)
add_render_callback(() => ctx[57].call(select));
add_render_callback(() => ctx[58].call(select));
},
m(target, anchor) {
insert(target, label, anchor);
@ -23388,7 +23437,7 @@ const _DOMParser = DOMParser;
}
select_option(select, ctx[7].pmeth);
if (!mounted) {
dispose = listen(select, "change", ctx[57]);
dispose = listen(select, "change", ctx[58]);
mounted = true;
}
},
@ -23406,7 +23455,7 @@ const _DOMParser = DOMParser;
}
};
}
function create_if_block_12(ctx) {
function create_if_block_13(ctx) {
let tabpanel;
let current;
tabpanel = new TabPanel_default({
@ -23524,7 +23573,7 @@ const _DOMParser = DOMParser;
$$scope: { ctx }
}
});
let if_block = ctx[8].akValid && create_if_block_12(ctx);
let if_block = ctx[8].akValid && create_if_block_13(ctx);
return {
c() {
create_component(tablist.$$.fragment);
@ -23567,37 +23616,37 @@ const _DOMParser = DOMParser;
},
p(ctx2, dirty) {
const tablist_changes = {};
if (dirty[0] & 256 | dirty[2] & 8192) {
if (dirty[0] & 256 | dirty[2] & 16384) {
tablist_changes.$$scope = { dirty, ctx: ctx2 };
}
tablist.$set(tablist_changes);
const tabpanel0_changes = {};
if (dirty[0] & 896 | dirty[2] & 8192) {
if (dirty[0] & 896 | dirty[2] & 16384) {
tabpanel0_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel0.$set(tabpanel0_changes);
const tabpanel1_changes = {};
if (dirty[0] & 134 | dirty[2] & 8192) {
if (dirty[0] & 134 | dirty[2] & 16384) {
tabpanel1_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel1.$set(tabpanel1_changes);
const tabpanel2_changes = {};
if (dirty[0] & 128 | dirty[2] & 8192) {
if (dirty[0] & 128 | dirty[2] & 16384) {
tabpanel2_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel2.$set(tabpanel2_changes);
const tabpanel3_changes = {};
if (dirty[0] & 224 | dirty[2] & 8192) {
if (dirty[0] & 224 | dirty[2] & 16384) {
tabpanel3_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel3.$set(tabpanel3_changes);
const tabpanel4_changes = {};
if (dirty[0] & 8 | dirty[2] & 8192) {
if (dirty[0] & 8 | dirty[2] & 16384) {
tabpanel4_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel4.$set(tabpanel4_changes);
const tabpanel5_changes = {};
if (dirty[0] & 128 | dirty[2] & 8192) {
if (dirty[0] & 128 | dirty[2] & 16384) {
tabpanel5_changes.$$scope = { dirty, ctx: ctx2 };
}
tabpanel5.$set(tabpanel5_changes);
@ -23607,7 +23656,7 @@ const _DOMParser = DOMParser;
transition_in(if_block, 1);
}
} else {
if_block = create_if_block_12(ctx2);
if_block = create_if_block_13(ctx2);
if_block.c();
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
@ -23768,6 +23817,14 @@ const _DOMParser = DOMParser;
$settings.rsources.splice(idx, 1);
settings.set($settings);
}
const setFromClip = async () => {
try {
const content = await navigator.clipboard.readText();
set_store_value(settings, $settings.rsources = JSON.parse(content), $settings);
} catch {
alert("How can you fail so badly? pathetic...");
}
};
const boardname = location.pathname.match(/\/([^/]*)\//)[1];
let updating = false;
let threads = [];
@ -23963,6 +24020,7 @@ const _DOMParser = DOMParser;
appendBooru,
removeTag,
removeBooru,
setFromClip,
boardname,
updateThreads,
toggleBooru,
@ -24924,7 +24982,7 @@ const _DOMParser = DOMParser;
}
};
}
function create_if_block_13(ctx) {
function create_if_block_14(ctx) {
let a;
let t_value = ctx[12].page.title + "";
let t;
@ -24996,7 +25054,7 @@ const _DOMParser = DOMParser;
return ctx[10](ctx[12]);
}
let if_block0 = ctx[12].source && create_if_block_23(ctx);
let if_block1 = ctx[12].page && create_if_block_13(ctx);
let if_block1 = ctx[12].page && create_if_block_14(ctx);
let if_block2 = ctx[7] && ctx[2] && create_if_block9(ctx);
return {
c() {
@ -25056,7 +25114,7 @@ const _DOMParser = DOMParser;
if (if_block1) {
if_block1.p(ctx, dirty);
} else {
if_block1 = create_if_block_13(ctx);
if_block1 = create_if_block_14(ctx);
if_block1.c();
if_block1.m(t3.parentNode, t3);
}
@ -26469,7 +26527,7 @@ const _DOMParser = DOMParser;
let dispose;
function select_block_type(ctx2, dirty) {
if (ctx2[1])
return create_if_block_14;
return create_if_block_15;
if ((ctx2[3] || {})[ctx2[0]])
return create_if_block_24;
return create_else_block3;
@ -26553,7 +26611,7 @@ const _DOMParser = DOMParser;
}
};
}
function create_if_block_14(ctx) {
function create_if_block_15(ctx) {
let t;
return {
c() {

14
src/Components/App.svelte

@ -60,6 +60,15 @@
$settings.rsources = $settings.rsources;
}
const setFromClip = async () => {
try {
const content = await navigator.clipboard.readText();
$settings.rsources = JSON.parse(content);
} catch {
alert("How can you fail so badly? pathetic...");
}
}
const boardname = location.pathname.match(/\/([^/]*)\//)![1];
let updating = false;
let threads: {
@ -278,6 +287,11 @@
dial.toggle();
}}>Add a source</button
>
{#if $settings.rsources.length == 0}
<button
on:click={setFromClip}>Import Bulk from clipboard</button
>
{/if}
<Dialog bind:this={dial}>
<div class="form">
<label>

Loading…
Cancel
Save