IMVU Peer Review Countdown

Adds a 25-second countdown when the peer review page loads

目前为 2024-09-05 提交的版本。查看 最新版本

// ==UserScript==
// @name         IMVU Peer Review Countdown
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Adds a 25-second countdown when the peer review page loads
// @author       YourName
// @match        https://www.imvu.com/peer_review/*
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // Create a div to display the countdown
    const countdownDiv = document.createElement('div');
    countdownDiv.style.position = 'fixed';
    countdownDiv.style.top = '10px';
    countdownDiv.style.right = '10px';
    countdownDiv.style.backgroundColor = 'rgba(0, 0, 0, 0.7)';
    countdownDiv.style.color = 'white';
    countdownDiv.style.padding = '10px';
    countdownDiv.style.fontSize = '16px';
    countdownDiv.style.borderRadius = '5px';
    countdownDiv.innerHTML = 'Time remaining: 25 seconds';
    document.body.appendChild(countdownDiv);

    // Start the countdown from 15 seconds
    let timeRemaining = 25;
    const countdownInterval = setInterval(() => {
        timeRemaining--;
        countdownDiv.innerHTML = `Time remaining: ${timeRemaining} seconds`;

        // When the countdown reaches 0, stop the interval
        if (timeRemaining <= 0) {
            clearInterval(countdownInterval);
            countdownDiv.innerHTML = 'Countdown finished!';
        }
    }, 1000); // 1000ms = 1 second

})();