73,9 → 73,8 |
function pIqaD (button) |
{ |
klingon_texts = jsx.dom.xpath.evaluate( |
'.//*[@lang = "' + LANG_KLINGON + '"]' |
+ '//*[(not(@lang) or (@lang = "' + LANG_KLINGON + '"))' |
+ ' and (@class = "text")]', |
'.//*[@class = "text" and (@lang = "' + LANG_KLINGON |
+ '" or parent::*[@lang = "' + LANG_KLINGON + '"])]', |
document.body); |
|
if (!klingon_texts) |
89,7 → 88,7 |
{ |
var text = klingon_texts[i]; |
|
text.style.fontFamily = "'pIqaD', 'Constructium', 'Code2000'"; |
text.style.fontFamily = "pIqaD, Constructium, Code2000, serif"; |
text.style.fontSize = "90%"; |
|
if (!text.hasAttribute("data-html")) |
110,23 → 109,22 |
{ |
var text_node = text_nodes[j]; |
|
if (text_node.parentNode.lang != LANG_KLINGON) |
{ |
text_node.nodeValue = text_node.nodeValue.toUpperCase().replace( |
rxKlingon, |
function (s) { |
return jsx.object.getProperty(klingon_map, s.replace(/\s+/g, " "), s); |
}); |
} |
text_node.nodeValue = text_node.nodeValue.toUpperCase().replace( |
rxKlingon, |
function (s) { |
return jsx.object.getProperty(klingon_map, s.replace(/\s+/g, " "), s); |
}); |
} |
|
text.parentNode.lang = "tlh-pIqaD"; |
} |
|
if (button) |
if (button && lcars.language == LANG_KLINGON) |
{ |
media_caption = button.firstChild.textContent; |
button.setAttribute("data-caption", button.firstChild.textContent); |
button.firstChild.textContent = "Latin"; |
button.firstChild.style.fontFamily = ""; |
button.firstChild.style.fontSize = ""; |
} |
} |
|
142,5 → 140,8 |
text.parentNode.lang = "tlh-Latn"; |
} |
|
button.firstChild.textContent = media_caption; |
if (lcars.language == LANG_KLINGON) |
{ |
button.firstChild.textContent = button.getAttribute("data-caption"); |
} |
} |