Let\'s say I have window.open (without name parameter), scattered in my project and I want to change the implementation so that wherever name is not specified I\'ll specify
P.s. In simple terms what I want to do is override the window.open functionality.
var orgOpen = window.open; window.open = function (...args) { alert("Overrided!"); return orgOpen(...args); } window.open("http://www.stackoverflow.com");