I hate any of IE but I tested with 7 at work for testing purposes: Single scroll bar but as you mentionned, no color syntax, which is normal for IE.
Double scrollbar in Chrome 8 is solved now.
Javascript cleaned up too.
Works in MSIE 9 now too.
Could anybody please test MSIE 7 and 8 ?
Looking good. Thanks for hashing these features out so quickly.
Some things in the code are kinda weird:
if(count > 0)
{
foundAnyPre=true;
}
else if(foundAnyPre)
{
SyntaxHighlighter.all();
return;
}
I don’t really see where foundAnyPre is useful … couldn’t you just:
if(count > 0)
{
SyntaxHighlighter.all();
return;
}
Also, what is the purpose of the delay? Are you waiting for the page to have content?
If so… just place that script directly before the tag. That way, when the script runs, the entire DOM will be ready for you to instantly query/fix. No need to delay.
The only thing I did was:
<style type="text/css">
div.code > div > div.syntaxhighlighter { overflow: hidden !important; }
</style>
:persecutioncomplex:
Looks great in Chrome / OSX here.
Disabled it in MSIE again. I’m not going to spend more time on that.
It seems to work fine in Firefox, after a delay.
Did you consider doing it server side? There is a PEAR package called Text_Highlighter that looks like it could do it.
I did consider it, but I really like not to have to mess to much with the SMF internals… for the moment, I think the client-side syntax highlighter is acceptable.
That IE crash happens because you are trying to manipulate the DOM before it has been completely loaded. See Woogley’s post for a quick fix.
I’m not a huge fan of jQuery, but at least it takes care of these things for you.
I already put it after the – it’s another problem in MSIE, and I will look into it later.
The syntax highlighting doesn’t scroll horizontally (on FireFox). Eg:
http://www.java-gaming.org/index.php/topic,22899.msg189422.html#msg189422
[quote]The syntax highlighting doesn’t scroll horizontally (on FireFox). Eg:
http://www.java-gaming.org/index.php/topic,22899.msg189422.html#msg189422
[/quote]
Meaning to report this too. Same problem on Chrome.
To fix the problem in chrome
change:
div.code > div > div.syntaxhighlighter {
overflow: hidden !important;
}
to:
div.code > div > div.syntaxhighlighter {
overflow: visible !important;
}
No idea if this breaks anything.
Please read the thread.
Please read my post.
Please hand me a toast.
@Topic:
Great job! That’s awesome 8)
Please direct me to the coast.
Fleas directly to the coat.
This boat will never float.