@@ -95,18 +95,21 @@ private async void InitializeWebView()
9595
9696 core . Settings . AreDefaultScriptDialogsEnabled = false ;
9797 core . Settings . AreDefaultContextMenusEnabled = false ;
98+
99+ #if DEBUG
98100 core . Settings . AreDevToolsEnabled = true ;
101+ #else
102+ core . Settings . AreDevToolsEnabled = false ;
103+ #endif
99104
100- // all the stuff I found in this website go here that are bad!
101105 string css = @"
102- #ads, .ad-container, .popup, .modal, .banner, .overlay,
103- .promo, .promotion, .deal-banner, .video-ad, .advertisement,
104- .nsfw, .hentai, .adult, .lust-goddess, .porn-content, .sex-content {
105- display: none !important;
106- }
107- iframe { width:100% !important; height:100% !important; border:none !important; }
108- * { scroll-behavior: smooth !important; }
109- " ;
106+ #ads, .ad-container, .popup, .modal, .banner, .overlay,
107+ .promo, .promotion, .deal-banner, .video-ad, .advertisement {
108+ display: none !important;
109+ }
110+ iframe { width:100% !important; height:100% !important; border:none !important; }
111+ * { scroll-behavior: smooth !important; }
112+ " ;
110113
111114 string injectCssScript = $@ "
112115 let style = document.createElement('style');
@@ -137,13 +140,20 @@ function sendEpisode() {
137140 // block any (IF SO)
138141 string [ ] blockedKeywords = new string [ ]
139142 {
140- "ads" , "doubleclick" , "googlesyndication" , "promo" , "banner" , "deal" ,
141- "video-ad" , "advertisement" , "porn" , "hentai" , "lust" , "nsfw" ,
142- "adult" , "sex" , "goddess" , "noozy.tv" ,
143- "https://piccdn.net/blank-728x90-aniw.gif"
143+ "ads" ,
144+ "doubleclick" ,
145+ "googlesyndication" ,
146+ "promo" ,
147+ "banner" ,
148+ "deal" ,
149+ "video-ad" ,
150+ "advertisement" ,
151+ "noozy.tv" ,
152+ "https://piccdn.net/blank-728x90-aniw.gif"
144153 } ;
145154
146- core . AddWebResourceRequestedFilter ( "*" , CoreWebView2WebResourceContext . All ) ;
155+ core . AddWebResourceRequestedFilter ( "*" , CoreWebView2WebResourceContext . Script ) ;
156+ core . AddWebResourceRequestedFilter ( "*" , CoreWebView2WebResourceContext . Image ) ;
147157 core . WebResourceRequested += ( sender , args ) =>
148158 {
149159 string uri = args . Request . Uri . ToLower ( ) ;
@@ -468,8 +478,8 @@ await Dispatcher.InvokeAsync(() =>
468478 else
469479 {
470480 MainGrid . RowDefinitions [ 1 ] . Height = new GridLength ( 40 ) ;
471- MainBorder . Padding = new Thickness ( 8 ) ;
472- MainBorder . CornerRadius = new CornerRadius ( 8 ) ;
481+ MainBorder . Padding = new Thickness ( 4 ) ;
482+ MainBorder . CornerRadius = new CornerRadius ( 4 ) ;
473483
474484 Left = _prevLeft ;
475485 Top = _prevTop ;
0 commit comments