Gabriel Nahmias
Gabriel Nahmias

Reputation: 978

Prevent Firebug from Removing HTML Elements

I'm sure we've all done it by now. A website pops up some goofy JavaScript modal preventing you from continuing. You whip out Firebug, inspect it, and hit Delete. Poof! Gone. Now, is there a way with JavaScript to recreate the element or disable that functionality altogether? Thanks!

Upvotes: 1

Views: 99

Answers (1)

runfaj
runfaj

Reputation: 392

Create a js reference to the element on page load. Add a listener to the element that looks for the destroy event. If that happens, then use your reference to recreate the item. The only issue is firebug might not fire a destroy event when an element is manually deleted. In that case, you could have a loop that checks every x milliseconds to see if the element is there. If it isn't, then create a new one.

Upvotes: 1

Related Questions