I am currently dealing with an outdated application that populates a div
by initiating a JavaScript function on a remote server and then injecting the resulting content into the DOM.
Interestingly, when using Firefox, the application unexpectedly alters all URL hosts to a different address.
This peculiar behavior does not occur in Chrome or IE.
Although I aim to resolve this issue by fixing the application itself, my immediate concern is whether it's feasible to write custom JavaScript code to "safeguard" certain elements within the document from being tampered with (such as the href
attribute of specific objects).
Is such protection even achievable?
Moreover, could there be a way to leverage developer tools in order to pinpoint the exact line of script causing the domain of my links to undergo changes?