@@ -80,6 +80,18 @@ export async function RunNamuLinkUserscript(BrowserWindow: typeof window, Usersc
8080 return NextTargeted
8181 }
8282
83+ function AllParents ( Ele : HTMLElement ) : Set < HTMLElement > {
84+ let SetHTMLElement = new Set ( [ Ele ] )
85+ for ( let I = 0 ; ; I ++ ) {
86+ let Upper = [ ...SetHTMLElement ] [ I ] . parentElement
87+ if ( Upper === null ) {
88+ break
89+ }
90+ SetHTMLElement . add ( Upper )
91+ }
92+ return SetHTMLElement
93+ }
94+
8395 ArticleHTMLElement . addEventListener ( 'vue:settled' , async ( ) => {
8496 let Targeted = [ ...document . querySelectorAll ( '#app div[class] div[class] ~ div[class]' ) ] . filter ( Ele => Ele instanceof HTMLElement )
8597 Targeted = Targeted . filter ( Ele =>
@@ -126,6 +138,17 @@ export async function RunNamuLinkUserscript(BrowserWindow: typeof window, Usersc
126138 RealTabletTargeted . forEach ( Ele => {
127139 Ele . style . setProperty ( 'display' , 'none' , 'important' )
128140 } )
141+
142+ // leftover
143+ const PlaceHolderCandidated : Set < HTMLElement > = new Set ( [ ...RealTargeted , ...RealTabletTargeted ] )
144+ PlaceHolderCandidated . forEach ( PlaceHolder => {
145+ let Parents = [ ...AllParents ( PlaceHolder ) ] . filter ( Ele => Ele . innerText . trim ( ) . length === 0 )
146+ Parents . forEach ( Ele => PlaceHolderCandidated . add ( Ele ) )
147+ } )
148+ console . debug ( `[${ UserscriptName } ] vue:settled PlaceHolderCandidated` , PlaceHolderCandidated ) ;
149+ [ ...PlaceHolderCandidated ] . forEach ( Ele => {
150+ Ele . style . setProperty ( 'display' , 'none' , 'important' )
151+ } )
129152 } )
130153
131154 // init Naver Nanum fonts
0 commit comments