[GC] - Virtupets.net Search Link

Add virtupets.net search link to sitewide search helper.

// ==UserScript==
// @name         [GC] - Virtupets.net Search Link
// @namespace    https://greasyfork.org/en/users/1225524-kaitlin
// @match        https://www.grundos.cafe/*
// @version      1.1
// @license      MIT
// @description
// @author       Cupkait
// @icon         https://i.imgur.com/4Hm2e6z.png
// @description Add virtupets.net search link to sitewide search helper.
// ==/UserScript==


document.querySelectorAll('div.searchhelp').forEach(function(div) {
var item = div.id;

item = item.trim().replace(/-links/g, '').replace(/\s+/g, '%20');


    var link = document.createElement('a');
    link.href = `https://virtupets.net/search?q=${item}`;


    var img = document.createElement('img');
  // SWITCH THE // FROM THE BEGINNING OF THE IMG.SRC SO THE ONE YOU DONT WANT TO USE IS GREYED OUT

  //COLOR:
    img.src = 'https://virtupets.net/assets/images/vp.png';

  //BASIC:
  //  img.src = 'https://i.imgur.com/ogwfJ45.png';


    img.alt = 'Virtupets';
    img.style.width = '20px';

    link.appendChild(img);
    div.appendChild(link);
});