diff --git a/public/index.html b/public/index.html
index 859477a..2c9ca9a 100644
--- a/public/index.html
+++ b/public/index.html
@@ -319,9 +319,7 @@
Report
function addEntryToSubject(subject, predicate, objectValue) {
subject = "ff:" + subject.split("#")[1]
predicate = "ff:" + predicate.split("#")[1]
- searchSubjectNodeRecursively(userProfile, subject, (node) => {
- node[predicate] = objectValue
- })
+ searchSubjectNodeRecursively(userProfile, subject, (node) => node[predicate] = objectValue)
}
function instantiateNewObjectClassUnderSubject(subject, predicate, objectClass) {
@@ -358,20 +356,12 @@ Report
}
}
- function updateEntryValue(sKey, pKey, newValue) {
- searchSubjectNodeRecursively(userProfile, sKey, (node) => {
- node[pKey] = newValue
- })
- }
-
async function buildRemovalCell(td, sKey, pKey) {
td.textContent = "x"
td.addEventListener("click", async function() {
if (confirm("Do you want to remove this entry?")) {
console.log("Removing entry:", sKey, pKey)
- searchSubjectNodeRecursively(userProfile, sKey, (node) => {
- delete node[pKey]
- })
+ searchSubjectNodeRecursively(userProfile, sKey, (node) => delete node[pKey])
await finalizeProfileChanges()
}
})
@@ -391,7 +381,7 @@ Report
let input = prompt(`Enter new value for ${label}`)
if (input !== null) {
console.log("Changing entry value:", subject, predicate, "-->", input)
- updateEntryValue(subject, predicate, input)
+ searchSubjectNodeRecursively(userProfile, subject, (node) => node[predicate] = input)
await finalizeProfileChanges()
}
})