Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: firstRun.js

Issue 5244235691327488: Issue 2072 - Don`t duplicate 128x128 icon in Chrome builds (Closed)
Patch Set: Created March 2, 2015, 2:12 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « firstRun.html ('k') | skin/abp-128.png » ('j') | skin/firstRun.css » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: firstRun.js
===================================================================
--- a/firstRun.js
+++ b/firstRun.js
@@ -52,16 +52,27 @@
type: "app.get",
what: "doclink",
link: link
}, callback);
}
function onDOMLoaded()
{
+ // Set up logo image
+ var logo = E("logo");
+ logo.src = "skin/abp-128.png";
Sebastian Noack 2015/03/02 14:25:02 Can't you specify that URL in firstRun.html? DOMCo
Wladimir Palant 2015/03/02 14:28:51 No, that's not guaranteed. Over the web the browse
+ var errorCallback = function()
Sebastian Noack 2015/03/02 14:25:02 Why an anonymous function?
Wladimir Palant 2015/03/02 14:28:51 What exactly are you suggesting? A global function
Sebastian Noack 2015/03/02 14:32:16 Yes, I'm suggesting a nested named function. But i
+ {
+ logo.removeEventListener("error", errorCallback, false);
+ // We are probably in Chrome/Opera/Safari, the image has a different path.
+ logo.src = "icons/detailed/abp-128.png";
+ };
+ logo.addEventListener("error", errorCallback, false);
+
// Set up URLs
getDocLink("donate", function(link)
{
E("donate").href = link;
});
getDocLink("contributors", function(link)
{
« no previous file with comments | « firstRun.html ('k') | skin/abp-128.png » ('j') | skin/firstRun.css » ('J')

Powered by Google App Engine
This is Rietveld