Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name RU-Board WhosOnline
- // @author Zloy_Gelud
- // @namespace http://userscripts.org/scripts/show/159445
- // @include http*://forum.ru-board.com/topic.cgi?forum=*
- // @include http*://forum.ru-board.com/forum.cgi?forum=bm*
- // @include http*://72.233.112.78/topic.cgi?forum=*
- // @icon http://forum.ru-board.com/favicon.ico
- // @description Highlights users online
- // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
- // @version 0.3
- // @run-at document-end
- // ==/UserScript==
- $(document).ready(function () {
- $.ajax({
- type: "GET",
- url: "http://forum.ru-board.com/whosonline.cgi",
- cache: false,
- success: function (data) {
- var Users = [];
- var html = $.parseHTML(data);
- $('tr.dats td:first-child b a', $(html)).each(function (col) {
- Users[$(this).html()] = true;
- });
- $('a.m b, tr[bgcolor="#FFFFFF"] td:last-child.dats>a', $(document)).each(function (user) {
- if (Users[$(this).html()]) {
- var img = $('<img>');
- img.attr({
- src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAACXBIWXMAAAsTAAALEwEAmpwYAAABEElEQVR42mM49OggAxIWBGI1IDaFYjWoGFwNskJzIA4A4jQgLoXiNKiYOUwjTANIIBuIW4F4PhBvgeL5ULFsqBoGmOkgU1o33t1wuuZsxfuQfX5/Q3b5/q0+VvZ+4631p6GaQGoEGaDuBFk9H6R49rXp/4Hs/7vv7/o/9cyk/xV7S95DbQKpUWOAeg7k3i0he/3+Hnh44P/US1P/d57p+L/kyqL/vgtc/0KdB1JjiqIheIfv3613tvzvPtP1v/VU8/+5F2b995rhjKEB7qTKQ6Xvp56e+H/xlYX/Z1+Y+X/CoZ7/xStyMZwE9/SGm+tOV+wqfu892/mv5xTHv0XLct6vu7gGw9MkBytZEUd00gAARYOFZ55QF90AAAAASUVORK5CYII=",
- style: "position: relative; top: 3px; left: 2px"
- });
- img.appendTo($(this));
- } else {
- var img = $('<img>');
- img.attr({
- src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAUUlEQVR42m2N0QnAMAgFM0cG9Ts76Sr+Jy6guIDNC22h0I+Dxx1oI6K+GRu9we4NQ0TKzA7YcAgKkZkVEbXWQtA3QLr7JwxmPmLOWdjPqd/nF/ZXX3eu6yUJAAAAAElFTkSuQmCC",
- style: "position: relative; top: -1px; left: 4px"
- });
- img.appendTo($(this));
- }
- });
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement