1 // From Ted's Mozilla page: http://ted.mielczarek.org/code/mozilla/index.html
9 if(xwin) // for some reason onload gets called when the browser refreshes???
13 document.getElementById('ta').select();
19 xwin = window.open('about:blank', 'xulwin', 'chrome,all,resizable=yes,width=400,height=400');
24 function toggleBrowser(show)
26 document.getElementById("split").collapsed = !show;
27 document.getElementById("content").collapsed = !show;
28 document.getElementById("open").collapsed = !show;
33 var textarea = document.getElementById("ta");
35 // either this is the first time, or
36 // they closed the window
37 if(xwin == null || (xwin instanceof Window && xwin.document == null)) {
39 xwin = document.getElementById("content");
43 if (old != textarea.value || newwin) {
46 var dataURI = "data:application/vnd.mozilla.xul+xml," + encodeURIComponent(old);
47 if(xwin instanceof Window)
48 xwin.document.location = dataURI;
50 xwin.setAttribute("src",dataURI);
53 timeout = window.setTimeout(update, 500);
56 function resetTimeout()
59 window.clearTimeout(timeout);
61 timeout = window.setTimeout(update, 500);