ex.ua [interface]

без реклами, текст, фон

当前为 2016-10-19 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name ex.ua [interface]
  3. // @namespace https://greasyfork.org/ru/scripts/4694-ex-ua-interface
  4. // @description без реклами, текст, фон
  5. // @author johny.zlo
  6. // @include http://ex.ua/*
  7. // @include https://ex.ua/*
  8. // @include http://*.ex.ua/*
  9. // @include https://*.ex.ua/*
  10. // @run-at document-start
  11. // @grant none
  12. // @version 2.32.4
  13. // ==/UserScript==
  14. (function () {
  15. var css = 'body {\nbackground: #fff\n;max-width: 1400px;\nmargin: auto;\n}\n\n\ntr{background-color: transparent;\n}\n\n*[style="margin-top: 24px;"] {\nmargin-top: 0 !important;\n}\n\na[onClick*="social"], div[id*="plusone"], #ad_block, a[href*="ad_click"], #announce, #ad_block_1, #ad_block_2, div[id*="adriver"] div[id*="ads"] {\ndisplay: none !important;\n}\n, #index_box {\ndisplay: none !important;\n}\n, #announce {\ndisplay: none !important;\n}\n\n.panel tr td {\nbackground: #fff;\n}\n\ndiv[style*="height: 28px;"] {\ndisplay: none !important;\n}\n\n.small_button {\nfont-size: large;\n}\n\n.button {\nfont-size: large;\n}\n\nselect.small {\nfont-size: medium;\npadding: 2px 5px;\n}\n\n.r_button a {\nbackground: #fff;\nfont-size: large;\nfont-weight:normal;}\n\ntable {\nmargin: 0 auto;\n}\n\n.copyright, table.include_0 td {\nbackground: #fff;\n}\n\nh1, h2 {\nfont-size: x-large;\nfont-weight:bold;\nfont-weight:normal;\n}\n\na[id*="play"] {\nbackground: #eee;\nfont-size: 15px;\npadding: 8px 20px;\n}\n\n#menu\n{border-right: 1px solid #ccc;\nborder-bottom: 1px solid #ccc;\nborder-left: 1px solid #ccc;\n\nz-index: 30;\n}\n\n#body_element\n{text-align: justify;\n}\n\n.r_button a\n{\nbackground: none repeat scroll 0% 0% #333;\nfont-size: large;\nfont-weight: bold; color: white;\n}\n.r_button a:hover\n{\ncolor: #333;\nbackground: none repeat scroll 0% 0% #white;\nbox-shadow: 0 0 10px rgba(0,0,0,0.5);\n}\n';
  16. if (typeof GM_addStyle != 'undefined') {
  17. GM_addStyle(css);
  18. } else if (typeof PRO_addStyle != 'undefined') {
  19. PRO_addStyle(css);
  20. } else if (typeof addStyle != 'undefined') {
  21. addStyle(css);
  22. } else {
  23. var heads = document.getElementsByTagName('head');
  24. if (heads.length > 0) {
  25. var node = document.createElement('style');
  26. node.type = 'text/css';
  27. node.appendChild(document.createTextNode(css));
  28. heads[0].appendChild(node);
  29. }
  30. }
  31. }) ();
  32. function load() {
  33. var playerList = player_list.split('},');
  34. for (var i = 0; i < 100; i++) {
  35. var name = 'play_' + i;
  36. var item = document.getElementById(name);
  37. if (item == undefined)
  38. return;
  39. var text = item.parentNode.parentNode.previousSibling.previousSibling.getElementsByTagName('a') [0].title
  40. var playerItem = JSON.parse(playerList[i] + '}');
  41. item.href = playerItem.url + '?' + text;
  42. }
  43. }
  44. var id;
  45. location.href = 'javascript:void(window.player_ad = 0)'; // remove player ad | unsafeWindow location hack
  46. // prevent loading ads scripts by DOMContentLoaded
  47. var scripts = document.getElementsByTagName('script');
  48. for (var J = scripts.length - 1; J >= 0; --J) {
  49. if (/(hit\.ua|adriver\.ru|mediacom\.com\.ua|adocean\.pl|ad_adriver\.html|vcdn\.biz)/i.test(scripts[J].src)) {
  50. console.log('Killed', scripts[J].src);
  51. scripts[J].parentNode.removeChild(scripts[J]);
  52. }
  53. }
  54. if (typeof GM_addStyle == 'undefined') {
  55. function GM_addStyle(css) {
  56. var head = document.getElementsByTagName('head') [0];
  57. if (head) {
  58. var style = document.createElement('style');
  59. style.type = 'text/css';
  60. style.appendChild(document.createTextNode(css));
  61. head.appendChild(style);
  62. }
  63. }
  64. }
  65. GM_addStyle('#search_box, #search_help, #search_line { left: auto; width: auto; height: auto; margin-bottom: auto; } #search_button { font-size: large; } #search_hint { position: absolute; left: 0; top: 3.5em; z-index: 1000; } #search_text { float: left; font-size: large; border-radius: 0; } #search_link { display: none !important } #search_help { text-align: left; line-height: 0; padding: 1em 0 } #search_help br { display: none } #search_form { padding: .0em } #menu { top: 0; }'); // remove search ad
  66. id = document.querySelector('td[valign="top"] > div[style^="height: 31px"]');
  67. if (id) id.parentNode.removeChild(id); // remove ads bar
  68. if (location.pathname == '/') {
  69. id = document.querySelector('table tr:nth-child(2) td[style^="padding: 0 16px"] > center > div');
  70. if (id && id.getAttribute('style') != 'margin-top: 24px;') id.parentNode.removeChild(id); // remove home page ad
  71. }
  72. id = document.getElementById('ad_block_1');
  73. if (id) id.parentNode.removeChild(id); // remove list ad1
  74. id = document.getElementById('ad_block_2');
  75. if (id) id.parentNode.removeChild(id); // remove list ad2
  76. if (document.readyState == 'complete')
  77. load();
  78. else
  79. window.addEventListener('load', load, false);