RU AdList JS Fixes

try to take over the world!

Old: v20180629.0 - 2018-06-29 - Update for 4pda
New: v20180713.0 - 2018-07-13 - Fixed popup windows on Google Clouds: https://console.cloud.google.com/apis/credentials (add key and then try to remove) Why would you call setAttribute without any parameters?! Well, when you touching browser APIs you have to expect EVERYTHING.

  • --- /tmp/diffy20250519-2672012-jkoxcc 2025-05-19 00:27:04.838104642 +0000
  • +++ /tmp/diffy20250519-2672012-rl4k3z 2025-05-19 00:27:04.840104664 +0000
  • @@ -1,7 +1,7 @@
  • // ==UserScript==
  • // @name RU AdList JS Fixes
  • // @namespace ruadlist_js_fixes
  • -// @version 20180629.0
  • +// @version 20180713.0
  • // @description try to take over the world!
  • // @author lainverse & dimisa
  • // @supportURL https://greasyfork.org/en/scripts/19993-ru-adlist-js-fixes/feedback
  • @@ -780,7 +780,7 @@
  • if (!isFirefox) {
  • // scripts for non-Firefox browsers
  • // https://greasyfork.org/scripts/14720-it-s-not-important
  • - {
  • + unimptt: {
  • let imptt = /((display|(margin|padding)(-top|-bottom)?)\s*:[^;!]*)!\s*important/ig,
  • ret_b = (a,b) => b,
  • _toLowerCase = String.prototype.toLowerCase,
  • @@ -798,7 +798,7 @@
  • _getAttribute.call(node, 'style') : null;
  • if (!style || !imptt.test(style) || node.style.display === 'none' ||
  • - (node.src && node.src.slice(0,17) === 'chrome-extension:')) // Web of Trust IFRAME and similar
  • + (node.src && node.src.startsWith('chrome-extension:'))) // Web of Trust IFRAME and similar
  • return false; // get out if we have nothing to do here
  • protectedNodes.add(node);
  • @@ -826,11 +826,11 @@
  • _Element.prototype.setAttribute = function setAttribute(name, value) {
  • "[native code]";
  • let replaced = value;
  • - if (_toLowerCase.call(name) === 'style' && protectedNodes.has(this))
  • + if (name && _toLowerCase.call(name) === 'style' && protectedNodes.has(this))
  • replaced = value.replace(imptt, ret_b);
  • log = (replaced !== value);
  • logger();
  • - return _setAttribute.call(this, name, replaced);
  • + return _setAttribute.apply(this, arguments);
  • };
  • win.addEventListener (