-
Notifications
You must be signed in to change notification settings - Fork 7
[PHP] browscap.xml
Mohammed Osama Mohamed Sayed Ahmed edited this page Sep 23, 2019
·
2 revisions
<?xml version="1.0" encoding="UTF-8"?>
<browsercaps>
<comments>
<comment><![CDATA[Provided courtesy of http://browscap.org/]]></comment>
<comment><![CDATA[Created on Monday, July 1, 2019 at 03:41 PM UTC]]></comment>
<comment><![CDATA[Keep up with the latest goings-on with the project:]]></comment>
<comment><![CDATA[Follow us on Twitter <https://twitter.com/browscap>, or...]]></comment>
<comment><![CDATA[Like us on Facebook <https://facebook.com/browscap>, or...]]></comment>
<comment><![CDATA[Collaborate on GitHub <https://github.com/browscap>.]]></comment>
</comments>
<!--
<gjk_browscap_version>
<item name="Version" value="6000034"/>
<item name="Released" value="Mon, 01 Jul 2019 15:41:15 +0000"/>
</gjk_browscap_version>
-->
<browsercapitems>
<browscapitem name="DefaultProperties">
<item name="Comment" value="DefaultProperties"/>
<item name="Browser" value="DefaultProperties"/>
<item name="Browser_Maker" value=""/>
<item name="Version" value="0.0"/>
<item name="MajorVer" value="0"/>
<item name="MinorVer" value="0"/>
<item name="Platform" value=""/>
<item name="isMobileDevice" value="false"/>
<item name="isTablet" value="false"/>
<item name="Crawler" value="false"/>
<item name="Device_Type" value=""/>
<item name="Device_Pointing_Method" value=""/>
</browscapitem>
<!--
<browscapitem name="Mozilla/5.0 (*Windows NT 6.3*) applewebkit* (*khtml*like*gecko*) Chrome/75.0*Safari/*">
<item name="Parent" value="CefSharpBrowser 75.0"/>
<item name="Comment" value="CefSharpBrowser 75.0"/>
<item name="Browser" value="CefSharpBrowser"/>
<item name="Browser_Maker" value="CefSharpBrowser"/>
<item name="Version" value="75.0"/>
<item name="MajorVer" value="75"/>
<item name="MinorVer" value="0"/>
<item name="Platform" value="Win8.1"/>
<item name="isMobileDevice" value="false"/>
<item name="isTablet" value="false"/>
<item name="Crawler" value="false"/>
<item name="Device_Type" value="Desktop"/>
<item name="Device_Pointing_Method" value="mouse"/>
</browscapitem>
-->
<browscapitem name="Mozilla/5.0 (*Windows NT 6.3*) applewebkit* (*khtml*like*gecko*) Chrome/75.0*Safari/*">
<item name="Parent" value="Chrome 75.0"/>
<item name="Comment" value="Chrome 75.0"/>
<item name="Browser" value="Chrome"/>
<item name="Browser_Maker" value="Google Inc"/>
<item name="Version" value="75.0"/>
<item name="MajorVer" value="75"/>
<item name="MinorVer" value="0"/>
<item name="Platform" value="Win8.1"/>
<item name="isMobileDevice" value="false"/>
<item name="isTablet" value="false"/>
<item name="Crawler" value="false"/>
<item name="Device_Type" value="Desktop"/>
<item name="Device_Pointing_Method" value="mouse"/>
</browscapitem>
<browscapitem name="Mozilla/5.0 (*Windows NT 10.0*) applewebkit* (*khtml*like*gecko*) Chrome/75.0*Safari/*">
<item name="Parent" value="Chrome 75.0"/>
<item name="Comment" value="Chrome 75.0"/>
<item name="Browser" value="Chrome"/>
<item name="Browser_Maker" value="Google Inc"/>
<item name="Version" value="75.0"/>
<item name="MajorVer" value="75"/>
<item name="MinorVer" value="0"/>
<item name="Platform" value="Win10"/>
<item name="isMobileDevice" value="false"/>
<item name="isTablet" value="false"/>
<item name="Crawler" value="false"/>
<item name="Device_Type" value="Desktop"/>
<item name="Device_Pointing_Method" value="mouse"/>
</browscapitem>
<browscapitem name="Mozilla/5.0 (*Windows NT 6.4*) applewebkit* (*khtml*like*gecko*) Chrome/75.0*Safari/*">
<item name="Parent" value="Chrome 75.0"/>
<item name="Comment" value="Chrome 75.0"/>
<item name="Browser" value="Chrome"/>
<item name="Browser_Maker" value="Google Inc"/>
<item name="Version" value="75.0"/>
<item name="MajorVer" value="75"/>
<item name="MinorVer" value="0"/>
<item name="Platform" value="Win10"/>
<item name="isMobileDevice" value="false"/>
<item name="isTablet" value="false"/>
<item name="Crawler" value="false"/>
<item name="Device_Type" value="Desktop"/>
<item name="Device_Pointing_Method" value="mouse"/>
</browscapitem>
<browscapitem name="*">
<item name="Parent" value="DefaultProperties"/>
<item name="Comment" value="Default Browser"/>
<item name="Browser" value="Default Browser"/>
<item name="Browser_Maker" value=""/>
<item name="Version" value="0.0"/>
<item name="MajorVer" value="0"/>
<item name="MinorVer" value="0"/>
<item name="Platform" value=""/>
<item name="isMobileDevice" value="false"/>
<item name="isTablet" value="false"/>
<item name="Crawler" value="false"/>
<item name="Device_Type" value=""/>
<item name="Device_Pointing_Method" value=""/>
</browscapitem>
</browsercapitems>
</browsercaps>
public CefReturnValue OnBeforeResourceLoad(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IRequestCallback callback)
{
var headers = request.Headers;
headers["Custom-Header"] = "My Custom Header";
request.Headers = headers;
return CefReturnValue.Continue;
}
Anyone got an answer for my question above re loading a page into the control when the WPF TabItem it is on it doesn't have focus?
@nzmike99 The default WPF TabControl
isn't really suitable for hosting a browser, see
When I add the ChromiumWebBrowserWithScreenshotSupport.cs file to the CefSharp.Wpf.Example project it needs the "using GalaSoft.MvvmLight.Command; " dependency which destroys the project with errors
@jeremiahjordani_twitter You could use any Delegate/RelayCommand implementation you like. Pretty common for WPF apps to have one.
If you don't have one then just change the access modifier for the paramaterless TakeScreenshot so it's usable in your instance. The command is entirely optional.
private void /*Btn*/Sceenshot_Click(object sender, RoutedEventArgs e)
{
/*
//CefSharp - Quick and Dirty Screenshot with no class dependency
MessageBox.Show("Take screenshot");
double dWidth = (webCefSharpChromiumWebBrowser.ActualWidth);
double dHeight = (webCefSharpChromiumWebBrowser.ActualHeight);
int actualWidth = 0;
int actualHeight = 0;
actualWidth = Convert.ToInt32(dWidth);
actualHeight = Convert.ToInt32(dHeight);
RenderTargetBitmap renderTargetBitmap = new RenderTargetBitmap(actualWidth, actualHeight, 90, 90, PixelFormats.Pbgra32);
renderTargetBitmap.Render(webCefSharpChromiumWebBrowser);
PngBitmapEncoder pngImage = new PngBitmapEncoder();
pngImage.Frames.Add(BitmapFrame.Create(renderTargetBitmap));
using (Stream fileStream = File.Create(@"C:\SaveFolderName\apollo.png")) //uses System.IO for fileStream
{
pngImage.Save(fileStream);
}
*/
}
[C#
] TakeScreenshot [WPF
]
/*Here is an example that reuses the image that's already rendered to the screen.*/
var template = Browser.Template;
var image = (System.Windows.Controls.Image)template.FindName("PART_image", Browser);
var pngImage = new PngBitmapEncoder();
pngImage.Frames.Add(BitmapFrame.Create((System.Windows.Media.Imaging.BitmapSource)image.Source));
var screenshotPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "CefSharp screenshot" + DateTime.Now.Ticks + ".png");
using (var fileStream = File.Create(screenshotPath))
{
pngImage.Save(fileStream);
}