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!
Asked
Active
Viewed 93 times
1
-
1You 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
-
2I 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 Answers
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
-
That's a really great breakdown. I'll give it a shot and see if it suffices—I'm sure it will. Thanks. – Gabriel Nahmias Sep 12 '13 at 01:18