erosman / support

Support Location for all my extensions
Mozilla Public License 2.0
175 stars 12 forks source link

Error installing the script "RU AdList JS Fixes" #251

Closed navinc17 closed 4 years ago

navinc17 commented 4 years ago

When installing the script "RU AdList JS Fixes" from the site "https://greasyfork.org/ru/scripts/19993-en-adlist-js-fixes" an error occurs.

erosman commented 4 years ago

The compatibility issue with RU AdList JS Fixes is the use or RegEx in @exclude which is not supported by the Firefox userScript API.

Using the following should work the same way in FireMonkey... Let me know if there are any issues.

// ==UserScript==
// @name         RU AdList JS Fixes
// @namespace    ruadlist_js_fixes
// @version      20201105.1
// @description  try to take over the world!
// @author       lainverse & dimisa
// @supportURL   https://greasyfork.org/en/scripts/19993-ru-adlist-js-fixes/feedback
// @match        *://*/*
// @exclude      https://*.auth.wi-fi.ru/*
// @exclude      https://*.hd.kinopoisk.ru/*
// @exclude      https://*.diehard.yandex.ru/*
// @exclude      https://*.market.yandex.ru/*
// @exclude      https://*.money.yandex.ru/*
// @exclude      https://*.trust.yandex.ru/*
// @exclude      https://*.1cfresh.com/*
// @exclude      https://*.alfabank.ru/*
// @exclude      https://*.ingress.com/*
// @exclude      https://*.lineageos.org/*
// @exclude      https://*.telegram.org/*
// @exclude      https://*.unicreditbanking.net/*
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        GM_listValues
// @grant        GM_registerMenuCommand
// @grant        GM.cookie
// @grant        unsafeWindow
// @grant        window.close
// @run-at       document-start
// ==/UserScript==

Or use the proper @exclude-match (FireMonkey & ViolentMonkey)

// ==UserScript==
// @name              RU AdList JS Fixes
// @namespace         ruadlist_js_fixes
// @version           20201105.1
// @description       try to take over the world!
// @author            lainverse & dimisa
// @supportURL        https://greasyfork.org/en/scripts/19993-ru-adlist-js-fixes/feedback
// @match             *://*/*
// @exclude-match     https://*.auth.wi-fi.ru/*
// @exclude-match     https://*.hd.kinopoisk.ru/*
// @exclude-match     https://*.diehard.yandex.ru/*
// @exclude-match     https://*.market.yandex.ru/*
// @exclude-match     https://*.money.yandex.ru/*
// @exclude-match     https://*.trust.yandex.ru/*
// @exclude-match     https://*.1cfresh.com/*
// @exclude-match     https://*.alfabank.ru/*
// @exclude-match     https://*.ingress.com/*
// @exclude-match     https://*.lineageos.org/*
// @exclude-match     https://*.telegram.org/*
// @exclude-match     https://*.unicreditbanking.net/*
// @grant             GM_getValue
// @grant             GM_setValue
// @grant             GM_listValues
// @grant             GM_registerMenuCommand
// @grant             GM.cookie
// @grant             unsafeWindow
// @grant             window.close
// @run-at            document-start
// ==/UserScript==
navinc17 commented 4 years ago

Thanks for the quick response! It all worked!