Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@resdac What if there is some sort of 3rd party framework involved, and AJAX requests aren't specified explicitly?
I had this. All I could do is attach to events, wait a bit for the data to be added to the DOM, and then parse the DOM and do the replacements. Well at least like that. Previous guy did code it as an interval. -
dayo30457yThere is only one occurrence of the produce name in our software and that is loaded on page load 😓
-
but what if the product name is in a h1 or p? Or what if a third party site refers to the old name?
Better just infect your clients with malware so you can install a network traffic sniffer which replaces all occurrences directly in the packets.
I just found this bit of code in our product :P
setInterval(function () {
$("body").find("div, td").replaceText("oldProductName", "newProductName" );
}, 50);
undefined