Click Counter and Mistake Tracker

For those who use the site for self-learning. It counts how many times you clicked and how many mistakes you made.

17.06.2024 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Click Counter and Mistake Tracker
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  For those who use the site for self-learning. It counts how many times you clicked and how many mistakes you made.
// @author       YourName
// @match        https://randomwordgenerator.com/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Create a counter display
    const counterDisplay = document.createElement('div');
    counterDisplay.id = 'clickCounter';
    counterDisplay.style.position = 'fixed';
    counterDisplay.style.bottom = '10px';
    counterDisplay.style.right = '10px';
    counterDisplay.style.backgroundColor = 'blue';
    counterDisplay.style.color = 'white';
    counterDisplay.style.padding = '10px';
    counterDisplay.style.border = '1px solid black';
    counterDisplay.style.borderRadius = '5px';
    counterDisplay.style.cursor = 'pointer'; // Make it clickable
    counterDisplay.style.zIndex = '1000';
    document.body.appendChild(counterDisplay);

    // Initialize counters
    let clickCount = 0;
    let mistakeCount = 0;

    // Update the counter display
    function updateCounter() {
        counterDisplay.textContent = `Clicked: ${clickCount} times\nMistakes: ${mistakeCount}`;
    }

    // Attach event listener to the button
    const generateButton = document.querySelector('input[type="submit"][value="Generate Random Words"]');
    if (generateButton) {
        generateButton.addEventListener('click', () => {
            clickCount++;
            updateCounter();
        });
    }

    // Attach event listener to the counter display
    counterDisplay.addEventListener('click', () => {
        mistakeCount++;
        updateCounter();
    });

    // Initialize counter display
    updateCounter();
})();