1

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!

Gabriel Nahmias
  • 920
  • 3
  • 15
  • 20
  • 1
    You could add events to the elements to create a duplicate element before it gets destroyed. Haven't tried this out, but in theory it should work. – Mahesh Velaga Aug 14 '13 at 14:30
  • 2
    I don't know that I want to help you... I like being able to remove the popup and going on my merry way... – Ryan Aug 14 '13 at 15:32

1 Answers1

1

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.

runfaj
  • 393
  • 3
  • 17