XHEditor - How to disable onbeforeunload dialog

I am using this extension:


I’d like to disable the “onbeforeunload” dialog, and I don’t know how.


I doubt anyone can help you directly. But you can try to help yourself. The javascript files distributed with that extension are, for whatever reason, minified. Find the unminified source first, then in your text editor, CTRL+F for "beforeunload".

Thanks for your quick response… I am still hoping a javascript guru could come up with some smart way of doing it. What is worst is that the dialog include the text being edited, which is absolutely crazy. I can live with the dialog without the text… and all google searches, only give points in Chinese.

You can unminify the js files with tools like this one: http://www.gosu.pl/decoder/

Looking for “beforeunload” in the unminified version of xheditor-en.js seems to point to the function getSource, on line 958. It might not be that function, you’ll have to analyze the code throughfuly. firebug can help here.

Or if you have a live (and simple) page publicly, I could have a look at it. Please replace all the js sources with their unminified versions to make it easy for me.

Thanks again, I will look at this a bit deeper later this week. It is spring brake here in USA, and the kids are home. :slight_smile:

I’d like to let you all know I fixed this download the 1.0RC1 from their web site.