| 3 |
addLoadEvent(mediumvoteClassAutoAttach); |
addLoadEvent(mediumvoteClassAutoAttach); |
| 4 |
} |
} |
| 5 |
|
|
| 6 |
|
function getTextContent(node) { |
| 7 |
|
var text = ''; |
| 8 |
|
if(node) { |
| 9 |
|
if(node.children) { |
| 10 |
|
text = GetTextContent(node.firstChild); |
| 11 |
|
} else { |
| 12 |
|
if(node.nodeValue) { |
| 13 |
|
// ie |
| 14 |
|
text = node.nodeValue; |
| 15 |
|
} else { |
| 16 |
|
// firefox |
| 17 |
|
text = node.textContent; |
| 18 |
|
} |
| 19 |
|
} |
| 20 |
|
} |
| 21 |
|
return text; |
| 22 |
|
} |
| 23 |
|
|
| 24 |
function mediumvoteClassAutoAttach() { |
function mediumvoteClassAutoAttach() { |
| 25 |
var vdb = []; |
var vdb = []; |
| 26 |
var spans = document.getElementsByTagName('span'); |
var spans = document.getElementsByTagName('span'); |
| 35 |
span.removeAttribute('title'); |
span.removeAttribute('title'); |
| 36 |
|
|
| 37 |
// remove href link |
// remove href link |
| 38 |
var elem = document.getElementById(id); |
if (document.getElementById) |
| 39 |
elem.innerHTML = elem.textContent; |
var elem = document.getElementById(id); |
| 40 |
|
else if (document.all) |
| 41 |
|
var elem = document.all[id]; |
| 42 |
|
else if (document.layers) |
| 43 |
|
var elem = document.layers[id]; |
| 44 |
|
|
| 45 |
|
elem.innerHTML = getTextContent(elem); |
| 46 |
|
|
| 47 |
// Create an object with this uri. Because |
// Create an object with this uri. Because |
| 48 |
// we feed in the span as an argument, we'll be able |
// we feed in the span as an argument, we'll be able |
| 81 |
|
|
| 82 |
// update the display |
// update the display |
| 83 |
document.getElementById(vdb.id).innerHTML = string; |
document.getElementById(vdb.id).innerHTML = string; |
| 84 |
|
if (document.getElementById) |
| 85 |
|
document.getElementById(vdb.id).innerHTML = string; |
| 86 |
|
else if (document.all) |
| 87 |
|
document.all[vdb.id].innerHTML = string; |
| 88 |
|
else if (document.layers) |
| 89 |
|
document.all[vdb.id].innerHTML = string; |
| 90 |
} |
} |