button close

This commit is contained in:
ericrius1 2016-02-16 15:21:18 -08:00
parent bf21bc2d48
commit d9d0e78dc5

View file

@ -420,16 +420,26 @@ function prepareSettingsForExport() {
exportSettings[key] = settings[key];
});
return JSON.stringify(exportSettings);
return JSON.stringify(exportSettings, null, 4);
}
function showPreselectedPrompt() {
var elem = document.getElementById("exported-props");
var exportSettings = prepareSettingsForExport();
elem.innerHTML = "";
var buttonnode= document.createElement('input');
buttonnode.setAttribute('type','button');
buttonnode.setAttribute('value','close');
elem.appendChild(document.createTextNode("COPY THE BELOW TO CLIPBOARD:"));
elem.appendChild(document.createElement("br"));
elem.appendChild(document.createTextNode(exportSettings));
elem.select();
document.execCopy('copy');
elem.appendChild(document.createElement("br"));
elem.appendChild(buttonnode);
buttonnode.onclick = function() {
console.log("click")
elem.innerHTML = "";
}
//window.alert("Ctrl-C to copy, then Enter.", prepareSettingsForExport());
}