iAlex
Junior Member
Posts: 73
|
Post by iAlex on Dec 13, 2007 4:01:11 GMT -5
When you send a private message to a certain user, this code will create a pop-up, with a certain message. You can put whatever you want in this message, such as asking people not to message you for support, or whatever. Simply edit the red text in the code with the username of the person who will have a pop-up when someone tries to message them, and the message that will appear. Here is a preview: ClickMain Footer. Cross Browser. Open Source. <script type="text/javascript"> <!--
/*Alert Before Private Messaging - By iAlex - Open Source*/
var iShwiftyFive=[ ["admin", "Please do not message the admin for support"], ["Username 2", "Pop-up Message 2"], ["Username 3", "Pop-up Message 3"] //No comma on last line ];
if(document.postForm && document.postForm.to){ if(document.addEventListener){ document.postForm.to.addEventListener('blur', iAllIWant, false); } else{ document.postForm.to.attachEvent('onblur', iAllIWant); } if(!location.href.match(/index.cgi$/)){ iAllIWant(); } } function iAllIWant(){ for(i=0;i<iShwiftyFive.length;i++){ iJunkiesTwoDollars=new RegExp(iShwiftyFive[0], "i"); if(document.postForm.to.value.match(iJunkiesTwoDollars)){ alert(iShwiftyFive[1]); } } }
//--> </script>
If you want the code to apply to more users, then continue to add this line: ["Username 4", "Pop-up Message 4"],
|
|