.<*Gartic-Viewer*>.

A Gartic script that allows you to enter a room as a viewer with a simple right-click on the desired room name in Gartic.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         .<*Gartic-Viewer*>.
// @namespace    http://tampermonkey.net/
// @version      1.0.2
// @description  A Gartic script that allows you to enter a room as a viewer with a simple right-click on the desired room name in Gartic.
// @author       Scripter_Plus
// @match        *://gartic.io/*
// @grant        none
// @icon         https://static.roocket.ir/images/avatar/2024/4/29/f2Sqmpbwyp6tvzs6kMVRVilOBr7fRO0RIYnW3Tzt.png
// ==/UserScript==

(function() {
    'use strict';

    document.addEventListener('contextmenu', function(event) {
        let target = event.target.closest('a');
        if (target && target.href.includes("gartic.io")) {
            event.preventDefault();
            let viewerURL = target.href + "/viewer";
            window.open(viewerURL, '_blank');
        }
    });
})();