Tampermonkey / tampermonkey

Tampermonkey is the most popular userscript manager, with over 10 million users. It's available for Chrome, Microsoft Edge, Safari, Opera Next, and Firefox.
GNU General Public License v3.0
4.3k stars 424 forks source link

Why you update tampermonkey to mv3 but not released GM_webRequest support #2209

Closed DinacoStudio closed 3 weeks ago

DinacoStudio commented 3 weeks ago

(Please fill out the issue template with your details)

Expected Behavior

GM_webRequest work

Actual Behavior

message in console "error currently not supported in MV3 "

Specifications

Vivaldi 6.9.3447.54 (Stable channel)

Script

// ==UserScript==
// @name         Блокировщик рекламы вк
// @namespace    none
// @version      2.3
// @description  Заблокировать рекламу в вк
// @author       Dinaco Studio
// @match        https://*.vk.com/*
// @include      https://*.vk.com/*
// @icon         https://www.google.com/s2/favicons?domain=vk.com
// @grant        GM_webRequest
// @license GNU GPLv3
// ==/UserScript==
GM_webRequest([
    {"selector":"*://stats.vk-portal.net/web-stats/*","action":"cancel"},
    {"selector":"*://ad.mail.ru/static/admanhtml/rbadman-html5.min.js","action":"cancel"},
    {"selector":"*://www.tns-counter.ru/*","action":"cancel"},
    {"selector":"*://r3.mail.ru/k?*","action":"cancel"},
    {"selector":"*://vk.com/js/lib/px.js","action":"cancel"},
    {"selector":"*://top-fwz1.mail.ru/js/code.js","action":"cancel"},
    {"selector":"*://trk.mail.ru/i/*","action":"cancel"},
    {"selector":"*://ad.mail.ru/*","action":"cancel"},
    {"selector":"*://vk.com/ads_rotate.php?act=al_update_ad","action":"cancel"},
    {"selector":"*://vk.com/al_audio.php?act=ad_event","action":"cancel"}
], function(info, message, details) {
    console.log(info, message, details);
});
derjanb commented 3 weeks ago

Please see: https://groups.google.com/a/chromium.org/g/chromium-extensions/c/AzxwVqZUmX0

GM_webRequest also might never be supported again.

derjanb commented 3 weeks ago

In the meantime you can use Tampermonkey Legacy.

Please note that Chrome will drop support for it in 2025.