Detect if Chrome Frame BHO is enabled - google-chrome-frame

I have the following code to detect to see if CF BHO is enabled, but unfortunately it didn't work out, it alway returns "automation server failed to create obj"
var activexGoogleFrameBho = new ActiveXObject('ChromeFrame.Bho');
if (activexGoogleFrameBho) {
...
}
My user agent and page header are as following:
mozilla/4.0(compatible; msie 8.0; windows nt 6.1; wow64; trident/4.0;
chromeframe/32.0.1700.107; slcc2; .net clr 2.0.50727; .net4.0c; .net4.0e)
<meta http-equiv='X-UA-Compatible' content='IE=Edge,chrome=IE8'/>
any ideas?
Thanks,

I'm not sure if you can detect the helper object itself though to see if the current page is loaded in chromeframe you can check if window.externalHost exists.
http://www.chromium.org/developers/how-tos/chrome-frame-getting-started/understanding-chrome-frame-user-agent#TOC-From-the-script-on-the-web-page

Related

WebView identifies as Edge on some PCs, as IE11 on others

We have a native app for Windows 64 bit. It embeds WebView (the original, not WebView2).
We set compatibility mode to IE11 with the BROWSER_FEATURE_EMULATION registry setting to 11000.
On some PCs, it identifies as IE11 with this user agent:
Mozilla/5.0 (Windows NT 6.2; Win64; x64; Trident/7.0; rv:11.0) like Gecko
On others, it identies as Edge with this agent:
Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.9200
These are all Windows 10 PCs, either 20H2 or 21H2.
How does this happen?
This is important because some things do not work in the "IE11" whereas they do work in the "Edge" mode. (Google maps)
From what I read, WebView on Windows 10 should always be "Edge IE11 mode".

Firefox Add-On, change preferences depending on connection

I would like to create my own Add-On that changes preferences depending on the proxy (if a proxy is being used or not), is that possible? I asked in a Firefox Add-On IRC but didn't a response, all users were idle.
Example:
// If proxy is enabled
lockPref("general.appname.override", "Netscape");
lockPref("general.appversion.override", "5.0 (Windows)");
lockPref("general.buildID.override", "20100101");
lockPref("general.oscpu.override", "Windows NT 6.1; Win32");
lockPref("general.platform.override", "Win32");
lockPref("general.productsub.override", "20100101");
lockPref("general.useragent.locale", "en-US");
lockPref("general.useragent.override", "Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Firefox/31.0");

Windows Phone open url in desktop version

I'm using this code to open url in my app
var task = new WebBrowserTask();
task.Uri = new Uri(Link, UriKind.Absolute);
task.Show();
now I have requirement to open this page in desktop version. How can I do that?
In iOS I set user agent, but there's no such param for browsertask on WP.
That is not possible by any means. System settings (in this case Internet Explorer settings) cannot be changed by your application.
If you are the owner of the website, you can specify some special query parameter that will force desktop mode. If this is a general purpose app, you might as well forget about it.
This can do it !
public void MyBrowser()
{
webBrowser1.Navigate(new Uri("http://www.stackoverflow.com"), null, "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; XBLWP7; ZuneWP7)");
}

iframes and mixed content in IE

My goal is to embed this webpage "brokercheck.finra.org/Search/Search.aspx" into a visualforce page. I'm using an <apex:iframe/> to do this. I've tried html iframes too.
In IE8, I'm getting a message saying "do you want to view the webpage that was delivered securely" the http content only works if the user clicks no. (which is not a good practice).
on the bottom of the page I'm getting a warning that says:
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; MS-RTC LM 8)
Message: Permission denied
Line: 6
Char: 152
Code: 0
URI: http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js
Is there anything I can do on my end to get around the popup?
I've tried a few things, but nothing has been fruitful...
You're mixing an encrypted (https) content of visualforce / regular salesforce pages with unencrypted http. And sadly this website doesn't seem to have a secure version.
I'm afraid there's not much you can do, this "mixed content" warning is just a feature of IE. In fact I think it'd be pointless if websites could somehow suppress it ;) You can read about it on MSDN and the simplest thing is to ask users to modify their security settings.
You could try playing with Javascript, maybe loading content from finfra with some AJAX call... But that will be most likely treated by IE as cross-domain JavaScript and also blocked. Can you maybe simply show this page as a link / popup window? Or simply make REST GET call(s) to it server-side and display pieces of content?

Mootools Issue in IE8

I am having an issue with Mootools. If you go to this page RTDS you'll notice a login button in the top right. On all other browsers (IE9, Safari, Chrome, and Firefox) the login works fine but it doesn't work in IE8. IE says its an error related to moo tools but I don't really know what it means or how to fix it. The error is as follows:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3; .NET4.0E)
Timestamp: Wed, 8 Feb 2012 02:26:00 UTC
Message: 'null' is null or not an object
Line: 66
Char: 2
Code: 0
URI: http://www.hanseninfotech.com/rtds/templates/beez5/javascript/md_stylechanger.js
Message: Object doesn't support this property or method
Line: 473
Char: 25
Code: 0
URI: http://www.hanseninfotech.com/rtds/media/system/js/mootools-core.js
Has anyone ever seen this or have any information on how to fix this?
if you use Firebug for Firefox, you'll see there is an error on md_stylechanger.js script.
As it seems you don't use it (it modifies size of fonts), get rid of the file.
And update to joomla 2.5, 1.7 won't be supported any more soon.

Resources