webbuild.html: restore setting cookies

This commit is contained in:
Silvan Calarco 2014-05-24 17:26:59 +02:00
parent 82ab9d49c9
commit 50d38312db

View File

@ -101,6 +101,7 @@ function ajax_getvalues(request,confirm) {
secret=getCookie("webbuild-secret"); secret=getCookie("webbuild-secret");
if (!secret) secret=""; if (!secret) secret="";
} }
if (confirm) { if (confirm) {
document.getElementById("status").innerHTML = document.getElementById("status").innerHTML =
'<div class=screencontainer><div class=opaquebackground></div>'+ '<div class=screencontainer><div class=opaquebackground></div>'+
@ -148,6 +149,10 @@ function ajax_getvalues(request,confirm) {
for (var i = 0; i < nodes.length; i++) { for (var i = 0; i < nodes.length; i++) {
if (nodes[i].nodeName == "title") { if (nodes[i].nodeName == "title") {
document.title = nodes[i].childNodes[0].nodeValue; document.title = nodes[i].childNodes[0].nodeValue;
} else if (nodes[i].nodeName == "cookie-user") {
setCookie("webbuild-user", nodes[i].childNodes[0].nodeValue, 1);
} else if (nodes[i].nodeName == "cookie-secret") {
setCookie("webbuild-secret", nodes[i].childNodes[0].nodeValue, 1);
} else if (document.getElementById(nodes[i].nodeName) != undefined) { } else if (document.getElementById(nodes[i].nodeName) != undefined) {
// var node = document.getElementById(nodes[i].nodeName) // var node = document.getElementById(nodes[i].nodeName)
//alert("replace " + node.nodeValue + "with " + nodes[i].childNodes[0].nodeValue); //alert("replace " + node.nodeValue + "with " + nodes[i].childNodes[0].nodeValue);