INNER CODE UNIT · JavaScript
downloadIt
mikepenz/AboutLibraries · DEV/definition-file-builder/js/custom.js:1
function downloadIt() {
var libraryId = fixString(document.getElementsByName("libraryId")[0].value).toLowerCase().replace(/ /g, '').replace(/-/g, '_');
var xmlFile = generateXmlFile();
if(xmlFile != "") {
xmlFile = unescapeHTML(xmlFile);
download(xmlFile, 'library_' + libraryId + '_strings.xml', 'text/plain');
}
}
function doSomeMagic() {
var xmlFile = generateXmlFile();
if(xmlFile != "") {
document.getElementById("output").innerHTML = xmlFile;
Prism.highlightAll();
document.getElementById("output_container").removeAttribute("style");
}