Skip to content

Instantly share code, notes, and snippets.

@unitycoder
Last active June 4, 2021 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unitycoder/974b6a1c7969a12fe954f25c6c51664e to your computer and use it in GitHub Desktop.
Save unitycoder/974b6a1c7969a12fe954f25c6c51664e to your computer and use it in GitHub Desktop.
Add Middle Mouse Button support for Unity Asset Store Main Banner Image (those highlighted, main promoted items)
// ==UserScript==
// @name Asset Store Middle Mouse Fixes (GreaseMonkey script)
// @namespace https://unitycoder.com
// @version 1
// @include https://assetstore.unity.com/*
// ==/UserScript==
// main banner
var list = document.getElementsByClassName("J0Izj");
for (let item of list)
{
// add middle mouse button even to div inside banners
item.childNodes[0].addEventListener('auxclick', function (event)
{
item.childNodes[0].click();
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment