Replace innerHTML part 1 (Gitlab issue #45)
Change all plain text and empty content from innerHTML to textContent
This commit is contained in:
@ -81,7 +81,7 @@ function refreshDirs() {
|
|||||||
if (listOfDirs.length > 0)
|
if (listOfDirs.length > 0)
|
||||||
dirsDiv.innerHTML = table.render()
|
dirsDiv.innerHTML = table.render()
|
||||||
else
|
else
|
||||||
dirsDiv.innerHTML = ""
|
dirsDiv.textContent = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var sortParam = "&key=" + sortKey + "&order=" + sortOrder
|
var sortParam = "&key=" + sortKey + "&order=" + sortOrder
|
||||||
@ -131,7 +131,7 @@ function configure(path) {
|
|||||||
|
|
||||||
function cancelConfig() {
|
function cancelConfig() {
|
||||||
var tableDiv = document.getElementById("dirConfig")
|
var tableDiv = document.getElementById("dirConfig")
|
||||||
tableDiv.innerHTML = ""
|
tableDiv.textContent = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
function sync(path) {
|
function sync(path) {
|
||||||
|
@ -91,7 +91,7 @@ function showCertificates(hostB64, infoHash) {
|
|||||||
hideLinkSpan.innerHTML = hideLink
|
hideLinkSpan.innerHTML = hideLink
|
||||||
|
|
||||||
var certSpan = document.getElementById("certificates-" + fetch.divId)
|
var certSpan = document.getElementById("certificates-" + fetch.divId)
|
||||||
certSpan.innerHTML = _t("Fetching Certificates")
|
certSpan.textContent = _t("Fetching Certificates")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xmlhttp.open("POST", "/MuWire/Certificate", true)
|
xmlhttp.open("POST", "/MuWire/Certificate", true)
|
||||||
@ -104,7 +104,7 @@ function hideCertificates(hostB64, infoHash) {
|
|||||||
certificateFetches.delete(id)
|
certificateFetches.delete(id)
|
||||||
|
|
||||||
var certSpan = document.getElementById("certificates-" + id)
|
var certSpan = document.getElementById("certificates-" + id)
|
||||||
certSpan.innerHTML = ""
|
certSpan.textContent = ""
|
||||||
|
|
||||||
var result = resultsByInfoHash.get(infoHash)
|
var result = resultsByInfoHash.get(infoHash)
|
||||||
var showLinkText
|
var showLinkText
|
||||||
@ -172,14 +172,14 @@ function refreshActive() {
|
|||||||
if (activeBrowses.length > 0)
|
if (activeBrowses.length > 0)
|
||||||
tableDiv.innerHTML = table.render()
|
tableDiv.innerHTML = table.render()
|
||||||
else
|
else
|
||||||
tableDiv.innerHTML = ""
|
tableDiv.textContent = ""
|
||||||
|
|
||||||
if (currentBrowse != null) {
|
if (currentBrowse != null) {
|
||||||
var newBrowse = browsesByHost.get(currentHost)
|
var newBrowse = browsesByHost.get(currentHost)
|
||||||
if (newBrowse == null || currentBrowse.revision < newBrowse.revision)
|
if (newBrowse == null || currentBrowse.revision < newBrowse.revision)
|
||||||
showResults(currentHost, currentBrowse.key, currentBrowse.descending)
|
showResults(currentHost, currentBrowse.key, currentBrowse.descending)
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("resultsTable").innerHTML = ""
|
document.getElementById("resultsTable").textContent = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -255,7 +255,7 @@ function showResults(host, key, descending) {
|
|||||||
if (resultsByInfoHash.size > 0)
|
if (resultsByInfoHash.size > 0)
|
||||||
tableDiv.innerHTML = table.render()
|
tableDiv.innerHTML = table.render()
|
||||||
else
|
else
|
||||||
tableDiv.innerHTML = ""
|
tableDiv.textContent = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var paramString = "/MuWire/Browse?section=results&host=" + browse.hostB64
|
var paramString = "/MuWire/Browse?section=results&host=" + browse.hostB64
|
||||||
@ -316,5 +316,5 @@ function hideComment(infoHash) {
|
|||||||
linkSpan.innerHTML = getShowCommentLink(infoHash)
|
linkSpan.innerHTML = getShowCommentLink(infoHash)
|
||||||
|
|
||||||
var commentSpan = document.getElementById("comment-"+infoHash)
|
var commentSpan = document.getElementById("comment-"+infoHash)
|
||||||
commentSpan.innerHTML = ""
|
commentSpan.textContent = ""
|
||||||
}
|
}
|
||||||
|
@ -195,7 +195,7 @@ function hideCertificateComment(divId, base64) {
|
|||||||
linkDiv.innerHTML = link
|
linkDiv.innerHTML = link
|
||||||
|
|
||||||
var commentDiv = document.getElementById("certificate-comment-" + divId + "_" + base64)
|
var commentDiv = document.getElementById("certificate-comment-" + divId + "_" + base64)
|
||||||
commentDiv.innerHTML = ""
|
commentDiv.textContent = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshCertificates() {
|
function refreshCertificates() {
|
||||||
|
@ -16,8 +16,8 @@ function refreshConnectionsCount() {
|
|||||||
image = "NotStarted.png";
|
image = "NotStarted.png";
|
||||||
connectionIcon.innerHTML = "<img src=\"images/" + image + "\" alt=\"\">";
|
connectionIcon.innerHTML = "<img src=\"images/" + image + "\" alt=\"\">";
|
||||||
} else {
|
} else {
|
||||||
connectionCountSpan.innerHTML = _t("Down");
|
connectionCountSpan.textContent = _t("Down");
|
||||||
connectionIcon.innerHTML = "";
|
connectionIcon.textContent = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ function cancelDownload(infoHash) {
|
|||||||
xmlhttp.onreadystatechange = function() {
|
xmlhttp.onreadystatechange = function() {
|
||||||
if (this.readyState == 4 && this.status == 200) {
|
if (this.readyState == 4 && this.status == 200) {
|
||||||
var downloadSpan = document.getElementById("download-"+infoHash);
|
var downloadSpan = document.getElementById("download-"+infoHash);
|
||||||
downloadSpan.innerHTML = "";
|
downloadSpan.textContent = "";
|
||||||
refreshDownloader();
|
refreshDownloader();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -179,11 +179,11 @@ function refreshDownloader() {
|
|||||||
var clearLink = new Link(_t("Clear Finished"), "clear", ["ignored"])
|
var clearLink = new Link(_t("Clear Finished"), "clear", ["ignored"])
|
||||||
clearDiv.innerHTML = clearLink.render()
|
clearDiv.innerHTML = clearLink.render()
|
||||||
} else {
|
} else {
|
||||||
downloadsDiv.innerHTML = ""
|
downloadsDiv.textContent = ""
|
||||||
clearDiv.innerHTML = ""
|
clearDiv.textContent = ""
|
||||||
downloader = null
|
downloader = null
|
||||||
var downloadDetailsDiv = document.getElementById("downloadDetails");
|
var downloadDetailsDiv = document.getElementById("downloadDetails");
|
||||||
downloadDetailsDiv.innerHTML = ""
|
downloadDetailsDiv.textContent = ""
|
||||||
}
|
}
|
||||||
if (downloader != null)
|
if (downloader != null)
|
||||||
updateDownloader(downloader);
|
updateDownloader(downloader);
|
||||||
|
@ -164,18 +164,18 @@ function refreshFeeds() {
|
|||||||
if (listOfFeeds.length > 0)
|
if (listOfFeeds.length > 0)
|
||||||
feedsDiv.innerHTML = table.render()
|
feedsDiv.innerHTML = table.render()
|
||||||
else
|
else
|
||||||
feedsDiv.innerHTML = ""
|
feedsDiv.textContent = ""
|
||||||
|
|
||||||
if (currentFeed != null) {
|
if (currentFeed != null) {
|
||||||
var updatedFeed = feeds.get(currentFeed)
|
var updatedFeed = feeds.get(currentFeed)
|
||||||
if (updatedFeed == null) {
|
if (updatedFeed == null) {
|
||||||
currentFeed = null
|
currentFeed = null
|
||||||
document.getElementById("itemsTable").innerHTML = ""
|
document.getElementById("itemsTable").textContent = ""
|
||||||
cancelConfig()
|
cancelConfig()
|
||||||
} else if (updatedFeed.revision > currentFeed.revision)
|
} else if (updatedFeed.revision > currentFeed.revision)
|
||||||
displayFeed(currentFeed)
|
displayFeed(currentFeed)
|
||||||
} else
|
} else
|
||||||
document.getElementById("itemsTable").innerHTML = ""
|
document.getElementById("itemsTable").textContent = ""
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -215,7 +215,7 @@ function displayFeed(feed) {
|
|||||||
if (items.length > 0)
|
if (items.length > 0)
|
||||||
itemsDiv.innerHTML = table.render()
|
itemsDiv.innerHTML = table.render()
|
||||||
else
|
else
|
||||||
itemsDiv.innerHTML = ""
|
itemsDiv.textContent = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var sortParam = "&key=" + itemsSortKey + "&order=" + itemsSortOrder
|
var sortParam = "&key=" + itemsSortKey + "&order=" + itemsSortOrder
|
||||||
@ -307,7 +307,7 @@ function configure(publisher) {
|
|||||||
|
|
||||||
function cancelConfig() {
|
function cancelConfig() {
|
||||||
var tableDiv = document.getElementById("feedConfig")
|
var tableDiv = document.getElementById("feedConfig")
|
||||||
tableDiv.innerHTML = ""
|
tableDiv.textContent = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
function showComment(infoHash) {
|
function showComment(infoHash) {
|
||||||
@ -328,7 +328,7 @@ function hideComment(infoHash) {
|
|||||||
expandedComments.delete(infoHash)
|
expandedComments.delete(infoHash)
|
||||||
|
|
||||||
var commentDiv = document.getElementById("comment-" + infoHash);
|
var commentDiv = document.getElementById("comment-" + infoHash);
|
||||||
commentDiv.innerHTML = ""
|
commentDiv.textContent = ""
|
||||||
|
|
||||||
var showLink = new Link(_t("Show Comment"), "showComment", [infoHash])
|
var showLink = new Link(_t("Show Comment"), "showComment", [infoHash])
|
||||||
var linkSpan = document.getElementById("comment-link-" + infoHash);
|
var linkSpan = document.getElementById("comment-link-" + infoHash);
|
||||||
@ -347,7 +347,7 @@ function showCertificates(hostB64, infoHash) {
|
|||||||
hideLinkSpan.innerHTML = hideLink.render()
|
hideLinkSpan.innerHTML = hideLink.render()
|
||||||
|
|
||||||
var certSpan = document.getElementById("certificates-" + fetch.divId)
|
var certSpan = document.getElementById("certificates-" + fetch.divId)
|
||||||
certSpan.innerHTML = _t("Fetching Certificates")
|
certSpan.textContent = _t("Fetching Certificates")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xmlhttp.open("POST", "/MuWire/Certificate", true)
|
xmlhttp.open("POST", "/MuWire/Certificate", true)
|
||||||
@ -360,7 +360,7 @@ function hideCertificates(hostB64, infoHash) {
|
|||||||
certificateFetches.delete(id)
|
certificateFetches.delete(id)
|
||||||
|
|
||||||
var certSpan = document.getElementById("certificates-" + id)
|
var certSpan = document.getElementById("certificates-" + id)
|
||||||
certSpan.innerHTML = ""
|
certSpan.textContent = ""
|
||||||
|
|
||||||
var item = itemsByInfoHash.get(infoHash)
|
var item = itemsByInfoHash.get(infoHash)
|
||||||
var showLinkText
|
var showLinkText
|
||||||
|
@ -104,7 +104,7 @@ function refreshSearchers() {
|
|||||||
if (searchNodes.length > 0)
|
if (searchNodes.length > 0)
|
||||||
hitsDiv.innerHTML = table.render()
|
hitsDiv.innerHTML = table.render()
|
||||||
else
|
else
|
||||||
hitsDiv.innerHTML = ""
|
hitsDiv.textContent = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var sortParam = "&key=" + searchersSortKey + "&order=" + searchersSortOrder
|
var sortParam = "&key=" + searchersSortKey + "&order=" + searchersSortOrder
|
||||||
@ -138,7 +138,7 @@ function refreshDownloaders() {
|
|||||||
if (downloaders.length > 0)
|
if (downloaders.length > 0)
|
||||||
downloadersDiv.innerHTML = table.render()
|
downloadersDiv.innerHTML = table.render()
|
||||||
else
|
else
|
||||||
downloadersDiv.innerHTML = ""
|
downloadersDiv.textContent = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var sortParam = "&key=" + downloadersSortKey + "&order=" + downloadersSortOrder
|
var sortParam = "&key=" + downloadersSortKey + "&order=" + downloadersSortOrder
|
||||||
@ -175,7 +175,7 @@ function refreshCertificates() {
|
|||||||
if (certificates.length > 0)
|
if (certificates.length > 0)
|
||||||
certsDiv.innerHTML = table.render()
|
certsDiv.innerHTML = table.render()
|
||||||
else
|
else
|
||||||
certsDiv.innerHTML = ""
|
certsDiv.textContent = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var sortParam = "&key=" + certificatesSortKey + "&order=" + certificatesSortOrder
|
var sortParam = "&key=" + certificatesSortKey + "&order=" + certificatesSortOrder
|
||||||
@ -223,7 +223,7 @@ function hideComment(id) {
|
|||||||
commentLinkDiv.innerHTML = showLink.render()
|
commentLinkDiv.innerHTML = showLink.render()
|
||||||
|
|
||||||
var commentDiv = document.getElementById("comment-" + id)
|
var commentDiv = document.getElementById("comment-" + id)
|
||||||
commentDiv.innerHTML = ""
|
commentDiv.textContent = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
var path = null
|
var path = null
|
||||||
|
@ -113,14 +113,14 @@ function refreshStatus(noRefresh) {
|
|||||||
|
|
||||||
var count = xmlDoc.getElementsByTagName("Count")[0].childNodes[0].nodeValue
|
var count = xmlDoc.getElementsByTagName("Count")[0].childNodes[0].nodeValue
|
||||||
var countSpan = document.getElementById("count")
|
var countSpan = document.getElementById("count")
|
||||||
countSpan.innerHTML = count
|
countSpan.textContent = count
|
||||||
|
|
||||||
var hashingSpan = document.getElementById("hashing")
|
var hashingSpan = document.getElementById("hashing")
|
||||||
var hashing = xmlDoc.getElementsByTagName("Hashing")
|
var hashing = xmlDoc.getElementsByTagName("Hashing")
|
||||||
if (hashing != null && hashing.length == 1) {
|
if (hashing != null && hashing.length == 1) {
|
||||||
hashingSpan.innerHTML = "Hashing "+hashing[0].childNodes[0].nodeValue
|
hashingSpan.textContent = "Hashing "+hashing[0].childNodes[0].nodeValue
|
||||||
} else
|
} else
|
||||||
hashingSpan.innerHTML = "";
|
hashingSpan.textContent = "";
|
||||||
|
|
||||||
var newRevision = parseInt(xmlDoc.getElementsByTagName("Revision")[0].childNodes[0].nodeValue)
|
var newRevision = parseInt(xmlDoc.getElementsByTagName("Revision")[0].childNodes[0].nodeValue)
|
||||||
if (newRevision > treeRevision) {
|
if (newRevision > treeRevision) {
|
||||||
@ -264,7 +264,7 @@ function unshare(nodeId) {
|
|||||||
|
|
||||||
function showCommentForm(nodeId) {
|
function showCommentForm(nodeId) {
|
||||||
var linkSpan = document.getElementById("comment-link-"+nodeId)
|
var linkSpan = document.getElementById("comment-link-"+nodeId)
|
||||||
linkSpan.innerHTML=""
|
linkSpan.textContent=""
|
||||||
var commentDiv = document.getElementById("comment-"+nodeId)
|
var commentDiv = document.getElementById("comment-"+nodeId)
|
||||||
|
|
||||||
var node = nodesById.get(nodeId)
|
var node = nodesById.get(nodeId)
|
||||||
@ -281,7 +281,7 @@ function showCommentForm(nodeId) {
|
|||||||
|
|
||||||
function cancelComment(nodeId) {
|
function cancelComment(nodeId) {
|
||||||
var commentDiv = document.getElementById("comment-"+nodeId)
|
var commentDiv = document.getElementById("comment-"+nodeId)
|
||||||
commentDiv.innerHTML = ""
|
commentDiv.textContent = ""
|
||||||
|
|
||||||
var node = nodesById.get(nodeId)
|
var node = nodesById.get(nodeId)
|
||||||
node.updateDiv()
|
node.updateDiv()
|
||||||
@ -347,4 +347,4 @@ function unpublish(nodeId) {
|
|||||||
xmlhttp.open("POST", "/MuWire/Feed", true)
|
xmlhttp.open("POST", "/MuWire/Feed", true)
|
||||||
xmlhttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
xmlhttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||||
xmlhttp.send("action=unpublish&file=" + encodedPath)
|
xmlhttp.send("action=unpublish&file=" + encodedPath)
|
||||||
}
|
}
|
||||||
|
@ -60,14 +60,14 @@ function refreshStatus() {
|
|||||||
|
|
||||||
var count = xmlDoc.getElementsByTagName("Count")[0].childNodes[0].nodeValue
|
var count = xmlDoc.getElementsByTagName("Count")[0].childNodes[0].nodeValue
|
||||||
var countSpan = document.getElementById("count")
|
var countSpan = document.getElementById("count")
|
||||||
countSpan.innerHTML = count
|
countSpan.textContent = count
|
||||||
|
|
||||||
var hashingSpan = document.getElementById("hashing")
|
var hashingSpan = document.getElementById("hashing")
|
||||||
var hashing = xmlDoc.getElementsByTagName("Hashing")
|
var hashing = xmlDoc.getElementsByTagName("Hashing")
|
||||||
if (hashing != null && hashing.length == 1) {
|
if (hashing != null && hashing.length == 1) {
|
||||||
hashingSpan.innerHTML = _t("Hashing") + " " +hashing[0].childNodes[0].nodeValue
|
hashingSpan.textContent = _t("Hashing") + " " +hashing[0].childNodes[0].nodeValue
|
||||||
} else
|
} else
|
||||||
hashingSpan.innerHTML = "";
|
hashingSpan.textContent = "";
|
||||||
|
|
||||||
var newRevision = parseInt(xmlDoc.getElementsByTagName("Revision")[0].childNodes[0].nodeValue)
|
var newRevision = parseInt(xmlDoc.getElementsByTagName("Revision")[0].childNodes[0].nodeValue)
|
||||||
if (newRevision > tableRevision) {
|
if (newRevision > tableRevision) {
|
||||||
@ -133,7 +133,7 @@ function refreshTable() {
|
|||||||
if (filesList.length > 0 )
|
if (filesList.length > 0 )
|
||||||
tableDiv.innerHTML = table.render()
|
tableDiv.innerHTML = table.render()
|
||||||
else
|
else
|
||||||
tableDiv.innerHTML = ""
|
tableDiv.textContent = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var sortParam = "&key=" + sortKey + "&order=" + sortOrder
|
var sortParam = "&key=" + sortKey + "&order=" + sortOrder
|
||||||
@ -164,7 +164,7 @@ function unshare(fileId) {
|
|||||||
|
|
||||||
function showCommentForm(nodeId) {
|
function showCommentForm(nodeId) {
|
||||||
var linkSpan = document.getElementById("comment-link-"+nodeId)
|
var linkSpan = document.getElementById("comment-link-"+nodeId)
|
||||||
linkSpan.innerHTML=""
|
linkSpan.textContent=""
|
||||||
var commentDiv = document.getElementById("comment-"+nodeId)
|
var commentDiv = document.getElementById("comment-"+nodeId)
|
||||||
|
|
||||||
var node = filesByPath.get(nodeId)
|
var node = filesByPath.get(nodeId)
|
||||||
@ -181,7 +181,7 @@ function showCommentForm(nodeId) {
|
|||||||
|
|
||||||
function cancelComment(nodeId) {
|
function cancelComment(nodeId) {
|
||||||
var commentDiv = document.getElementById("comment-"+nodeId)
|
var commentDiv = document.getElementById("comment-"+nodeId)
|
||||||
commentDiv.innerHTML = ""
|
commentDiv.textContent = ""
|
||||||
|
|
||||||
var commentLink = new Link(_t("Comment"), "showCommentForm", [nodeId])
|
var commentLink = new Link(_t("Comment"), "showCommentForm", [nodeId])
|
||||||
|
|
||||||
|
@ -537,7 +537,7 @@ function hideComment(id) {
|
|||||||
expandedComments.delete(id)
|
expandedComments.delete(id)
|
||||||
|
|
||||||
var commentDiv = document.getElementById("comment-" + id);
|
var commentDiv = document.getElementById("comment-" + id);
|
||||||
commentDiv.innerHTML = ""
|
commentDiv.textContent = ""
|
||||||
|
|
||||||
var showLink = "<a href='#' onclick='window.showCommentBy" + refreshType + "(\"" + id + "\"); return false;'>" + _t("Show Comment") + "</a>";
|
var showLink = "<a href='#' onclick='window.showCommentBy" + refreshType + "(\"" + id + "\"); return false;'>" + _t("Show Comment") + "</a>";
|
||||||
var linkSpan = document.getElementById("comment-link-"+id);
|
var linkSpan = document.getElementById("comment-link-"+id);
|
||||||
@ -559,7 +559,7 @@ function download(resultInfoHash) {
|
|||||||
|
|
||||||
function markTrusted(host) {
|
function markTrusted(host) {
|
||||||
var linkSpan = document.getElementById("trusted-link-"+host)
|
var linkSpan = document.getElementById("trusted-link-"+host)
|
||||||
linkSpan.innerHTML = ""
|
linkSpan.textContent = ""
|
||||||
|
|
||||||
var textAreaSpan = document.getElementById("trusted-"+host)
|
var textAreaSpan = document.getElementById("trusted-"+host)
|
||||||
|
|
||||||
@ -578,7 +578,7 @@ function markNeutral(host) {
|
|||||||
|
|
||||||
function markDistrusted(host) {
|
function markDistrusted(host) {
|
||||||
var linkSpan = document.getElementById("distrusted-link-"+host)
|
var linkSpan = document.getElementById("distrusted-link-"+host)
|
||||||
linkSpan.innerHTML = ""
|
linkSpan.textContent = ""
|
||||||
|
|
||||||
var textAreaSpan = document.getElementById("distrusted-"+host)
|
var textAreaSpan = document.getElementById("distrusted-"+host)
|
||||||
|
|
||||||
@ -603,7 +603,7 @@ function submitDistrust(host) {
|
|||||||
|
|
||||||
function cancelTrust(host) {
|
function cancelTrust(host) {
|
||||||
var textAreaSpan = document.getElementById("trusted-" + host)
|
var textAreaSpan = document.getElementById("trusted-" + host)
|
||||||
textAreaSpan.innerHTML = ""
|
textAreaSpan.textContent = ""
|
||||||
|
|
||||||
var linkSpan = document.getElementById("trusted-link-"+host)
|
var linkSpan = document.getElementById("trusted-link-"+host)
|
||||||
var html = "<a href='#' onclick='markTrusted(\"" + host + "\"); return false;'>" + _t("Mark Trusted") + "</a>"
|
var html = "<a href='#' onclick='markTrusted(\"" + host + "\"); return false;'>" + _t("Mark Trusted") + "</a>"
|
||||||
@ -612,7 +612,7 @@ function cancelTrust(host) {
|
|||||||
|
|
||||||
function cancelDistrust(host) {
|
function cancelDistrust(host) {
|
||||||
var textAreaSpan = document.getElementById("distrusted-" + host)
|
var textAreaSpan = document.getElementById("distrusted-" + host)
|
||||||
textAreaSpan.innerHTML = ""
|
textAreaSpan.textContent = ""
|
||||||
|
|
||||||
var linkSpan = document.getElementById("distrusted-link-"+host)
|
var linkSpan = document.getElementById("distrusted-link-"+host)
|
||||||
var html = "<a href='#' onclick='markDistrusted(\"" + host + "\"); return false;'>" + _t("Mark Distrusted") + "</a>"
|
var html = "<a href='#' onclick='markDistrusted(\"" + host + "\"); return false;'>" + _t("Mark Distrusted") + "</a>"
|
||||||
@ -672,7 +672,7 @@ function viewCertificatesByFile(fileSenderB64, count) {
|
|||||||
linkSpan.innerHTML = hideLink
|
linkSpan.innerHTML = hideLink
|
||||||
|
|
||||||
var fetchSpan = document.getElementById("certificates-" + fetch.divId)
|
var fetchSpan = document.getElementById("certificates-" + fetch.divId)
|
||||||
fetchSpan.innerHTML = _t("Fetching Certificates")
|
fetchSpan.textContent = _t("Fetching Certificates")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xmlhttp.open("POST", "/MuWire/Certificate", true)
|
xmlhttp.open("POST", "/MuWire/Certificate", true)
|
||||||
@ -685,7 +685,7 @@ function hideCertificatesByFile(fileSenderB64, count) {
|
|||||||
certificateFetches.delete(id) // TODO: propagate cancel to core
|
certificateFetches.delete(id) // TODO: propagate cancel to core
|
||||||
|
|
||||||
var fetchSpan = document.getElementById("certificates-" + id)
|
var fetchSpan = document.getElementById("certificates-" + id)
|
||||||
fetchSpan.innerHTML = ""
|
fetchSpan.textContent = ""
|
||||||
|
|
||||||
var linkSpan = document.getElementById("certificates-link-" + id)
|
var linkSpan = document.getElementById("certificates-link-" + id)
|
||||||
var linkText
|
var linkText
|
||||||
@ -711,7 +711,7 @@ function viewCertificatesBySender(fileInfoHash, count) {
|
|||||||
linkSpan.innerHTML = hideLink
|
linkSpan.innerHTML = hideLink
|
||||||
|
|
||||||
var fetchSpan = document.getElementById("certificates-" + fetch.divId)
|
var fetchSpan = document.getElementById("certificates-" + fetch.divId)
|
||||||
fetchSpan.innerHTML = _t("Fetching Certificates")
|
fetchSpan.textContent = _t("Fetching Certificates")
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -726,7 +726,7 @@ function hideCertificatesBySender(fileInfoHash, count) {
|
|||||||
certificateFetches.delete(id) // TODO: propagate cancel to core
|
certificateFetches.delete(id) // TODO: propagate cancel to core
|
||||||
|
|
||||||
var fetchSpan = document.getElementById("certificates-" + id)
|
var fetchSpan = document.getElementById("certificates-" + id)
|
||||||
fetchSpan.innerHTML = ""
|
fetchSpan.textContent = ""
|
||||||
|
|
||||||
var linkSpan = document.getElementById("certificates-link-" + id)
|
var linkSpan = document.getElementById("certificates-link-" + id)
|
||||||
var linkText = _t("View {0} Certificates", count)
|
var linkText = _t("View {0} Certificates", count)
|
||||||
@ -848,7 +848,7 @@ function refreshStatus() {
|
|||||||
if (statuses.length > 0)
|
if (statuses.length > 0)
|
||||||
activeDiv.innerHTML = table.render()
|
activeDiv.innerHTML = table.render()
|
||||||
else
|
else
|
||||||
activeDiv.innerHTML = ""
|
activeDiv.textContent = ""
|
||||||
|
|
||||||
if (uuid != null) {
|
if (uuid != null) {
|
||||||
var newStatus = statusByUUID.get(uuid)
|
var newStatus = statusByUUID.get(uuid)
|
||||||
@ -875,9 +875,9 @@ function stopSearch(searchUUID) {
|
|||||||
if (searchUUID == uuid) {
|
if (searchUUID == uuid) {
|
||||||
uuid = null
|
uuid = null
|
||||||
var element = document.getElementById("topTable" + refreshType)
|
var element = document.getElementById("topTable" + refreshType)
|
||||||
element.innerHTML = ""
|
element.textContent = ""
|
||||||
element = document.getElementById("bottomTable" + refreshType)
|
element = document.getElementById("bottomTable" + refreshType)
|
||||||
element.innerHTML = ""
|
element.textContent = ""
|
||||||
}
|
}
|
||||||
refreshStatus()
|
refreshStatus()
|
||||||
}
|
}
|
||||||
|
@ -9,12 +9,12 @@ function refreshStatus() {
|
|||||||
var hopelessHosts = this.responseXML.getElementsByTagName("HopelessHosts")[0].childNodes[0].nodeValue
|
var hopelessHosts = this.responseXML.getElementsByTagName("HopelessHosts")[0].childNodes[0].nodeValue
|
||||||
var timesBrowsed = this.responseXML.getElementsByTagName("TimesBrowsed")[0].childNodes[0].nodeValue
|
var timesBrowsed = this.responseXML.getElementsByTagName("TimesBrowsed")[0].childNodes[0].nodeValue
|
||||||
|
|
||||||
document.getElementById("incoming-connections").innerHTML = incomingConnections
|
document.getElementById("incoming-connections").textContent = incomingConnections
|
||||||
document.getElementById("outgoing-connections").innerHTML = outgoingConnections
|
document.getElementById("outgoing-connections").textContent = outgoingConnections
|
||||||
document.getElementById("known-hosts").innerHTML = knownHosts
|
document.getElementById("known-hosts").textContent = knownHosts
|
||||||
document.getElementById("failing-hosts").innerHTML = failingHosts
|
document.getElementById("failing-hosts").textContent = failingHosts
|
||||||
document.getElementById("hopeless-hosts").innerHTML = hopelessHosts
|
document.getElementById("hopeless-hosts").textContent = hopelessHosts
|
||||||
document.getElementById("times-browsed").innerHTML = timesBrowsed
|
document.getElementById("times-browsed").textContent = timesBrowsed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xmlhttp.open("GET", "/MuWire/Status", true);
|
xmlhttp.open("GET", "/MuWire/Status", true);
|
||||||
|
@ -110,7 +110,7 @@ var distrustedSortOrder = "descending"
|
|||||||
|
|
||||||
function markTrusted(user) {
|
function markTrusted(user) {
|
||||||
var linkSpan = document.getElementById("trusted-link-" + user)
|
var linkSpan = document.getElementById("trusted-link-" + user)
|
||||||
linkSpan.innerHTML = ""
|
linkSpan.textContent = ""
|
||||||
|
|
||||||
var textAreaSpan = document.getElementById("trusted-" + user)
|
var textAreaSpan = document.getElementById("trusted-" + user)
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ function submitTrust(user) {
|
|||||||
|
|
||||||
function cancelTrust(user) {
|
function cancelTrust(user) {
|
||||||
var textAreaSpan = document.getElementById("trusted-" + user)
|
var textAreaSpan = document.getElementById("trusted-" + user)
|
||||||
textAreaSpan.innerHTML = ""
|
textAreaSpan.textContent = ""
|
||||||
|
|
||||||
var linkSpan = document.getElementById("trusted-link-" + user)
|
var linkSpan = document.getElementById("trusted-link-" + user)
|
||||||
var html = "<a href='#' onclick='markTrusted(\"" + user + "\");return false;'>" + _t("Mark Trusted") + "</a>"
|
var html = "<a href='#' onclick='markTrusted(\"" + user + "\");return false;'>" + _t("Mark Trusted") + "</a>"
|
||||||
@ -143,7 +143,7 @@ function markNeutral(user) {
|
|||||||
|
|
||||||
function markDistrusted(user) {
|
function markDistrusted(user) {
|
||||||
var linkSpan = document.getElementById("distrusted-link-" + user)
|
var linkSpan = document.getElementById("distrusted-link-" + user)
|
||||||
linkSpan.innerHTML = ""
|
linkSpan.textContent = ""
|
||||||
|
|
||||||
var textAreaSpan = document.getElementById("distrusted-" + user)
|
var textAreaSpan = document.getElementById("distrusted-" + user)
|
||||||
|
|
||||||
@ -163,7 +163,7 @@ function submitDistrust(user) {
|
|||||||
|
|
||||||
function cancelDistrust(user) {
|
function cancelDistrust(user) {
|
||||||
var textAreaSpan = document.getElementById("distrusted-" + user)
|
var textAreaSpan = document.getElementById("distrusted-" + user)
|
||||||
textAreaSpan.innerHTML = ""
|
textAreaSpan.textContent = ""
|
||||||
|
|
||||||
var linkSpan = document.getElementById("distrusted-link-" + user)
|
var linkSpan = document.getElementById("distrusted-link-" + user)
|
||||||
var html = "<a href='#' onclick='markDistrusted(\"" + user + "\");return false;'>" + _t("Mark Distrusted") + "</a>"
|
var html = "<a href='#' onclick='markDistrusted(\"" + user + "\");return false;'>" + _t("Mark Distrusted") + "</a>"
|
||||||
@ -254,7 +254,7 @@ function displayTrustedList(user) {
|
|||||||
if (trusted.length > 0)
|
if (trusted.length > 0)
|
||||||
trustedDiv.innerHTML = table.render()
|
trustedDiv.innerHTML = table.render()
|
||||||
else
|
else
|
||||||
trustedDiv.innerHTML = ""
|
trustedDiv.textContent = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var sortParam = "&key=" + trustedSortKey + "&order=" + trustedSortOrder
|
var sortParam = "&key=" + trustedSortKey + "&order=" + trustedSortOrder
|
||||||
@ -286,7 +286,7 @@ function displayDistrustedList(user) {
|
|||||||
if (distrusted.length > 0)
|
if (distrusted.length > 0)
|
||||||
distrustedDiv.innerHTML = table.render()
|
distrustedDiv.innerHTML = table.render()
|
||||||
else
|
else
|
||||||
distrustedDiv.innerHTML = ""
|
distrustedDiv.textContent = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var sortParam = "&key=" + distrustedSortKey + "&order=" + distrustedSortOrder
|
var sortParam = "&key=" + distrustedSortKey + "&order=" + distrustedSortOrder
|
||||||
@ -336,13 +336,13 @@ function refreshLists() {
|
|||||||
if (listOfLists.length > 0)
|
if (listOfLists.length > 0)
|
||||||
trustListsDiv.innerHTML = table.render()
|
trustListsDiv.innerHTML = table.render()
|
||||||
else
|
else
|
||||||
trustListsDiv.innerHTML = ""
|
trustListsDiv.textContent = ""
|
||||||
|
|
||||||
if (currentUser != null)
|
if (currentUser != null)
|
||||||
displayList(currentUser)
|
displayList(currentUser)
|
||||||
else {
|
else {
|
||||||
document.getElementById("trusted").innerHTML = ""
|
document.getElementById("trusted").textContent = ""
|
||||||
document.getElementById("distrusted").innerHTML = ""
|
document.getElementById("distrusted").textContent = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ function subscribe(host) {
|
|||||||
|
|
||||||
function markTrusted(host) {
|
function markTrusted(host) {
|
||||||
var linkSpan = document.getElementById("trusted-link-"+host)
|
var linkSpan = document.getElementById("trusted-link-"+host)
|
||||||
linkSpan.innerHTML = ""
|
linkSpan.textContent = ""
|
||||||
|
|
||||||
var textAreaSpan = document.getElementById("trusted-"+host)
|
var textAreaSpan = document.getElementById("trusted-"+host)
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ function markNeutral(host) {
|
|||||||
|
|
||||||
function markDistrusted(host) {
|
function markDistrusted(host) {
|
||||||
var linkSpan = document.getElementById("distrusted-link-"+host)
|
var linkSpan = document.getElementById("distrusted-link-"+host)
|
||||||
linkSpan.innerHTML = ""
|
linkSpan.textContent = ""
|
||||||
|
|
||||||
var textAreaSpan = document.getElementById("distrusted-"+host)
|
var textAreaSpan = document.getElementById("distrusted-"+host)
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ function publishTrust(host, reason, trust) {
|
|||||||
|
|
||||||
function cancelTrust(host) {
|
function cancelTrust(host) {
|
||||||
var textAreaSpan = document.getElementById("trusted-" + host)
|
var textAreaSpan = document.getElementById("trusted-" + host)
|
||||||
textAreaSpan.innerHTML = ""
|
textAreaSpan.textContent = ""
|
||||||
|
|
||||||
var linkSpan = document.getElementById("trusted-link-"+host)
|
var linkSpan = document.getElementById("trusted-link-"+host)
|
||||||
var html = "<a href='#' onclick='markTrusted(\"" + host + "\"); return false;'>" + _t("Mark Trusted") + "</a>"
|
var html = "<a href='#' onclick='markTrusted(\"" + host + "\"); return false;'>" + _t("Mark Trusted") + "</a>"
|
||||||
@ -153,7 +153,7 @@ function cancelTrust(host) {
|
|||||||
|
|
||||||
function cancelDistrust(host) {
|
function cancelDistrust(host) {
|
||||||
var textAreaSpan = document.getElementById("distrusted-" + host)
|
var textAreaSpan = document.getElementById("distrusted-" + host)
|
||||||
textAreaSpan.innerHTML = ""
|
textAreaSpan.textContent = ""
|
||||||
|
|
||||||
var linkSpan = document.getElementById("distrusted-link-"+host)
|
var linkSpan = document.getElementById("distrusted-link-"+host)
|
||||||
var html = "<a href='#' onclick='markDistrusted(\"" + host + "\"); return false;'>" + _t("Mark Distrusted") + "</a>"
|
var html = "<a href='#' onclick='markDistrusted(\"" + host + "\"); return false;'>" + _t("Mark Distrusted") + "</a>"
|
||||||
@ -202,7 +202,7 @@ function refreshDistrustedUsers() {
|
|||||||
if (distrustedList.length > 0)
|
if (distrustedList.length > 0)
|
||||||
tableDiv.innerHTML = table.render()
|
tableDiv.innerHTML = table.render()
|
||||||
else
|
else
|
||||||
tableDiv.innerHTML = ""
|
tableDiv.textContent = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var sortParam = "&key=" + distrustedUsersSortKey + "&order=" + distrustedUsersSortOrder
|
var sortParam = "&key=" + distrustedUsersSortKey + "&order=" + distrustedUsersSortOrder
|
||||||
@ -240,7 +240,7 @@ function refreshTrustedUsers() {
|
|||||||
if (trustedList.length > 0)
|
if (trustedList.length > 0)
|
||||||
tableDiv.innerHTML = table.render()
|
tableDiv.innerHTML = table.render()
|
||||||
else
|
else
|
||||||
tableDiv.innerHTML = ""
|
tableDiv.textContent = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var sortParam = "&key=" + trustedUsersSortKey + "&order=" + trustedUsersSortOrder
|
var sortParam = "&key=" + trustedUsersSortKey + "&order=" + trustedUsersSortOrder
|
||||||
|
@ -50,8 +50,8 @@ function refreshUploads() {
|
|||||||
var clearLink = new Link(_t("Clear Finished"), "clear", ["ignored"])
|
var clearLink = new Link(_t("Clear Finished"), "clear", ["ignored"])
|
||||||
clearDiv.innerHTML = clearLink.render()
|
clearDiv.innerHTML = clearLink.render()
|
||||||
} else {
|
} else {
|
||||||
uploadsDiv.innerHTML = ""
|
uploadsDiv.textContent = ""
|
||||||
clearDiv.innerHTML = ""
|
clearDiv.textContent = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user