Browse Source

Merge branch 'feat-black-posts' into 中出し

Anonymous 2 years ago
parent
commit
fdc09cff90
  1. 2
      main.meta.js
  2. 69
      main.user.js
  3. 6
      src/Embedding.svelte
  4. 18
      src/EyeButton.svelte

2
main.meta.js

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

69
main.user.js

@ -1,7 +1,7 @@
// ==UserScript==
// @name PNGExtraEmbed2
// @namespace https://coom.tech/
// @version 0.119
// @version 0.121
// @description uhh
// @author You
// @match https://boards.4channel.org/*
@ -14955,7 +14955,7 @@
// src/Embedding.svelte
init_esbuild_inject();
function add_css6(target) {
append_styles(target, "svelte-16retph", ".place.svelte-16retph.svelte-16retph{cursor:pointer;max-width:100vw;max-height:100vh}.unzipping.svelte-16retph>img.svelte-16retph{filter:brightness(0.5) blur(10px)}.progress.svelte-16retph.svelte-16retph{color:black;-webkit-text-stroke:0.7px white;font-weight:bold;left:50%;top:50%;font-size:larger;display:inline-block;position:absolute;z-index:10}.hoverer.svelte-16retph.svelte-16retph{display:none;position:fixed;pointer-events:none}.visible.svelte-16retph.svelte-16retph{display:block;z-index:9}.contract.svelte-16retph img.svelte-16retph,.contract.svelte-16retph video.svelte-16retph{max-width:125px !important;max-height:125px !important;width:auto;height:auto}.place.svelte-16retph:not(.contract) video.svelte-16retph,.place.svelte-16retph:not(.contract) img.svelte-16retph,.hoverer.svelte-16retph>video.svelte-16retph,.hoverer.svelte-16retph>img.svelte-16retph{max-width:100vw;max-height:100vh}.place.hasembed.svelte-16retph video.svelte-16retph,.place.hasembed.svelte-16retph img.svelte-16retph{border:solid 1px deeppink\r\n }.place.hasext.svelte-16retph video.svelte-16retph,.place.hasext.svelte-16retph img.svelte-16retph{border:solid 1px goldenrod\r\n }");
append_styles(target, "svelte-145c3cl", ".place.svelte-145c3cl.svelte-145c3cl{cursor:pointer;max-width:100vw;max-height:100vh}.unzipping.svelte-145c3cl>img.svelte-145c3cl{filter:brightness(0.5) blur(10px)}.progress.svelte-145c3cl.svelte-145c3cl{color:black;-webkit-text-stroke:0.7px white;font-weight:bold;left:50%;top:50%;font-size:larger;display:inline-block;position:absolute;z-index:10}.hoverer.svelte-145c3cl.svelte-145c3cl{display:none;position:fixed;pointer-events:none}.visible.svelte-145c3cl.svelte-145c3cl{display:block;z-index:9}.contract.svelte-145c3cl img.svelte-145c3cl,.contract.svelte-145c3cl video.svelte-145c3cl{max-width:125px !important;max-height:125px !important;width:auto;height:auto}.place.svelte-145c3cl:not(.contract) video.svelte-145c3cl,.place.svelte-145c3cl:not(.contract) img.svelte-145c3cl,.hoverer.svelte-145c3cl>video.svelte-145c3cl,.hoverer.svelte-145c3cl>img.svelte-145c3cl{max-width:100vw;max-height:100vh}.place.hasembed.svelte-145c3cl video.svelte-145c3cl,.place.hasembed.svelte-145c3cl img.svelte-145c3cl{box-shadow:0 0 2px 2px deeppink}.place.hasext.svelte-145c3cl video.svelte-145c3cl,.place.hasext.svelte-145c3cl img.svelte-145c3cl{box-shadow:0 0 2px 2px goldenrod}");
}
function create_if_block5(ctx) {
let div0;
@ -14994,11 +14994,11 @@
t4 = space();
if (if_block5)
if_block5.c();
attr(div0, "class", "place svelte-16retph");
attr(div0, "class", "place svelte-145c3cl");
toggle_class(div0, "contract", ctx[6]);
toggle_class(div0, "hasembed", ctx[0]?.embed_type === 0 /* THIRD_EYE */);
toggle_class(div0, "hasext", ctx[0]?.embed_type === 1 /* MEDIA_EMBED */);
attr(div1, "class", "hoverer svelte-16retph");
attr(div1, "class", "hoverer svelte-145c3cl");
attr(div1, "id", "ihover");
toggle_class(div1, "visible", ctx[7] && ctx[6]);
toggle_class(div1, "unzipping", ctx[16]);
@ -15163,7 +15163,7 @@
attr(img, "alt", img_alt_value = ctx[0].filename);
if (!src_url_equal(img.src, img_src_value = ctx[14] || ctx[5]))
attr(img, "src", img_src_value);
attr(img, "class", "svelte-16retph");
attr(img, "class", "svelte-145c3cl");
},
m(target, anchor) {
insert(target, img, anchor);
@ -15241,7 +15241,7 @@
video.loop = video_loop_value = ctx[18].loop;
if (!src_url_equal(video.src, video_src_value = ctx[14] || ctx[5]))
attr(video, "src", video_src_value);
attr(video, "class", "svelte-16retph");
attr(video, "class", "svelte-145c3cl");
},
m(target, anchor) {
insert(target, video, anchor);
@ -15279,7 +15279,7 @@
t2 = text(" / ");
t3 = text(t3_value);
t4 = text("]");
attr(span, "class", "progress svelte-16retph");
attr(span, "class", "progress svelte-145c3cl");
},
m(target, anchor) {
insert(target, span, anchor);
@ -15311,7 +15311,7 @@
attr(img, "alt", img_alt_value = ctx[0].filename);
if (!src_url_equal(img.src, img_src_value = ctx[14] || ctx[5]))
attr(img, "src", img_src_value);
attr(img, "class", "svelte-16retph");
attr(img, "class", "svelte-145c3cl");
},
m(target, anchor) {
insert(target, img, anchor);
@ -15340,7 +15340,7 @@
video.loop = video_loop_value = ctx[18].loop;
if (!src_url_equal(video.src, video_src_value = ctx[14] || ctx[5]))
attr(video, "src", video_src_value);
attr(video, "class", "svelte-16retph");
attr(video, "class", "svelte-145c3cl");
},
m(target, anchor) {
insert(target, video, anchor);
@ -15928,7 +15928,7 @@
// src/EyeButton.svelte
init_esbuild_inject();
function add_css7(target) {
append_styles(target, "svelte-eeaeh8", ".clickable.svelte-eeaeh8{cursor:pointer;margin-left:2px;margin-right:2px}.clickable.svelte-eeaeh8:hover{text-shadow:0 0 4px palevioletred}.clickable.hasembed.svelte-eeaeh8{color:deeppink}.clickable.hasext.svelte-eeaeh8{color:goldenrod}.clickable.hasblack.svelte-eeaeh8{color:black}");
append_styles(target, "svelte-1xjvk14", ".clickable.svelte-1xjvk14{cursor:pointer;margin-left:2px;margin-right:2px}.clickable.svelte-1xjvk14:hover{text-shadow:0 0 4px palevioletred}.clickable.hasembed.svelte-1xjvk14{color:deeppink}.clickable.hasext.svelte-1xjvk14{color:goldenrod}.clickable.hasblack.svelte-1xjvk14{color:black}a.clickable.hasembed.svelte-1xjvk14{color:deeppink !important}a.clickable.hasext.svelte-1xjvk14{color:goldenrod !important}a.clickable.hasblack.svelte-1xjvk14{color:black !important}");
}
function get_each_context4(ctx, list, i) {
const child_ctx = ctx.slice();
@ -15942,7 +15942,7 @@
return {
c() {
span = element("span");
attr(span, "class", "fa clickable svelte-eeaeh8");
attr(span, "class", "fa clickable svelte-1xjvk14");
toggle_class(span, "fa-eye", !ctx[3]);
toggle_class(span, "fa-eye-slash", ctx[3]);
},
@ -15979,7 +15979,10 @@
t = text("Source");
attr(a, "href", a_href_value = ctx[11].source);
attr(a, "target", "_blank");
attr(a, "class", "clickable svelte-eeaeh8");
attr(a, "class", "clickable svelte-1xjvk14");
toggle_class(a, "hasembed", ctx[11]?.embed_type === 0 /* THIRD_EYE */);
toggle_class(a, "hasext", ctx[11]?.embed_type === 1 /* MEDIA_EMBED */);
toggle_class(a, "hasblack", ctx[11]?.isBlacklisted === true);
},
m(target, anchor) {
insert(target, a, anchor);
@ -15989,6 +15992,15 @@
if (dirty & 1 && a_href_value !== (a_href_value = ctx2[11].source)) {
attr(a, "href", a_href_value);
}
if (dirty & 1) {
toggle_class(a, "hasembed", ctx2[11]?.embed_type === 0 /* THIRD_EYE */);
}
if (dirty & 1) {
toggle_class(a, "hasext", ctx2[11]?.embed_type === 1 /* MEDIA_EMBED */);
}
if (dirty & 1) {
toggle_class(a, "hasblack", ctx2[11]?.isBlacklisted === true);
}
},
d(detaching) {
if (detaching)
@ -16007,7 +16019,10 @@
t = text(t_value);
attr(a, "href", a_href_value = ctx[11].page.url);
attr(a, "target", "_blank");
attr(a, "class", "clickable svelte-eeaeh8");
attr(a, "class", "clickable svelte-1xjvk14");
toggle_class(a, "hasembed", ctx[11]?.embed_type === 0 /* THIRD_EYE */);
toggle_class(a, "hasext", ctx[11]?.embed_type === 1 /* MEDIA_EMBED */);
toggle_class(a, "hasblack", ctx[11]?.isBlacklisted === true);
},
m(target, anchor) {
insert(target, a, anchor);
@ -16019,6 +16034,15 @@
if (dirty & 1 && a_href_value !== (a_href_value = ctx2[11].page.url)) {
attr(a, "href", a_href_value);
}
if (dirty & 1) {
toggle_class(a, "hasembed", ctx2[11]?.embed_type === 0 /* THIRD_EYE */);
}
if (dirty & 1) {
toggle_class(a, "hasext", ctx2[11]?.embed_type === 1 /* MEDIA_EMBED */);
}
if (dirty & 1) {
toggle_class(a, "hasblack", ctx2[11]?.isBlacklisted === true);
}
},
d(detaching) {
if (detaching)
@ -16035,7 +16059,10 @@
a = element("a");
a.textContent = "[PEE contract]";
attr(a, "alt", "By clicking this you agree to stay hydrated");
attr(a, "class", "clickable svelte-eeaeh8");
attr(a, "class", "clickable svelte-1xjvk14");
toggle_class(a, "hasembed", ctx[11]?.embed_type === 0 /* THIRD_EYE */);
toggle_class(a, "hasext", ctx[11]?.embed_type === 1 /* MEDIA_EMBED */);
toggle_class(a, "hasblack", ctx[11]?.isBlacklisted === true);
},
m(target, anchor) {
insert(target, a, anchor);
@ -16044,7 +16071,17 @@
mounted = true;
}
},
p: noop,
p(ctx2, dirty) {
if (dirty & 1) {
toggle_class(a, "hasembed", ctx2[11]?.embed_type === 0 /* THIRD_EYE */);
}
if (dirty & 1) {
toggle_class(a, "hasext", ctx2[11]?.embed_type === 1 /* MEDIA_EMBED */);
}
if (dirty & 1) {
toggle_class(a, "hasblack", ctx2[11]?.isBlacklisted === true);
}
},
d(detaching) {
if (detaching)
detach(a);
@ -16082,7 +16119,7 @@
if_block2.c();
if_block2_anchor = empty();
attr(span, "title", span_title_value = ctx[11].filename);
attr(span, "class", "fa fa-download clickable svelte-eeaeh8");
attr(span, "class", "fa fa-download clickable svelte-1xjvk14");
toggle_class(span, "hasembed", ctx[11]?.embed_type === 0 /* THIRD_EYE */);
toggle_class(span, "hasext", ctx[11]?.embed_type === 1 /* MEDIA_EMBED */);
toggle_class(span, "hasblack", ctx[11]?.isBlacklisted === true);

6
src/Embedding.svelte

@ -358,10 +358,12 @@
.place.hasembed video,
.place.hasembed img {
border: solid 1px deeppink
/* border: solid 1px deeppink; */
box-shadow: 0 0 2px 2px deeppink;
}
.place.hasext video,
.place.hasext img {
border: solid 1px goldenrod
/* border: solid 1px goldenrod; */
box-shadow: 0 0 2px 2px goldenrod;
}
</style>

18
src/EyeButton.svelte

@ -62,6 +62,9 @@ import { EmbeddedFile, EMBED_TYPES } from './main';
href={file.source}
target="_blank"
class="clickable"
class:hasembed={file?.embed_type === EMBED_TYPES.THIRD_EYE}
class:hasext={file?.embed_type === EMBED_TYPES.MEDIA_EMBED}
class:hasblack={file?.isBlacklisted === true}
>Source</a>
{/if}
{#if file.page}
@ -70,6 +73,9 @@ import { EmbeddedFile, EMBED_TYPES } from './main';
href={file.page.url}
target="_blank"
class="clickable"
class:hasembed={file?.embed_type === EMBED_TYPES.THIRD_EYE}
class:hasext={file?.embed_type === EMBED_TYPES.MEDIA_EMBED}
class:hasblack={file?.isBlacklisted === true}
>{file.page.title}</a>
{/if}
{#if isNotChrome && isVideo}
@ -78,6 +84,9 @@ import { EmbeddedFile, EMBED_TYPES } from './main';
inst.bepis(ev);
}} alt="By clicking this you agree to stay hydrated"
class="clickable"
class:hasembed={file?.embed_type === EMBED_TYPES.THIRD_EYE}
class:hasext={file?.embed_type === EMBED_TYPES.MEDIA_EMBED}
class:hasblack={file?.isBlacklisted === true}
>[PEE contract]</a
>
{/if}
@ -105,4 +114,13 @@ import { EmbeddedFile, EMBED_TYPES } from './main';
.clickable.hasblack {
color: black;
}
a.clickable.hasembed {
color: deeppink !important;
}
a.clickable.hasext {
color: goldenrod !important;
}
a.clickable.hasblack {
color: black !important;
}
</style>

Loading…
Cancel
Save