/usr/share/xul-ext/unity/content/unity-favicon-utils.js is in xul-ext-unity 3.0.0+14.04.20140416-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | function findFaviconLink (document){
var linkElements = document.getElementsByTagName("link");
var i = 0;
for (i = 0; i < linkElements.length; i++){
var element = linkElements[i];
if (element.hasAttribute("rel") &&
(element.rel == "shortcut icon")) {
var link = element.href;
if (link[0] == "/") {
return document.location + link;
} else {
return link;
}
}
}
return null;
}
UnityFaviconUtils = {
getFaviconForDocument: function (document) {
var favIcon = findFaviconLink (document);
if (favIcon == null) {
favIcon = "http://" + document.domain + "/favicon.ico";
}
return favIcon;
}
}
var EXPORTED_SYMBOLS = ["UnityFaviconUtils"];
|