@filteringdev/namulink 19.0.4-build.3 → 19.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/NamuLink.user.js +2 -2
- package/dist/index.js +2 -0
- package/package.json +1 -1
package/dist/NamuLink.user.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// @downloadURL https://cdn.jsdelivr.net/npm/@filteringdev/namulink@latest/dist/NamuLink.user.js
|
|
9
9
|
// @license MPL-2.0
|
|
10
10
|
//
|
|
11
|
-
// @version 19.0.4
|
|
11
|
+
// @version 19.0.4
|
|
12
12
|
// @author PiQuark6046 and contributors
|
|
13
13
|
//
|
|
14
14
|
// @grant unsafeWindow
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
// ==/UserScript==
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
(()=>{var s=typeof unsafeWindow<"u"?unsafeWindow:window;function d(a,f="NamuLink"){let u=a.Function.prototype.call,i=a.Reflect.apply,x=new CustomEvent("PL2PlaceHolder"),c=[[/function *\( *_0x[a-f0-9]+ *, *_0x[a-f0-9]+ *, *_0x[a-f0-9]+ *, *_0x[a-f0-9]+ *, *_0x[a-f0-9]+ *, *_0x[a-f0-9]+ *\) *{ *var *_0x[a-f0-9]+/,/('|")td('|") *, *{ *('|")class('|") *: *\( *-? *0x[a-f0-9]+ *\+ *-? *0x[a-f0-9]+ *\+ *0x[a-f0-9]+ *, *_0x[a-f0-9]+ *\[ *_0x[a-f0-9]+ */,/\( *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *\) *, *('|")onClick('|") *: *_0x[a-f0-9]+ *\[ *-? *0x[a-f0-9]+ *\* *-? *0x[a-f0-9]+/,/_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *\) *, *('|")colspan('|") *: *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *=== *_0x[a-f0-9]+ *\[ *_0x[a-f0-9]+ *\(/],[/function *\( *_0x[a-f0-9]+ *, *_0x[a-f0-9]+ *, *_0x[a-f0-9]+ *, *_0x[a-f0-9]+ *, *_0x[a-f0-9]+ *, *_0x[a-f0-9]+ *\) *{ *var *_0x[a-f0-9]+/,/\( *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *\) *, *('|")onClick('|") *: *_0x[a-f0-9]+ *\[ *-? *0x[a-f0-9]+ *\* *-? *0x[a-f0-9]+/,/_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *\] *\) *\( *_0x[a-f0-9]+ *=> *_0x[a-f0-9]+ *\[ *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *\] *\( *_0x[a-f0-9]+/,/ *, *{ *('|")class('|") *: *\( *-? *0x[a-f0-9,_+*x-]+ *\[ *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *\] *\) *\( *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *\) *} *, *\[ *! *_0x[a-f0-9]+/]],g=[[/new *Map *\( *Object *\[ *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *\] *\( *{ *('|")pretendard('|") *: *{ *('|")fontFamily('|") *: */,/('|")fontFamily('|") *: *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *, *('|")styleUrl('|") *: *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *, *('|")isGoogleFonts/,/('|")popper--wide('|") *: *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *, *('|")popper__title('|") *: *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *} *} *,/]],r=!1;a.Function.prototype.call=new Proxy(u,{apply(t,e,l){if(r)return i(t,e,l);r=!0;let
|
|
25
|
+
(()=>{var s=typeof unsafeWindow<"u"?unsafeWindow:window;function d(a,f="NamuLink"){let u=a.Function.prototype.call,i=a.Reflect.apply,x=new CustomEvent("PL2PlaceHolder"),c=[[/function *\( *_0x[a-f0-9]+ *, *_0x[a-f0-9]+ *, *_0x[a-f0-9]+ *, *_0x[a-f0-9]+ *, *_0x[a-f0-9]+ *, *_0x[a-f0-9]+ *\) *{ *var *_0x[a-f0-9]+/,/('|")td('|") *, *{ *('|")class('|") *: *\( *-? *0x[a-f0-9]+ *\+ *-? *0x[a-f0-9]+ *\+ *0x[a-f0-9]+ *, *_0x[a-f0-9]+ *\[ *_0x[a-f0-9]+ */,/\( *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *\) *, *('|")onClick('|") *: *_0x[a-f0-9]+ *\[ *-? *0x[a-f0-9]+ *\* *-? *0x[a-f0-9]+/,/_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *\) *, *('|")colspan('|") *: *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *=== *_0x[a-f0-9]+ *\[ *_0x[a-f0-9]+ *\(/],[/function *\( *_0x[a-f0-9]+ *, *_0x[a-f0-9]+ *, *_0x[a-f0-9]+ *, *_0x[a-f0-9]+ *, *_0x[a-f0-9]+ *, *_0x[a-f0-9]+ *\) *{ *var *_0x[a-f0-9]+/,/\( *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *\) *, *('|")onClick('|") *: *_0x[a-f0-9]+ *\[ *-? *0x[a-f0-9]+ *\* *-? *0x[a-f0-9]+/,/_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *\] *\) *\( *_0x[a-f0-9]+ *=> *_0x[a-f0-9]+ *\[ *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *\] *\( *_0x[a-f0-9]+/,/ *, *{ *('|")class('|") *: *\( *-? *0x[a-f0-9,_+*x-]+ *\[ *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *\] *\) *\( *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *\) *} *, *\[ *! *_0x[a-f0-9]+/]],g=[[/new *Map *\( *Object *\[ *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *\] *\( *{ *('|")pretendard('|") *: *{ *('|")fontFamily('|") *: */,/('|")fontFamily('|") *: *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *, *('|")styleUrl('|") *: *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *, *('|")isGoogleFonts/,/('|")popper--wide('|") *: *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *, *('|")popper__title('|") *: *_0x[a-f0-9]+ *\( *0x[a-f0-9]+ *\) *} *} *,/]],r=!1;a.Function.prototype.call=new Proxy(u,{apply(t,e,l){if(r)return i(t,e,l);r=!0;let n=String(e);return n.length<5e4&&!g.some(o=>o.every(p=>p.test(n)))&&c.filter(o=>o.filter(p=>p.test(n)).length===o.length).length===1?(console.debug(`[${f}]: Function.prototype.call called for PowerLink Skeleton:`,e),a.document.dispatchEvent(x),r=!1,i(t,()=>{},[])):(r=!1,i(t,e,l))}}),a.document.addEventListener("PL2PlaceHolder",()=>{setTimeout(()=>{let t=new Set([...a.document.querySelectorAll("div[class] div[class] div[class] ~ div[class]")]);t=new Set([...t].filter(e=>e instanceof HTMLElement)),t=new Set([...t].filter(e=>Number(getComputedStyle(e).getPropertyValue("padding-top").replaceAll(/px$/g,""))>10)),t=new Set([...t,...[...t].flatMap(e=>[...e.querySelectorAll("*")])]),t=new Set([...t].filter(e=>e instanceof HTMLElement&&e.innerText.trim().length===0)),t=new Set([...t].filter(e=>Number(getComputedStyle(e).getPropertyValue("border-bottom-width").replaceAll(/px/g,""))>=.5)),t=new Set([...t].filter(e=>Number(getComputedStyle(e).getPropertyValue("border-left-width").replaceAll(/px/g,""))>=.5)),t=new Set([...t].filter(e=>Number(getComputedStyle(e).getPropertyValue("border-right-width").replaceAll(/px/g,""))>=.5)),t=new Set([...t].filter(e=>Number(getComputedStyle(e).getPropertyValue("border-top-width").replaceAll(/px/g,""))>=.5)),t=new Set([...t].filter(e=>[...e.querySelectorAll("*")].some(l=>{if(!(l instanceof HTMLElement))return!1;let n=l.getClientRects()[0]?.height??0,o=Number(getComputedStyle(l).getPropertyValue("margin-bottom").replaceAll(/px/g,""));return n===0?!1:o>=n*.75&&o<=n*1.25}))),console.debug(`[${f}]: Removing PowerLink Skeleton Containers:`,t),t.forEach(e=>{e.setAttribute("style","display: none !important;")})},2500),setTimeout(()=>{let t=new Set([...a.document.querySelectorAll("div[class] div[class] div[class] ~ div[class]")]);t=new Set([...t].filter(e=>e instanceof HTMLElement)),t=new Set([...t].filter(e=>Number(getComputedStyle(e).getPropertyValue("margin-bottom").replaceAll(/px$/g,""))>15||Number(getComputedStyle(e).getPropertyValue("padding-top").replaceAll(/px$/g,""))>20)),t=new Set([...t].filter(e=>e instanceof HTMLElement&&e.innerText.trim().length===0)),t=new Set([...t].filter(e=>[...e.querySelectorAll("*")].some(l=>l instanceof HTMLElement&&Number(getComputedStyle(l).getPropertyValue("padding-top").replaceAll(/px/g,""))>=5&&Number(getComputedStyle(l).getPropertyValue("padding-bottom").replaceAll(/px/g,""))>=5&&Number(getComputedStyle(l).getPropertyValue("padding-left").replaceAll(/px/g,""))>=5&&Number(getComputedStyle(l).getPropertyValue("padding-right").replaceAll(/px/g,""))>=5))),console.debug(`[${f}]: Removing PowerLink Skeleton Containers:`,t),t.forEach(e=>{e.setAttribute("style","display: none !important;")})},2500)})}d(s);})();
|
|
26
26
|
/*!
|
|
27
27
|
* @license MPL-2.0
|
|
28
28
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
package/dist/index.js
CHANGED
|
@@ -65,6 +65,8 @@ export function RunNamuLinkUserscript(BrowserWindow, UserscriptName = 'NamuLink'
|
|
|
65
65
|
return false;
|
|
66
66
|
let PL2TitleHeight = Child.getClientRects()[0]?.height ?? 0;
|
|
67
67
|
let PL2TitleMarginBottom = Number(getComputedStyle(Child).getPropertyValue('margin-bottom').replaceAll(/px/g, ''));
|
|
68
|
+
if (PL2TitleHeight === 0)
|
|
69
|
+
return false;
|
|
68
70
|
return PL2TitleMarginBottom >= PL2TitleHeight * 0.75 && PL2TitleMarginBottom <= PL2TitleHeight * 1.25;
|
|
69
71
|
})));
|
|
70
72
|
console.debug(`[${UserscriptName}]: Removing PowerLink Skeleton Containers:`, ContainerElements);
|