Advertisement
Guest User

s

a guest
Dec 14th, 2015
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.82 KB | None | 0 0
  1. <div class="module main">
  2.  
  3. <div class="main-head">
  4.  
  5. <div class="h3">
  6. <em class="fa fa-star-half-o"> </em> STAFF ONLINE
  7. </div>
  8.  
  9. </div>
  10.  
  11. <div class="main-content clearfix">
  12. <script type="text/javascript">
  13. myStaff = ['/u1', '/u2'];
  14. staff_cache_time = 4*60*1000; // mm*ss*ms;
  15. </script>
  16. <div id="theStaff">
  17.  
  18. </div>
  19.  
  20. <div style="display:none" id="theContent">
  21.  
  22. </div><script type="text/javascript">
  23.  
  24.  
  25. if (localStorage.staffOn && localStorage.staffEx > +new Date - staff_cache_time) jQuery('#theStaff').html(localStorage.staffOn);
  26. else loadStaff();
  27. function loadStaff() {
  28. jQuery('#theContent').load('/viewonline #main-content a, a.gen', function() {
  29. for (i=0; i<myStaff.length; i++) jQuery('#theContent a').filter(function() { return jQuery(this).attr('href') === myStaff[i] }).appendTo('#theStaff').wrap('<div class="myStaff">');
  30. if (!jQuery('#theStaff .myStaff').length) jQuery('#theStaff').html('Sem equipa moderação online.');
  31. jQuery('.myStaff a').each(function() {
  32. var href = jQuery(this).attr('href');
  33. jQuery(this).before('<span class="monAva"></span>').prev().load(href + ' #profile-advanced-right .module:first div img:first,.forumline td.row1.gensmall:first > img, .frm-set.profile-view.left dd img,dl.left-box.details:first dd img, .row1 b .gen:first img, .real_avatar img', function() {
  34. if (window.localStorage) {
  35. localStorage.staffOn = jQuery('#theStaff').html();
  36. localStorage.staffEx = +new Date;
  37. }
  38.  
  39. });
  40. });
  41. });
  42. }
  43.  
  44. jQuery(document).ready(function(){ jQuery('.myStaff a').each(function() { var href = jQuery(this).attr('href');
  45. var mp = this.pathname; var user = mp.substring(2,7); var usert = "/privmsg?mode=post&u=";var mpuser = usert + user;
  46. jQuery(this).after('<br><span class="monPro"> <a href='+href+'><img src="https://cdn1.iconfinder.com/data/icons/silk2/user_gray.png"></a> <a href='+mpuser+'><img src="https://cdn1.iconfinder.com/data/icons/silk2/page_white_edit.png"></a></span>');
  47. });
  48. });
  49. </script><style type="text/css">.monAva img {
  50. height: 25px;
  51. width: 25px;
  52. margin-right: 5px;
  53. background: none repeat scroll 0 0 #FFF;
  54. border: 1px solid #d5d1c8;
  55. box-shadow: 0 2px 2px rgba(0,0,0,0.1);
  56. padding: 1px;
  57. }
  58. .monAva img:hover {
  59. border: 1px solid black;
  60. }
  61. .myStaff a {
  62. display:inline-block;
  63. vertical-align:top;
  64. margin-top:.75em;
  65. }
  66. .monPro {position: relative; left: 34px;top: -15px}
  67. </style>
  68. </div>
  69.  
  70. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement