forked from openlp/openlp
Remove version check and js tidyups
This commit is contained in:
parent
44eb1fb024
commit
15d5b97075
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue