Compare commits
2 commits
master
...
3.0.0-alph
Author | SHA1 | Date | |
---|---|---|---|
|
cab1b3b049 | ||
|
c38e57e081 |
2 changed files with 30 additions and 8 deletions
|
@ -33,6 +33,11 @@ namespace SafeExamBrowser.Browser.Handlers
|
|||
// reactivated. See https://bitbucket.org/chromiumembedded/cef/issues/2622 for the current status of development.
|
||||
// AppendCustomUserAgent(request);
|
||||
|
||||
if (IsMailtoUrl(request.Url))
|
||||
{
|
||||
return CefReturnValue.Cancel;
|
||||
}
|
||||
|
||||
ReplaceCustomScheme(request);
|
||||
|
||||
return base.OnBeforeResourceLoad(browserControl, browser, frame, request, callback);
|
||||
|
@ -47,7 +52,14 @@ namespace SafeExamBrowser.Browser.Handlers
|
|||
request.Headers = headers;
|
||||
}
|
||||
|
||||
private bool IsMailtoUrl(string url)
|
||||
{
|
||||
return url.StartsWith(Uri.UriSchemeMailto);
|
||||
}
|
||||
|
||||
private void ReplaceCustomScheme(IRequest request)
|
||||
{
|
||||
if (Uri.IsWellFormedUriString(request.Url, UriKind.RelativeOrAbsolute))
|
||||
{
|
||||
var uri = new Uri(request.Url);
|
||||
|
||||
|
@ -61,4 +73,5 @@ namespace SafeExamBrowser.Browser.Handlers
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -247,6 +247,15 @@ namespace SafeExamBrowser.UserInterface.Mobile
|
|||
ReloadButton.Visibility = WindowSettings.AllowReloading ? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
UrlTextBox.Visibility = WindowSettings.AllowAddressBar ? Visibility.Visible : Visibility.Hidden;
|
||||
|
||||
if (!WindowSettings.AllowAddressBar)
|
||||
{
|
||||
BackwardButton.Height = 35;
|
||||
ForwardButton.Height = 35;
|
||||
ReloadButton.Height = 35;
|
||||
UrlTextBox.Height = 20;
|
||||
MenuButton.Height = 35;
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializeBounds()
|
||||
|
|
Loading…
Reference in a new issue