Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- //<![CDATA[
- // add smileys to following classes:
- var clss = ["post-body", "comment-body", "comment-body-author", "recent-comment-body"];
- for (var x=0 ; x < clss.length; x++ )
- {
- var d = document.getElementsByClassName(clss[x]);
- for(var i=0;i<d.length;i++){
- var htm = d[i].innerHTML;
- htm = htm.replace(/(>|\s|^)(:\)(,|\.|\s|<|$))/g, '$1<img alt=":)" src="http://oi55.tinypic.com/2462gkg.jpg" class="emoticon" />$3');
- htm = htm.replace(/(>|\s|^)(;\)(,|\.|\s|<|$))/g, '$1<img alt=";)" src="http://oi56.tinypic.com/20j6cdj.jpg" class="emoticon" />$3');
- htm = htm.replace(/(>|\s|^)(:\((,|\.|\s|<|$))/g, '$1<img alt=":(" src="http://oi52.tinypic.com/2my3x3b.jpg" class="emoticon" />$3');
- htm = htm.replace(/(>|\s|^)(:D)(,|\.|\s|<|$)/g, '$1<img alt=":D" src="http://oi52.tinypic.com/157ek4h.jpg" class="emoticon" />$3');
- htm = htm.replace(/(>|\s|^)(:p)(,|\.|\s|<|$)/gi, '$1<img alt=":p" src="http://oi54.tinypic.com/iwkj05.jpg" class="emoticon" />$3');
- htm = htm.replace(/(>|\s|^)(;\()(,|\.|\s|<|$)/g, '$1<img alt=";(" src="http://oi51.tinypic.com/wr8e1.jpg" class="emoticon" />$3');
- d[i].innerHTML = htm;
- }
- }
- //]]>
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement