So I'm trying to replace a javascript file on a website. I have tried using tamper monkey and developer tools, but none of them work? Thanks.
Original code
getAvatarUrl: function(avatar, type) {
if (!manifest[avatar])
avatar = 'base01';
var version = manifest[avatar][type];
return base_url + "/" + avatar + type + "." + version + ".png";
}
Overridden code
getAvatarUrl: function() {
return "Custom Image url";
}
Add the overridden code after the original code, as javascript interprets line by line. So add below code
After