comment out all of the safe browsing stuff because nothing works
This commit is contained in:
parent
0f17a4a6e7
commit
59eda3d503
9 changed files with 400 additions and 18 deletions
|
@ -21,6 +21,7 @@ namespace XeroBrowser
|
|||
{
|
||||
Uri _fileUri;
|
||||
Uri _fileUri2;
|
||||
Uri _safebrowsingblockpage;
|
||||
public FrmBrowser()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
@ -37,6 +38,10 @@ namespace XeroBrowser
|
|||
_fileUri2 = new Uri(filePath2);
|
||||
string fileUrl2 = _fileUri2.AbsoluteUri;
|
||||
|
||||
string safebrowsingblockpath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "safebrowsingblock.html");
|
||||
_safebrowsingblockpage = new Uri(safebrowsingblockpath);
|
||||
string safebrowsingblockpage = _safebrowsingblockpage.AbsoluteUri;
|
||||
|
||||
chromiumWebBrowser1.Load(fileUrl);
|
||||
txtSearchOrUrl.Text = "";
|
||||
txtSearchOrUrl.IconRight = null;
|
||||
|
@ -71,20 +76,24 @@ namespace XeroBrowser
|
|||
private bool _isBlocked;
|
||||
private void chromiumWebBrowser1_LoadingStateChanged(object sender, LoadingStateChangedEventArgs e)
|
||||
{
|
||||
//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;
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
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;
|
||||
string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "safebrowsingblock.html");
|
||||
_safebrowsingblockpage = new Uri(filePath);
|
||||
string fileUrl = _safebrowsingblockpage.AbsoluteUri;
|
||||
chromiumWebBrowser1.Load(fileUrl); ;
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
};
|
||||
|
||||
if (e.IsLoading)
|
||||
{
|
||||
|
|
Reference in a new issue