From 0f17a4a6e78f075c3cc85544c611164759b93e5e Mon Sep 17 00:00:00 2001 From: Diamond Creeper Date: Mon, 26 Jun 2023 11:39:25 +1200 Subject: [PATCH] create safe browsing block file --- WebBrowser/frmBrowser.cs | 26 +++++++++++++------------- WebBrowser/safebrowsingblock.html | 0 2 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 WebBrowser/safebrowsingblock.html diff --git a/WebBrowser/frmBrowser.cs b/WebBrowser/frmBrowser.cs index 97cc654..1be1229 100644 --- a/WebBrowser/frmBrowser.cs +++ b/WebBrowser/frmBrowser.cs @@ -71,20 +71,20 @@ namespace XeroBrowser private bool _isBlocked; private void chromiumWebBrowser1_LoadingStateChanged(object sender, LoadingStateChangedEventArgs e) { - // chromiumWebBrowser1.LoadingStateChanged += async (s, args) => + //chromiumWebBrowser1.LoadingStateChanged += async (s, args) => // { - // if (args.IsLoading) - // { - // var isUnsafe = await Program.IsUrlUnsafe(args.Browser.MainFrame.Url, "AIzaSyCQV-s52iNah-il6T5iFuqo6M_JzcLyaxs"); - // if (isUnsafe) - // { - // chromiumWebBrowser1.Stop(); // cancel the navigation - // _isBlocked = true; - // chromiumWebBrowser1.LoadHtml(""); - // break; - // } - // } - // }; + // if (args.IsLoading) + // { + // var isUnsafe = await Program.IsUrlUnsafe(args.Browser.MainFrame.Url, "AIzaSyCQV-s52iNah-il6T5iFuqo6M_JzcLyaxs"); + // if (isUnsafe) + // { + // chromiumWebBrowser1.Stop(); // cancel the navigation + // _isBlocked = true; + // chromiumWebBrowser1.LoadHtml(""); + // break; + // } + // } + // }; if (e.IsLoading) { diff --git a/WebBrowser/safebrowsingblock.html b/WebBrowser/safebrowsingblock.html new file mode 100644 index 0000000..e69de29