Bureaucrats, Check users, Interface administrators, Push subscription managers, Suppressors, Administrators, upwizcampeditors
1,713
edits
No edit summary |
No edit summary |
||
Line 61: | Line 61: | ||
var node = nodes.snapshotItem(i); | var node = nodes.snapshotItem(i); | ||
// find the person's name in the node, and surround it with a span | // find the person's name in the node, and surround it with a span and change the color to purple | ||
var | var name = node.textContent.match(/(.*?)(\s|$)/)[1]; | ||
var newNode = document.createElement('span'); | |||
node. | newNode.textContent = name; | ||
newNode.style.color = 'purple'; | |||
node.replaceChild(newNode, node.firstChild); | |||
} | } | ||
edits