slash88it / Comehome proper UX fix

// ==UserScript==
// @name         Comehome proper UX fix
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Fixes proper user experience by restoring intended browser usage of the mouse middle click button
// @author       Luca Santalucia
// @match        https://comehome.fun/events*
// @grant        none
// @license      MIT
// ==/UserScript==


(function() {
    'use strict';

setTimeout(() =>{
    setInterval(() =>{
        document.querySelectorAll(".event:not(.augmented)").forEach((el) => {
            let link = `https://comehome.fun/events/${el.querySelector('.header').dataset.bg.split('/')[4]}`
            el.insertAdjacentHTML('afterend',`<a href="${link}" onclick="event.stopPropagation();" style="
                  position: absolute;
                  top: 0px;
                  height: 100%;
                  width: 92%;
                  "></a>`);
            el.classList.add("augmented");
        },1000);
    },3000)
});
})();