inherit
76320
0
Mar 10, 2013 16:11:20 GMT -8
Rob
140
April 2006
s84471
|
Post by Rob on Dec 15, 2007 18:08:53 GMT -8
Okay, I'm kinda new to Javascript, but I wrote this little script that removes the modify/delete post links from all the main admin's posts for everyone except the main admin.
<script type="text/javascript"> //This Script Was Written By Rob (s84471) <!-- var loc = new String(window.location) if(loc.indexOf("thread")>0 && !pb_username.match('admin')){ var iTd = document.getElementsByTagName('td') var deleteIf='delete|modify' for(var i=0;i<iTd.length;i++) { if(new String(iTd.item(i).width)=="20%" && iTd[i].innerHTML.indexOf("user=admin")>0) { if(iTd[i+1].getElementsByTagName('a')[1].innerHTML.match(deleteIf)) iTd[i+1].getElementsByTagName('a')[1].parentNode.removeChild(iTd[i+1].getElementsByTagName('a')[1]) if(iTd[i+1].getElementsByTagName('a')[1].innerHTML.match(deleteIf)) iTd[i+1].getElementsByTagName('a')[1].parentNode.removeChild(iTd[i+1].getElementsByTagName('a')[1]) } } } //--> </script>
It goes in the Global Footer
|
|