Tampermonkey: context-menu stopped working (mostly)

Created on 29 May 2020  Â·  12Comments  Â·  Source: Tampermonkey/tampermonkey

(Please fill out the issue template with your details)

just today, scripts with @run-at context-menu stopped working on most websites including the websites i need
it works on some pages but not everywhere as it used to!?

Expected Behavior

run the script

Actual Behavior

nothing happens

Specifications

  • Chrome 83.0.4103.61 64bits
  • TM: (4.10)
  • OS: (Windows 10)

Script

(Please give an example of the script if applicable.)

anything
bug fixed at beta

Most helpful comment

Nevermind, I found how to reproduce the issue. 😌

All 12 comments

I have this problem too. I also noticed that TM context-menu still works for URLs like https://www.youtube.com/ but is broken for URLs with parameters, e.g. https://www.youtube.com/watch?v=CHDfexhkP9Q

Yes @alexrusn that's exactly the issue; thanks.

+1...nothing happens.

no feedback on this issue yet?
it's just as alexrusn said, for example:

alert("i run here");
will run on:
https://www.facebook.com/zuck/about

and won't run on:
https://www.facebook.com/zuck/about?a

only if this script is called through context-menu, it works fine through other run-at...

I can confirm this. When I set Logging Level to Debug here is what shown on the console:

exec: URL doesn't match
Location {href: "https://www.udemy.com/home/my-courses/wishlist/?p=2", ancestorOrigins: DOMStringList, origin: "https://www.udemy.com", protocol: "https:", host: "www.udemy.com", …} 
{header: "↵// @name         Udemy Wishlist↵// @namespace    …n-at       context-menu↵// @grant        none↵// ", code: "// ==UserScript==↵// @name         Udemy Wishlist↵…strict';↵    console.log("Udemy Wishlist");↵})();", requires: "↵↵", storage: {…}, script: {…}, …}

though there are no @match or @include tags in the script:

// ==UserScript==
// @name         Udemy Wishlist
// @namespace    https://www.udemy.com/
// @version      1
// @run-at       context-menu
// @grant        none
// ==/UserScript==

@xtradev Thank you for providing these details, hopefully this gets attention and be fixed.

The attached script works fine here at all mentioned pages. 🤔
Can you please attach an example script and/or a screencast or something like this?

// ==UserScript==
// @name         context-menu
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        http://*/*
// @match        https://*/*
// @grant        none
// @run-at       context-menu
// ==/UserScript==

console.log('##########', location.href);

The script does work on any web page with URL having no parameters, i.e. plain https://www.amazon.com/

########## https://www.amazon.com/

However if the URL contains parameters, i.e. https://www.amazon.com/s?k=hello&ref=nb_sb_noss_2 the script does not work (does not even get invoked):

exec: URL doesn't match
Location {href: "https://www.amazon.com/s?k=hello&ref=nb_sb_noss_2", ancestorOrigins: DOMStringList, origin: "https://www.amazon.com", protocol: "https:", host: "www.amazon.com", …}
{header: "↵// @name         context-menu↵// @namespace    ht…ant        none↵// @run-at       context-menu↵// ", code: "// ==UserScript==↵// @name         context-menu↵//…ript==↵↵console.log('##########', location.href);", requires: "↵↵", storage: {…}, script: {…}, …}

As I said, it's working fine here. So there must be more information on how to reproduce the problem...

@xtradev What is your Chrome, OS and Tampermonkey version? Do you have other scripts installed? Does the problem reproduce with a new temporary profile? (https://www.chromium.org/developers/creating-and-using-profiles)

image

Nevermind, I found how to reproduce the issue. 😌

OS Linux 5.7.6-artix1-1 x86_64
Google Chrome 83.0.4103.116 (Official Build) (64-bit), same issue in Vivaldi 3.1.1929.45 (Stable channel) (64-bit)
Tampermonkey® v4.10 by Jan Biniok

Do you have other scripts installed?

77 scripts total, some disabled.

Should be fixed at 4.11.6117

Was this page helpful?
0 / 5 - 0 ratings