inherit
123128
0
Feb 3, 2020 13:53:38 GMT -8
Malagrond
Remember, remember the 5th of November.
813
April 2008
malagrond
|
Post by Malagrond on Feb 22, 2011 9:53:52 GMT -8
Description: This code introduces a small notification box on the bottom-right of the screen when the user receives a new PM. Note that this does not update in real time, as that would violate the TOS, but instead on each page-load.
Special thanks to SubDevo for making this Cross-Browser!
Global Header
<div id="pmsnotifbox" class="windowbg2" style="display: none;"></div> <script> <!-- /* New PM Notification Box by malagrond
Open-source, feel free to modify. */ if(pb_username!="Guest"){ var newpms = document.getElementsByTagName('td').item(2).innerHTML; (newpms.match(/are/gi)) ? newpms = newpms.split(" are")[0] : newpms = newpms.split(" is")[0]; newpms = newpms.toLowerCase().split("</a>, ")[1]; if(newpms != 0){ var n=document.getElementById("pmsnotifbox"); n.style.display=""; n.innerHTML = "<a href='?action=pm'>You have " + newpms + " new PM.</a>"; } } --> </script> <style type="text/css"> <!-- #pmsnotifbox { border: 1px solid #000; position: absolute; _right: expression( ignoreMe=2-document.body.scrollLeft+"px"); _bottom: expression( ignoreMe=2-document.body.scrollTop+"px"); padding: 4px; } body > #pmsnotifbox { position: fixed; bottom: 2px; right: 2px; } --> </style>
*fixed a closing bracket syntax error - Wormo 6-9-11
|
|