I need to open all the search results of each link new tab automatically. I have tried below script which I have found from here. I am unable to achieve the expected outcome. I am absolute new to scripting and help me fix or guide me through achieve the outcome.
// ==UserScript==
// @name AutoClicker
// @match https://www.google.com/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// @grant GM_openInTab
// ==/UserScript==
var TargetLink = $("a:contains('example')");
if (TargetLink.length)
GM_openInTab (TargetLink[0].href);
Error 1
Error 2