ialex
New Member
Posts: 10
inherit
143112
0
May 29, 2010 13:09:41 GMT -8
ialex
10
July 2009
ialex
|
Post by ialex on Oct 18, 2007 18:51:36 GMT -8
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. <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>
|
|