Re: [fossil-users] Diff highlighting

2011-01-21 Thread Joshua Paine
On 01/21/2011 07:57 AM, Rene wrote: > I think that we better could do > > This has the benefit that if someone else want to do something on > load he could add it in the init function. It is not necessary to codify one inline init function--JavaScript programs can share event handlers without ha

Re: [fossil-users] Diff highlighting

2011-01-21 Thread Rene
On Fri, 21 Jan 2011 13:44:47 +0100, Dmitry Chestnykh wrote: > On Jan 21, 2011, at 1:30 PM, Rene wrote: > >> You could define every thing in the head and do >> >> > >> if { "fdiff" eq $current_page || "otherdiffed page" eq >> $current_page >> } { >>html " >> onload='DiffHighlighter.

Re: [fossil-users] Diff highlighting

2011-01-21 Thread Dmitry Chestnykh
On Jan 21, 2011, at 1:30 PM, Rene wrote: > You could define every thing in the head and do > > > if { "fdiff" eq $current_page || "otherdiffed page" eq $current_page > } { >html " > onload='DiffHighlighter.highlightElementsWithTagName(\'pre\')'" > } > >> > > This would have

Re: [fossil-users] Diff highlighting

2011-01-21 Thread Rene
On Thu, 20 Jan 2011 20:29:40 +0100, Dmitry Chestnykh wrote: > Hello, > > I've made a tiny simple diff highlighting for Fossil (well, > technically, for any HTML page) in JavaScript, and thought I'd share > it with you. > > Just put the following somewhere into Footer (not header!) above > : > > =

Re: [fossil-users] Diff highlighting

2011-01-20 Thread Dmitry Chestnykh
On Jan 20, 2011, at 9:50 PM, Stephan Beal wrote: > I guess this could be because of the conflict with other styles for pre, so > here's the improved version of the script and CSS: > > i think it was just cached css. i've already deployed it on some 20 repos, so > i'll keep it the way it is :).

Re: [fossil-users] Diff highlighting

2011-01-20 Thread Stephan Beal
On Thu, Jan 20, 2011 at 9:42 PM, Dmitry Chestnykh wrote: > I guess this could be because of the conflict with other styles for pre, so > here's the improved version of the script and CSS: > i think it was just cached css. i've already deployed it on some 20 repos, so i'll keep it the way it is :)

Re: [fossil-users] Diff highlighting

2011-01-20 Thread Dmitry Chestnykh
On Jan 20, 2011, at 8:42 PM, Stephan Beal wrote: > Thank you for sharing! i thought i'd report that this works beautifully on > Firefox but Chrome, though it does "see" the css (the DOM inspector shows the > properties your code applies), it isn't colorizing as it should. This is > almost certa

Re: [fossil-users] Diff highlighting

2011-01-20 Thread Stephan Beal
On Thu, Jan 20, 2011 at 9:28 PM, Dmitry Chestnykh wrote: > Interesting. Which version of Chrome and OS is it? I developed and tested > it with 8.0.552.237 on Mac, and it works. > 10.0.634.0 dev on Ubuntu. i later found that i had to tell Chrome about 37 times before it would re-load the css - the

Re: [fossil-users] Diff highlighting

2011-01-20 Thread Dmitry Chestnykh
On Jan 20, 2011, at 8:48 PM, Stephan Beal wrote: > Thank you for sharing! i thought i'd report that this works beautifully on > Firefox but Chrome, though it does "see" the css (the DOM inspector shows the > properties your code applies), it isn't colorizing as it should. This is > almost certa

Re: [fossil-users] Diff highlighting

2011-01-20 Thread Stephan Beal
On Thu, Jan 20, 2011 at 8:42 PM, Stephan Beal wrote: > Really cool - i'll be adding this to all of my repos :). > Here's an example, for those who don't want to try it out themselves: http://fossil.wanderinghorse.net/repos/cson/index.cgi/ci/f0af7c446a

Re: [fossil-users] Diff highlighting

2011-01-20 Thread Stephan Beal
On Thu, Jan 20, 2011 at 8:42 PM, Stephan Beal wrote: > Thank you for sharing! i thought i'd report that this works beautifully on > Firefox but Chrome, though it does "see" the css (the DOM inspector shows > the properties your code applies), it isn't colorizing as it should. This is > almost cer

Re: [fossil-users] Diff highlighting

2011-01-20 Thread Stephan Beal
On Thu, Jan 20, 2011 at 8:29 PM, Dmitry Chestnykh wrote: > I've made a tiny simple diff highlighting for Fossil (well, technically, > for any HTML page) in JavaScript, and thought I'd share it with you. > Thank you for sharing! i thought i'd report that this works beautifully on Firefox but Chrom

[fossil-users] Diff highlighting

2011-01-20 Thread Dmitry Chestnykh
Hello, I've made a tiny simple diff highlighting for Fossil (well, technically, for any HTML page) in JavaScript, and thought I'd share it with you. Just put the following somewhere into Footer (not header!) above : /* Simple diff highlighting */ var DiffHigh