From: Bob M. <mce...@dr...> - 2001-08-06 04:47:49
|
John F Waymouth [way...@WP...] wrote: > > Although it's not necessary to use diff if you build up a list of changes > as Rewrite does its work. Yup, that's what I intend. > Well, I suppose this solution works. Though if you eval, as opposed to > use, you're not going to do the import call that use does (unless you call > it yourself) I meant: eval "use $file"; if($@) ... > > If the answer is no...the only *proper* way to do it is to write a whole > > lot of code along the lines of http://localhost:8888/Source.html?get=%%% > > Ick. I just can't be happy with that, it doesn't settle right with me... > Furthermore, I'm not even sure how to urlencode in javascript. Well, it turned out to be pretty easy. Two files, maybe 15 lines extra total. (Attached -- to use it, add $agent to the "use vars" list at the beginning of FilterProxy.pl, and change "my $agent" to be just "$agent" on line 171). And escaping in javascript turned out to be trivial, it's a function called "escape"... heh. This method also opens the door wide up to marking up or reformatting the source. This bit of javascript, when bookmarked, will act like "view source". javascript:void open("http://chani:8888/Source.html?url=" + escape(document.location), "source"); > I don't think we'll hit a max URI length problem. I'm not sure there IS > such a maximum, but plenty of sites out there use HUGE query strings. There is, it is implementation dependent, 4096 bytes is most common, I think, but I've seen people complain about implementations that use 1024 bytes. I know this isn't exactly what you wanted John, but take a look at the attached files and let me know what you think. Cheers, -- Bob P.S. I added a workaround for the Mozilla reload-hang. 0.29.2 "Real Soon Now". Bob McElrath (rsm...@st...) Univ. of Wisconsin at Madison, Department of Physics |