<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: FIxing text/plain HTML in Firefox</title>
	<atom:link href="http://www.kryogenix.org/days/2005/03/21/textplain/feed" rel="self" type="application/rss+xml" />
	<link>http://www.kryogenix.org/days/2005/03/21/textplain</link>
	<description>scratched tallies on the prison wall</description>
	<pubDate>Fri, 29 Aug 2008 01:16:33 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: sil</title>
		<link>http://www.kryogenix.org/days/2005/03/21/textplain#comment-6969</link>
		<dc:creator>sil</dc:creator>
		<pubDate>Wed, 19 Apr 2006 13:22:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/adpb/2005/03/21/textplain/#comment-6969</guid>
		<description>Anonymous: no idea, I'm afraid.</description>
		<content:encoded><![CDATA[<p>Anonymous: no idea, I&#8217;m afraid.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.kryogenix.org/days/2005/03/21/textplain#comment-6967</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Wed, 19 Apr 2006 01:47:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/adpb/2005/03/21/textplain/#comment-6967</guid>
		<description>does this not work with safari or...?</description>
		<content:encoded><![CDATA[<p>does this not work with safari or&#8230;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil Ringnalda</title>
		<link>http://www.kryogenix.org/days/2005/03/21/textplain#comment-482</link>
		<dc:creator>Phil Ringnalda</dc:creator>
		<pubDate>Thu, 01 Jan 1970 01:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/adpb/2005/03/21/textplain/#comment-482</guid>
		<description>&lt;p&gt;Would attaching yourself as an onload handler work? The otherwise annoying flicker as it fully renders as text and then re-renders as &lt;span class="caps"&gt;HTML&lt;/span&gt; might serve as a handy warning, to remind you of what&#8217;s happening when it inevitably converts a plain text source example you didn&#8217;t want converted.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Would attaching yourself as an onload handler work? The otherwise annoying flicker as it fully renders as text and then re-renders as <span class="caps">HTML</span> might serve as a handy warning, to remind you of what&#8217;s happening when it inevitably converts a plain text source example you didn&#8217;t want converted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sil</title>
		<link>http://www.kryogenix.org/days/2005/03/21/textplain#comment-483</link>
		<dc:creator>sil</dc:creator>
		<pubDate>Thu, 01 Jan 1970 01:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/adpb/2005/03/21/textplain/#comment-483</guid>
		<description>&lt;p&gt;Phil: you&#8217;re too clever for words. I didn&#8217;t think of that. I&#8217;ll have a crack at that one, I think.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Phil: you&#8217;re too clever for words. I didn&#8217;t think of that. I&#8217;ll have a crack at that one, I think.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.kryogenix.org/days/2005/03/21/textplain#comment-484</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Thu, 01 Jan 1970 01:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/adpb/2005/03/21/textplain/#comment-484</guid>
		<description>&lt;p&gt;For issue one, you could &lt;span class="caps"&gt;HEAD&lt;/span&gt; the host with &lt;span class="caps"&gt;XML&lt;/span&gt;HttpRequest to get the content-type. Not a lot of code involved with that as evidenced with the rewrite of my response header viewer favelet.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>For issue one, you could <span class="caps">HEAD</span> the host with <span class="caps">XML</span>HttpRequest to get the content-type. Not a lot of code involved with that as evidenced with the rewrite of my response header viewer favelet.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy Dunck</title>
		<link>http://www.kryogenix.org/days/2005/03/21/textplain#comment-485</link>
		<dc:creator>Jeremy Dunck</dc:creator>
		<pubDate>Thu, 01 Jan 1970 01:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/adpb/2005/03/21/textplain/#comment-485</guid>
		<description>&lt;p&gt;Stuart,&lt;br /&gt;
You are indeed correct that the cause is where Greasemonkey hooks in.&lt;br /&gt;
We&#8217;re using &lt;span class="caps"&gt;DOM&lt;/span&gt;ContentLoaded, an unpublisized Moz-specific event which has the benefit of occuring before rendering but after the &lt;span class="caps"&gt;DOM&lt;/span&gt; is loaded.&lt;br /&gt;
This is the first mention of trouble we&#8217;ve had, and I&#8217;d generally say that avoiding the flicker problems associated w/ hooking in later are more valuable than allowing replacement of the &lt;span class="caps"&gt;DOM&lt;/span&gt;.&lt;/p&gt;

	&lt;p&gt;Phil&#8217;s solution is indeed a good approach.&lt;/p&gt;

	&lt;p&gt;Good data, but I don&#8217;t think this qualifies as a GM bug, do you?&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Stuart,<br />
You are indeed correct that the cause is where Greasemonkey hooks in.<br />
We&#8217;re using <span class="caps">DOM</span>ContentLoaded, an unpublisized Moz-specific event which has the benefit of occuring before rendering but after the <span class="caps">DOM</span> is loaded.<br />
This is the first mention of trouble we&#8217;ve had, and I&#8217;d generally say that avoiding the flicker problems associated w/ hooking in later are more valuable than allowing replacement of the <span class="caps">DOM</span>.</p>
<p>Phil&#8217;s solution is indeed a good approach.</p>
<p>Good data, but I don&#8217;t think this qualifies as a GM bug, do you?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sil</title>
		<link>http://www.kryogenix.org/days/2005/03/21/textplain#comment-486</link>
		<dc:creator>sil</dc:creator>
		<pubDate>Thu, 01 Jan 1970 01:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/adpb/2005/03/21/textplain/#comment-486</guid>
		<description>&lt;p&gt;Jeremy: I agree that it&#8217;s not a GM bug, which is why I haven&#8217;t filed one :)&lt;br /&gt;
I shall just addEventListener() an onload handler instead, as Phil suggested. No idea why I didn&#8217;t think of this myself; must have been being thick that day.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Jeremy: I agree that it&#8217;s not a GM bug, which is why I haven&#8217;t filed one :)<br />
I shall just addEventListener() an onload handler instead, as Phil suggested. No idea why I didn&#8217;t think of this myself; must have been being thick that day.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Donnelly</title>
		<link>http://www.kryogenix.org/days/2005/03/21/textplain#comment-487</link>
		<dc:creator>Bill Donnelly</dc:creator>
		<pubDate>Thu, 01 Jan 1970 01:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/adpb/2005/03/21/textplain/#comment-487</guid>
		<description>&lt;p&gt;what&#8217;s the status of this project?&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>what&#8217;s the status of this project?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sil</title>
		<link>http://www.kryogenix.org/days/2005/03/21/textplain#comment-488</link>
		<dc:creator>sil</dc:creator>
		<pubDate>Thu, 01 Jan 1970 01:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/adpb/2005/03/21/textplain/#comment-488</guid>
		<description>&lt;p&gt;Bill: it&#8217;s in &#8220;I&#8217;ll do it when I get a sufficiently round tuit&#8221; state. Meanwhile, the bookmarklet referenced above does do the work required.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Bill: it&#8217;s in &#8220;I&#8217;ll do it when I get a sufficiently round tuit&#8221; state. Meanwhile, the bookmarklet referenced above does do the work required.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Donnelly</title>
		<link>http://www.kryogenix.org/days/2005/03/21/textplain#comment-489</link>
		<dc:creator>Bill Donnelly</dc:creator>
		<pubDate>Thu, 01 Jan 1970 01:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/adpb/2005/03/21/textplain/#comment-489</guid>
		<description>The bookmarklet above doesn&#8217;t work for me
(in the one case I tried it on;
and I don&#8217;t like the code, anyway),
and I didn&#8217;t want to wait for a solution,
so I decided to mess with it myself.
&#160;
Here is my rather elegant solution
(if I do say so myself; and I often do)
as a bookmarklet that I will make into a GmScript.
Whether I publish it, or not, will depend on
what others come up with, if anything.
&#160;
&lt;span class="caps"&gt;SPOILER ALERT&lt;/span&gt;! Don&#8217;t look at the following code
if you want to solve the problem yourself.
&#160;
&lt;big&gt;&lt;tt&gt;javascript:(function()
{var sDoc=window.document.body.innerHTML;
if(sDoc.substr(0,11)==&#8221;&lt;pre&gt;&#60;span&#62;"&#38;&#38;
sDoc.search(/&#38;lt;html&#38;gt;/i)!=-1&#38;&#38;
sDoc.search(/&#38;lt;\/html&#38;gt;/i)!=-1){
sDoc=sDoc.substr(11).substr(0,sDoc.length-24);
window.document.open();
window.document.writeln(sDoc.replace(/&#38;([gl])t;/g,
function(pStr,pP1,pOffset,pS){
return(pP1=='g'?'&#62;':'&#60;')}));
window.document.close();}})();&#60;/tt&#62;&#60;/big&#62;
&#38;nbsp;
(I had to mess with the code to make it
display correctly here -- hope it worked)</description>
		<content:encoded><![CDATA[<p>The bookmarklet above doesn&#8217;t work for me<br />
(in the one case I tried it on;<br />
and I don&#8217;t like the code, anyway),<br />
and I didn&#8217;t want to wait for a solution,<br />
so I decided to mess with it myself.<br />
&nbsp;<br />
Here is my rather elegant solution<br />
(if I do say so myself; and I often do)<br />
as a bookmarklet that I will make into a GmScript.<br />
Whether I publish it, or not, will depend on<br />
what others come up with, if anything.<br />
&nbsp;<br />
<span class="caps">SPOILER ALERT</span>! Don&#8217;t look at the following code<br />
if you want to solve the problem yourself.<br />
&nbsp;<br />
<big><tt>javascript:(function()<br />
{var sDoc=window.document.body.innerHTML;<br />
if(sDoc.substr(0,11)==&#8221;
<pre>&lt;span&gt;"&amp;&amp;
sDoc.search(/&amp;lt;html&amp;gt;/i)!=-1&amp;&amp;
sDoc.search(/&amp;lt;\/html&amp;gt;/i)!=-1){
sDoc=sDoc.substr(11).substr(0,sDoc.length-24);
window.document.open();
window.document.writeln(sDoc.replace(/&amp;([gl])t;/g,
function(pStr,pP1,pOffset,pS){
return(pP1=='g'?'&gt;':'&lt;')}));
window.document.close();}})();&lt;/tt&gt;&lt;/big&gt;
&amp;nbsp;
(I had to mess with the code to make it
display correctly here -- hope it worked)</pre>
<p></tt></big></p>
]]></content:encoded>
	</item>
</channel>
</rss>
