I have a php website that is generating heck ton of <script> somefunction(...) </script>
The issue is that I don't really enjoy website with all those elements.
Is there a way to delete element after the function is called?
What I mean is that I would like it to do something like this:
<script>
somefunction();
delete_script_element();
</script>
and that delete_script_element() is able to get the element it called in, and then removes it, I guess simply by:
function delete_script_element() {
document."GetParentElement".remove();
}
I potentially can also put the code in each , but I still don't know how to target the parent element.
Any help appreciated ^^