favicon.ico with CherryPy 3.2.2 - cherrypy

I am running CherryPy 3.2.2 under Python 3.2.2 (coincidence!). I include in my server configuration the element:
"/favicon.ico":
{
"tools.staticfile.on": True,
"tools.staticfile.filename":
"/myhome/myserver/favicon.ico"
},
However the server does not show my icon in my browser's address bar. Any hints?
To be more precise, in Chrome and in Firefox, the icon does show up in the tab label but not in the address bar; in Seamonkey it does appear in both -- that's what I would like it to do under any browser. Maybe it is not a CherryPy problem?
-- tsf

It appears to be working correctly. There is no way to get favicon to be in the url bar for certain browsers...
why doesn't the favicon file show in the address bar of google chrome?

Related

iFrameResizer plugin not resizing iframe

I have implemented the iFrameResizer plugin here with the following settings:
$('#iframeResizer').iFrameResize({
log : true,
scrolling : true,
enablePublicMethods : true, // Enable methods within iFrame hosted page
heightCalculationMethod : 'lowestElement'
});
and the iframeSizer.contentWindow.min.js has been added to the iframe content window - I can see that the scroll bars are working which tells me the iFrame Resizer plugin has been implemented correctly - but the height is not resizing correctly??
Here are the console results
I thought perhaps maybe the problem could be from the iFrame content being hosted on a secure server????
If anybody is able to offer some advice or suggestions I'd really appreciate it.
You need to set the checkOrigin option.
https://github.com/davidjbradshaw/iframe-resizer/blob/master/docs/parent_page/options.md#checkorigin

Error when installing Hosted Chrome Extension

I built a chrome extension. I don't want to host it (yet) in the chrome webstore. I want to self host it. I have packaged the .crx, and deployed it to my localhost. Here is the code I use to serve it:
app.get('/myext.crx', function(req, res){
var file = __dirname + '/public/myext.crx';
res.download(file);
});
Then I have an anchor tag that points to the file:
Install <strong>myExt for Chrome</strong>
When it downloads, it has the correct content-type header (per the instructions http://developer.chrome.com/extensions/hosting.html). Here is the info from the Network tab in Chrome Devtools when I click the anchor:
**Response Headers**
Connection:keep-alive
Content-Description:File Transfer
Content-disposition:attachment; filename=myext.crx
Content-type:application/x-chrome-extension
Date:Sat, 14 Dec 2013 07:09:46 GMT
Transfer-Encoding:chunked
X-Powered-By:Express
It all looks good, but Chrome still shows me the yellow banner error saying "Apps, extensions, and user scripts cannot be added from this website".
Am I missing a setting in the manifest? Can someone tell me what the issue is? Does it have anything to do with the fact that I am serving on localhost and the "homepage_url" and the "update_url" both point to my actual domain name?
Anyone, please.
UPDATE
It downloads the file, but gives me the aforementioned error. If I open Tools > Extensions and then drag the file from the bottom of Chrome onto the Extensions page, it won't install it. Nothing happens. HOWEVER, if I open a Finder window and drag it from the Finder window onto Tools > Extensions page, it installs fine.
Not sure if this info helps or not.
Chrome is starting to block extension installs that are not from the Chrome Web Store. If you don't want an extension to be fully published in the CWS, you can limit the audience with the publish to test accounts or accessible by URL only features.

Browser detection problems

I have a website that will be displayed in all browser but I need it to display an alert box on load only in Firefox.
How can I detect the browser and specify that if it is mozilla the alert should pop up?
You could include jQuery in your website and try the following code:
if ($.browser.mozilla) {
alert( "this is mozilla!" ); // popup if the browser is mozilla
}
PS: Bear in mind that all Mozilla derivates are recognised here.

How to access developer tools (network log) from my extension

I'm writing an extension in Google chrome and Opera
I need to watch for specific URLs loaded, when i type one url in the address bar.
example:
if i goto www.google.com, it will load couple of other urls / images, etc.. those will be shown in Developer tools->Network.
Is there anyway, i can access that log from my extension background page?
Please let me know
Not really, but you can listen for load events that will fire on the images inside the page:
document.addEventListener('load', function(e){ /* e.target is a newly loaded image */ }, true)
Whether this solves your problem depends on what your use case is exactly..

sencha touch :: is it possible (and how) to open a website inside a panel or in external browser window?

i wonder if and how it is possible to open a website inside a panel or in an external browser window of the mobile safari! I tried to open a website inside a panel but due to crossdomain problems only the htm without the css was loaded.
any ideas?
thnx!
edit: let's say, we use phoneGap
As far as I know, cross-domain issues do block you from IFRAME solutions for displaying external links inside your app.
Best solution currently is to have links include target="_blank" to force a new browser window to open.
#Stevanicus #Dalar It does open a new window in Mobile Safari if you use Phonegap and allowed domains using phonegap.plist whitelist property, but if you do somthing like
var rateMsg = Ext.Msg.confirm('Title', 'Some message', function(e) {
if(e == 'yes')//If user confirms yes
{
window.open("http://www.example.com", "_blank");//We open a link with _blank to use mobile safari and not your webview
}
});
It does not work.

Resources