diff --git a/main.meta.js b/main.meta.js index e20b940..0db48fc 100644 --- a/main.meta.js +++ b/main.meta.js @@ -1,7 +1,7 @@ // ==UserScript== // @name PNGExtraEmbed2 // @namespace https://coom.tech/ -// @version 0.121 +// @version 0.123 // @description uhh // @author You // @match https://boards.4channel.org/* diff --git a/main.user.js b/main.user.js index b4d6356..df23072 100644 --- a/main.user.js +++ b/main.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name PNGExtraEmbed2 // @namespace https://coom.tech/ -// @version 0.121 +// @version 0.123 // @description uhh // @author You // @match https://boards.4channel.org/* @@ -14996,8 +14996,8 @@ if_block5.c(); 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 */); + toggle_class(div0, "hasembed", ctx[0]?.embed_type === 1 /* MEDIA_EMBED */); + toggle_class(div0, "hasext", ctx[0]?.embed_type === 0 /* THIRD_EYE */); attr(div1, "class", "hoverer svelte-145c3cl"); attr(div1, "id", "ihover"); toggle_class(div1, "visible", ctx[7] && ctx[6]); @@ -15079,10 +15079,10 @@ toggle_class(div0, "contract", ctx2[6]); } if (dirty[0] & 1) { - toggle_class(div0, "hasembed", ctx2[0]?.embed_type === 0 /* THIRD_EYE */); + toggle_class(div0, "hasembed", ctx2[0]?.embed_type === 1 /* MEDIA_EMBED */); } if (dirty[0] & 1) { - toggle_class(div0, "hasext", ctx2[0]?.embed_type === 1 /* MEDIA_EMBED */); + toggle_class(div0, "hasext", ctx2[0]?.embed_type === 0 /* THIRD_EYE */); } if (ctx2[16]) { if (if_block3) { @@ -15980,8 +15980,8 @@ attr(a, "href", a_href_value = ctx[11].source); attr(a, "target", "_blank"); 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, "hasembed", ctx[11]?.embed_type === 1 /* MEDIA_EMBED */); + toggle_class(a, "hasext", ctx[11]?.embed_type === 0 /* THIRD_EYE */); toggle_class(a, "hasblack", ctx[11]?.isBlacklisted === true); }, m(target, anchor) { @@ -15993,10 +15993,10 @@ attr(a, "href", a_href_value); } if (dirty & 1) { - toggle_class(a, "hasembed", ctx2[11]?.embed_type === 0 /* THIRD_EYE */); + toggle_class(a, "hasembed", ctx2[11]?.embed_type === 1 /* MEDIA_EMBED */); } if (dirty & 1) { - toggle_class(a, "hasext", ctx2[11]?.embed_type === 1 /* MEDIA_EMBED */); + toggle_class(a, "hasext", ctx2[11]?.embed_type === 0 /* THIRD_EYE */); } if (dirty & 1) { toggle_class(a, "hasblack", ctx2[11]?.isBlacklisted === true); @@ -16020,8 +16020,8 @@ attr(a, "href", a_href_value = ctx[11].page.url); attr(a, "target", "_blank"); 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, "hasembed", ctx[11]?.embed_type === 1 /* MEDIA_EMBED */); + toggle_class(a, "hasext", ctx[11]?.embed_type === 0 /* THIRD_EYE */); toggle_class(a, "hasblack", ctx[11]?.isBlacklisted === true); }, m(target, anchor) { @@ -16035,10 +16035,10 @@ attr(a, "href", a_href_value); } if (dirty & 1) { - toggle_class(a, "hasembed", ctx2[11]?.embed_type === 0 /* THIRD_EYE */); + toggle_class(a, "hasembed", ctx2[11]?.embed_type === 1 /* MEDIA_EMBED */); } if (dirty & 1) { - toggle_class(a, "hasext", ctx2[11]?.embed_type === 1 /* MEDIA_EMBED */); + toggle_class(a, "hasext", ctx2[11]?.embed_type === 0 /* THIRD_EYE */); } if (dirty & 1) { toggle_class(a, "hasblack", ctx2[11]?.isBlacklisted === true); @@ -16060,8 +16060,8 @@ a.textContent = "[PEE contract]"; attr(a, "alt", "By clicking this you agree to stay hydrated"); 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, "hasembed", ctx[11]?.embed_type === 1 /* MEDIA_EMBED */); + toggle_class(a, "hasext", ctx[11]?.embed_type === 0 /* THIRD_EYE */); toggle_class(a, "hasblack", ctx[11]?.isBlacklisted === true); }, m(target, anchor) { @@ -16073,10 +16073,10 @@ }, p(ctx2, dirty) { if (dirty & 1) { - toggle_class(a, "hasembed", ctx2[11]?.embed_type === 0 /* THIRD_EYE */); + toggle_class(a, "hasembed", ctx2[11]?.embed_type === 1 /* MEDIA_EMBED */); } if (dirty & 1) { - toggle_class(a, "hasext", ctx2[11]?.embed_type === 1 /* MEDIA_EMBED */); + toggle_class(a, "hasext", ctx2[11]?.embed_type === 0 /* THIRD_EYE */); } if (dirty & 1) { toggle_class(a, "hasblack", ctx2[11]?.isBlacklisted === true); @@ -16120,8 +16120,8 @@ if_block2_anchor = empty(); attr(span, "title", span_title_value = ctx[11].filename); 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, "hasembed", ctx[11]?.embed_type === 1 /* MEDIA_EMBED */); + toggle_class(span, "hasext", ctx[11]?.embed_type === 0 /* THIRD_EYE */); toggle_class(span, "hasblack", ctx[11]?.isBlacklisted === true); }, m(target, anchor) { @@ -16147,10 +16147,10 @@ attr(span, "title", span_title_value); } if (dirty & 1) { - toggle_class(span, "hasembed", ctx[11]?.embed_type === 0 /* THIRD_EYE */); + toggle_class(span, "hasembed", ctx[11]?.embed_type === 1 /* MEDIA_EMBED */); } if (dirty & 1) { - toggle_class(span, "hasext", ctx[11]?.embed_type === 1 /* MEDIA_EMBED */); + toggle_class(span, "hasext", ctx[11]?.embed_type === 0 /* THIRD_EYE */); } if (dirty & 1) { toggle_class(span, "hasblack", ctx[11]?.isBlacklisted === true); diff --git a/src/Embedding.svelte b/src/Embedding.svelte index ef7394f..1609746 100644 --- a/src/Embedding.svelte +++ b/src/Embedding.svelte @@ -253,8 +253,8 @@
e.preventDefault()} on:auxclick={e => e.preventDefault()} on:mousedown={bepis} diff --git a/src/EyeButton.svelte b/src/EyeButton.svelte index c199c2f..9ebcc49 100644 --- a/src/EyeButton.svelte +++ b/src/EyeButton.svelte @@ -51,8 +51,8 @@ import { EmbeddedFile, EMBED_TYPES } from './main'; title={file.filename} on:click={() => downloadFile(file)} class="fa fa-download clickable" - class:hasembed={file?.embed_type === EMBED_TYPES.THIRD_EYE} - class:hasext={file?.embed_type === EMBED_TYPES.MEDIA_EMBED} + class:hasembed={file?.embed_type === EMBED_TYPES.MEDIA_EMBED} + class:hasext={file?.embed_type === EMBED_TYPES.THIRD_EYE} class:hasblack={file?.isBlacklisted === true} /> @@ -62,8 +62,8 @@ 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:hasembed={file?.embed_type === EMBED_TYPES.MEDIA_EMBED} + class:hasext={file?.embed_type === EMBED_TYPES.THIRD_EYE} class:hasblack={file?.isBlacklisted === true} >Source {/if} @@ -73,8 +73,8 @@ 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:hasembed={file?.embed_type === EMBED_TYPES.MEDIA_EMBED} + class:hasext={file?.embed_type === EMBED_TYPES.THIRD_EYE} class:hasblack={file?.isBlacklisted === true} >{file.page.title} {/if} @@ -84,8 +84,8 @@ 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:hasembed={file?.embed_type === EMBED_TYPES.MEDIA_EMBED} + class:hasext={file?.embed_type === EMBED_TYPES.THIRD_EYE} class:hasblack={file?.isBlacklisted === true} >[PEE contract] diff --git a/src/main.ts b/src/main.ts index cb7251b..988830e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -355,9 +355,9 @@ function processAttachments(post: HTMLDivElement, ress: [EmbeddedFile, EMBED_TYP const replyBox = post.querySelector('.post'); const embed_status = ress[0][1]; if (embed_status === EMBED_TYPES.THIRD_EYE) - replyBox?.classList.add('hasext'); + replyBox?.classList.add('hasext'); /* ext(ernal) = third-eye */ else if (embed_status === EMBED_TYPES.MEDIA_EMBED) - replyBox?.classList.add('hasembed'); + replyBox?.classList.add('hasembed'); /* media-embed */ if (ress.length > 1) replyBox?.classList.add('hasmultiple');