PDA

View Full Version : [DV] Help troubleshooting Tampermonkey userscript with right-click dropdown



twooldcat
02-16-2021, 05:52 PM
[Only registered and activated users can see links]

[Only registered and activated users can see links]

It seems like some of the constructs that the script depends on like contextmenu and menuitem are now deprecated - that's probably the issue. I tried messing around with it and it seems like the script will always exit on line 24, here:


if (!("contextMenu" in document.documentElement &&
"HTMLMenuItemElement" in window)) return;

If I comment out that line of code, the script will successfully add the listener that executes initMenu() when right-clicking. From there, it is a matter of finding out another way to edit the context menu. I hope that gets you going in the right direction.

rockpaperscissors
02-20-2021, 09:45 PM
THANK YOU SO MUCH! I knew something had to have changed.

Sorry I should have specified that you have to select the item and then rightclick on the picture that pops up to the right of the inventory.

The shift+right click way sounds way better, I'll try it out and see how it works.



EDIT: I thought it wasn't working but then I switched to Chrome and WOW it worked beautifully. Thank you so much for making an even better code! I wouldn't call your hands grubby haha.