Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="module main">
- <div class="main-head">
- <div class="h3">
- <em class="fa fa-star-half-o"> </em> STAFF ONLINE
- </div>
- </div>
- <div class="main-content clearfix">
- <script type="text/javascript">
- myStaff = ['/u1', '/u2'];
- staff_cache_time = 4*60*1000; // mm*ss*ms;
- </script>
- <div id="theStaff">
- </div>
- <div style="display:none" id="theContent">
- </div><script type="text/javascript">
- if (localStorage.staffOn && localStorage.staffEx > +new Date - staff_cache_time) jQuery('#theStaff').html(localStorage.staffOn);
- else loadStaff();
- function loadStaff() {
- jQuery('#theContent').load('/viewonline #main-content a, a.gen', function() {
- 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">');
- if (!jQuery('#theStaff .myStaff').length) jQuery('#theStaff').html('Sem equipa moderação online.');
- jQuery('.myStaff a').each(function() {
- var href = jQuery(this).attr('href');
- 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() {
- if (window.localStorage) {
- localStorage.staffOn = jQuery('#theStaff').html();
- localStorage.staffEx = +new Date;
- }
- });
- });
- });
- }
- jQuery(document).ready(function(){ jQuery('.myStaff a').each(function() { var href = jQuery(this).attr('href');
- var mp = this.pathname; var user = mp.substring(2,7); var usert = "/privmsg?mode=post&u=";var mpuser = usert + user;
- 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>');
- });
- });
- </script><style type="text/css">.monAva img {
- height: 25px;
- width: 25px;
- margin-right: 5px;
- background: none repeat scroll 0 0 #FFF;
- border: 1px solid #d5d1c8;
- box-shadow: 0 2px 2px rgba(0,0,0,0.1);
- padding: 1px;
- }
- .monAva img:hover {
- border: 1px solid black;
- }
- .myStaff a {
- display:inline-block;
- vertical-align:top;
- margin-top:.75em;
- }
- .monPro {position: relative; left: 34px;top: -15px}
- </style>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement