This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Batch creating or updating properties. | |
// | |
// (c) 2020 David Sara | |
var key = window.prompt("Please enter the property key", ""); | |
var value = window.prompt("Please enter the property value", ""); | |
$(selection).each(function (obj) { | |
obj.prop(key, value); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Delete all unused elements (not used in any View). | |
// | |
// (c) 2019 David Sara | |
function deleteUnusedElements() { | |
$("element").each(function(element) { | |
if($(element).objectRefs().isEmpty()) { | |
element.delete(); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Removes all properties from the model. | |
// | |
// (c) 2019 David Sara | |
function anonymize() { | |
$("element").each(function(element) { | |
properties = $(element).prop(); | |
if (properties.length > 0) { | |
properties.forEach(function(prop) { | |
element.removeProp(prop); |