I have a seemingly large problem at hand. I have a Javascript file, let's call it helloworld.js
. I can't edit that file at all. However, inside, there's a function named function buildDropdown(){}
.
I need to be able to make changes to that function only without editing the file. I can add another .js file after or before the helloworld.js file loads. I am guessing there must be a way to write patch .js file to overrides function buildDropdown(){}
. Is there an easy way in js to tell it to ignore the previous function buildDropdown(){}
and use my function buildDropdown(){}
that overrides it?