Way to Open Clicked Link in New Tab via Tampermonkey?
问题 So I have what seems to be a simple problem. I'm trying to automatically open a specific link on a page using the following code: // ==UserScript== // @name AutoClicker // @include https://example.com/* // @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js // @grant GM_addStyle // ==/UserScript== var TargetLink = $("a:contains('cars')") if (TargetLink.length) window.location.href = TargetLink[0].href //--- but open it in a new tab Which works splendidly. The only problem