| 6 |
req.onreadystatechange = function () { |
req.onreadystatechange = function () { |
| 7 |
if (req.readyState == 4) { |
if (req.readyState == 4) { |
| 8 |
if (req.status >= 200 && req.status < 400) { |
if (req.status >= 200 && req.status < 400) { |
| 9 |
var updates = eval ('(' + req.responseText + ')'); |
applyJaUpdates (eval ('(' + req.responseText + ')')); |
|
for (var hash in updates) { |
|
|
if (document.jaHashes[hash]) { |
|
|
for (var i in document.jaHashes[hash]) { |
|
|
applyJaEntry (document.jaHashes[hash][i], updates[hash]); |
|
|
} |
|
|
} |
|
|
if (document.jaRealHashes[hash]) { |
|
|
for (var i in document.jaRealHashes[hash]) { |
|
|
applyJaEntry (document.jaRealHashes[hash][i], updates[hash]); |
|
|
} |
|
|
} |
|
|
} |
|
| 10 |
} |
} |
| 11 |
} |
} |
| 12 |
}; // onreadystatechange |
}; // onreadystatechange |
| 110 |
form.getElementsByTagName ('output')[0].firstChild.data |
form.getElementsByTagName ('output')[0].firstChild.data |
| 111 |
= 'Save: ' + req.status + ' ' + req.statusText; |
= 'Save: ' + req.status + ' ' + req.statusText; |
| 112 |
if (req.status >= 200 && req.status < 400) { |
if (req.status >= 200 && req.status < 400) { |
|
applyJaEntry (targetNode, {ja: ta[1].value, isPattern: isPattern}); |
|
| 113 |
targetNode.jaForm = null; |
targetNode.jaForm = null; |
| 114 |
form.parentNode.removeChild (form); |
form.parentNode.removeChild (form); |
| 115 |
|
applyJaUpdates (eval ('(' + req.responseText + ')')); |
| 116 |
} |
} |
| 117 |
} |
} |
| 118 |
}; // onreadystatechange |
}; // onreadystatechange |
| 178 |
parent.insertBefore (insertedElement, prev.nextSibling); |
parent.insertBefore (insertedElement, prev.nextSibling); |
| 179 |
} // insertInterfaceElement |
} // insertInterfaceElement |
| 180 |
|
|
| 181 |
|
function applyJaUpdates (updates) { |
| 182 |
|
document.newEntries =updates; |
| 183 |
|
for (var hash in updates) { |
| 184 |
|
if (document.jaHashes[hash]) { |
| 185 |
|
for (var i in document.jaHashes[hash]) { |
| 186 |
|
applyJaEntry (document.jaHashes[hash][i], updates[hash]); |
| 187 |
|
} |
| 188 |
|
} |
| 189 |
|
if (document.jaRealHashes[hash]) { |
| 190 |
|
for (var i in document.jaRealHashes[hash]) { |
| 191 |
|
applyJaEntry (document.jaRealHashes[hash][i], updates[hash]); |
| 192 |
|
} |
| 193 |
|
} |
| 194 |
|
} |
| 195 |
|
} // applyJaUpdates |
| 196 |
|
|
| 197 |
function applyJaEntry (targetNode, entry) { |
function applyJaEntry (targetNode, entry) { |
| 198 |
if (entry.isPattern) { |
if (entry.isPattern) { |
| 199 |
targetNode.className += ' ja-not-patched'; |
targetNode.className += ' ja-not-patched'; |