hwm_work_at_home

work

当前为 2015-07-24 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name hwm_work_at_home
  3. // @author Kopatych
  4. // ==UserScript==
  5. // @name work_hwm
  6. // @description work
  7. // @author Kopatych
  8. // @license MIT
  9. // @version 1.0.1
  10. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js
  11. // @include http://www.heroeswm.ru/*
  12. // @include http://qrator.heroeswm.ru/*
  13. // @include http://178.248.235.15/*
  14. // @include http://www.lordswm.com/*
  15. // @namespace https://greasyfork.org/users/13597
  16. // ==/UserScript==
  17.  
  18. (function (window, undefined) {
  19. var w;
  20. if (typeof unsafeWindow !== undefined) {
  21. w = unsafeWindow
  22. } else {
  23. w = window;
  24. }
  25.  
  26. if (w.self != w.top) {
  27. return;
  28. }
  29. var appendEmployeement = function(type)
  30. {
  31. $.get('http://www.heroeswm.ru/map.php?st='+type,
  32. {},
  33. function(html)
  34. {
  35. var html = $(html);
  36. var factories = null;;
  37. var factories = html.find('table .wb tbody tr:gt(3)');
  38. workBlock.append(factories);
  39. $('.work-space tr .wblight').remove();
  40. $('.work-space tr:contains(Тип)').remove();
  41. });
  42. }
  43. if (/\/home.php/.test(location.href)) {
  44. if (!this.GM_addStyle || (this.GM_addStyle.toString && this.GM_addStyle.toString().indexOf("not supported")>-1))
  45. {
  46. $('td [width = 55%]').append("</br></br><table class = 'work-space wb'></table>")
  47. var workBlock = $('.work-space');
  48. appendEmployeement('mn');
  49. appendEmployeement('fc');
  50. appendEmployeement('sh')
  51. };
  52. }
  53. })(window);