Remove version check and js tidyups

This commit is contained in:
Jonathan Corwin 2011-12-08 19:24:25 +00:00
parent 44eb1fb024
commit 15d5b97075
1 changed files with 22 additions and 20 deletions

View File

@ -130,22 +130,24 @@ sup {
var match = /-webkit-text-fill-color:[^;\"]+/gi;
if(timer != null)
clearTimeout(timer);
/* QtWebkit bug with outlines and justify causing outline alignment problems. (Bug 859950)
Surround each word with a <span> to workaround, but only in this scenario. */
if(webkitvers<=534.3){
/*
QtWebkit bug with outlines and justify causing outline alignment
problems. (Bug 859950) Surround each word with a <span> to workaround,
but only in this scenario.
*/
var txt = document.getElementById('lyricsmain');
if(window.getComputedStyle(txt).textAlign == 'justify'){
var outline = document.getElementById('lyricsoutline');
if(outline != null)
txt = outline;
if(window.getComputedStyle(txt).webkitTextStrokeWidth!="0px"){
newtext = '<span>' + newtext.replace(/[ ](?![^<]*>)/g, "</span> <span>") + '</span>';
}
if(window.getComputedStyle(txt).webkitTextStrokeWidth != '0px'){
newtext = '<span>' + newtext.replace(/[ ](?![^<]*>)/g,
'</span> <span>') + '</span>';
}
}
text_fade('lyricsmain', newtext);
text_fade('lyricsoutline', newtext);
text_fade('lyricsshadow', newtext.replace(match, ""));
text_fade('lyricsshadow', newtext.replace(match, ''));
if(text_opacity() == 1) return;
timer = setTimeout(function(){
show_text(newtext);