javascripthtmlcss

How to hide link to a different file in bottom left corner?


So i am making a proxy site, and i have a fontawesome button that links to a different file, but it shows in the bottom left corner of my screen when i hover over the button. Most of the current topics civer normal buttons, but they dont work for me since mine is fontawesome or smth... Gif Demo <a href="games.html" target="_blank"class="icon fa-solid fa-gamepad fa-hover"></a>

I looked through some of the problems related to this on the site, but none worked. Also I though that since it was a .html file it automatically wasnt going to show up.


Solution

  • You can hide it by using JS, something like this :

    document.querySelectorAll('.icon').forEach(icon => {
        icon.addEventListener('click', function() {
            const href = this.getAttribute('data-href');
            if (href) {
                window.open(href, '_blank');
            }
        });
    });
    <div>
        <i class="fas fa-home icon" data-href="https://www.example.com/home">1</i>
        <i class="fas fa-info-circle icon" data-href="https://www.example.com/info">2</i>
        <i class="fas fa-envelope icon" data-href="https://www.example.com/contact">3</i>
    </div>