65,14 → 65,13 |
// return flipped; |
//}; |
|
var media_caption; |
|
var media_script_used = false; |
|
function mediaScript (button) |
{ |
vulcan_texts = jsx.dom.xpath.evaluate( |
'.//*[@lang = "' + LANG_VULCAN + '"]//*[(not(@lang) or (@lang = "' + LANG_VULCAN + '")) and (@class = "text")]', |
'.//*[@class = "text" and (@lang = "' + LANG_VULCAN |
+ '" or parent::*[@lang = "' + LANG_VULCAN + '"])]', |
document.body); |
|
if (!vulcan_texts) |
80,8 → 79,6 |
return; |
} |
|
var previous_parent = null; |
|
for (var i = 0, len = vulcan_texts.length; i < len; ++i) |
{ |
var text = vulcan_texts[i]; |
105,8 → 102,6 |
{ |
var text_node = text_nodes[j]; |
|
if (text_node.parentNode.lang != LANG_VULCAN) |
{ |
text_node.nodeValue = text_node.nodeValue.replace( |
rxVulcan, |
function (s) { |
113,14 → 108,13 |
return jsx.object.getProperty(media_map, s.replace(/\s+/g, " ").toUpperCase(), s); |
}); |
} |
} |
|
text.parentNode.lang = "vuh-Media-Gol-modern"; |
} |
|
if (button) |
if (button && lcars.language == LANG_VULCAN) |
{ |
media_caption = button.firstChild.textContent; |
button.setAttribute("data-caption", button.firstChild.textContent); |
button.firstChild.textContent = "Latin-Zukitan"; |
} |
|
138,7 → 132,10 |
text.parentNode.lang = "vuh-Latn-Gol-modern"; |
} |
|
button.firstChild.textContent = media_caption; |
if (lcars.language == LANG_VULCAN) |
{ |
button.firstChild.textContent = button.getAttribute("data-caption"); |
} |
|
media_script_used = false; |
} |