|
Hi,
I added the following lines to add the license type to the attribution:
var cc_lic = "";
var attr = document.evaluate("//img[@class='f-sprite fs-cc_icon_attribution_small']",
document, null, XPathResult.FIRST_ORDERED_NODE_TYPE,
null).singleNodeValue;
var nocomm = document.evaluate("//img[@class='f-sprite fs-cc_icon_noncomm_small']",
document, null, XPathResult.FIRST_ORDERED_NODE_TYPE,
null).singleNodeValue;
var noderr = document.evaluate("//img[@class='f-sprite fs-cc_icon_noderivs_small']",
document, null, XPathResult.FIRST_ORDERED_NODE_TYPE,
null).singleNodeValue;
var sa = document.evaluate("//img[@class='f-sprite fs-cc_icon_sharealike_small']",
document, null, XPathResult.FIRST_ORDERED_NODE_TYPE,
null).singleNodeValue;
if (attr) {
cc_lic = cc_lic + "by ";
}
if (nocomm) {
cc_lic = cc_lic + "nc ";
}
if (noderr) {
cc_lic = cc_lic + "nd";
} else if (sa) {
cc_lic = cc_lic + "sa";
}
I then included the cc_lic in the attribution line.
|