IMVU Peer Review Automation: Countdown Timer & Semi-Automater

Automate and enhance your IMVU peer reviews with this Tampermonkey script: clicks the "View in 3D" button, auto-checks the "No issues" checkbox, and starts a 25-second countdown to prevent reviews from being done too quickly.

  1. // ==UserScript==
  2. // @name IMVU Peer Review Automation: Countdown Timer & Semi-Automater
  3. // @namespace http://tampermonkey.net/
  4. // @version 2.2
  5. // @description Automate and enhance your IMVU peer reviews with this Tampermonkey script: clicks the "View in 3D" button, auto-checks the "No issues" checkbox, and starts a 25-second countdown to prevent reviews from being done too quickly.
  6.  
  7. // @author Spikes @ IMVU, spcckz on discord
  8. // @match https://www.imvu.com/peer_review/*
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. // Create a div to display the countdown
  17. const countdownDiv = document.createElement('div');
  18. countdownDiv.style.position = 'fixed';
  19. countdownDiv.style.top = '10px';
  20. countdownDiv.style.right = '10px';
  21. countdownDiv.style.backgroundColor = 'rgba(0, 0, 0, 0.7)';
  22. countdownDiv.style.color = 'white';
  23. countdownDiv.style.padding = '10px';
  24. countdownDiv.style.fontSize = '16px';
  25. countdownDiv.style.borderRadius = '5px';
  26. countdownDiv.innerHTML = 'Time remaining: 25 seconds';
  27. document.body.appendChild(countdownDiv);
  28.  
  29. // Get the vote button and set it to disabled (with grayed out style)
  30. const voteButton = document.getElementById('btn_submit_vote');
  31. if (voteButton) {
  32. voteButton.disabled = true;
  33. voteButton.style.opacity = '0.5'; // Gray out the button when disabled
  34. voteButton.style.cursor = 'not-allowed'; // Show the "not allowed" cursor
  35. }
  36.  
  37. // Start the countdown from 25 seconds
  38. let timeRemaining = 25;
  39. const countdownInterval = setInterval(() => {
  40. timeRemaining--;
  41. countdownDiv.innerHTML = `Time remaining: ${timeRemaining} seconds`;
  42.  
  43. // When the countdown reaches 0, stop the interval and enable the button
  44. if (timeRemaining <= 0) {
  45. clearInterval(countdownInterval);
  46. countdownDiv.innerHTML = 'Countdown finished!';
  47. if (voteButton) {
  48. voteButton.disabled = false; // Enable the "Vote" button
  49. voteButton.style.opacity = '1'; // Restore normal button style
  50. voteButton.style.cursor = 'pointer'; // Change cursor back to pointer
  51. }
  52. }
  53. }, 1000); // 1000ms = 1 second
  54.  
  55. // Function to wait for and click the "no issues" checkbox
  56. function clickCheckbox() {
  57. const checkbox = document.querySelector('input[name="no_issues"]');
  58. if (checkbox && !checkbox.checked) {
  59. checkbox.click();
  60. }
  61. }
  62.  
  63. // Wait for the checkbox element to be available and click it
  64. const observer = new MutationObserver(() => {
  65. const checkbox = document.querySelector('input[name="no_issues"]');
  66. if (checkbox) {
  67. clickCheckbox();
  68. observer.disconnect(); // Stop observing once the checkbox is found and clicked
  69. }
  70. });
  71.  
  72. // Start observing the document for changes to detect when the checkbox loads
  73. observer.observe(document.body, { childList: true, subtree: true });
  74.  
  75. // Click the specific button on the specific page
  76. if (window.location.href === 'https://www.imvu.com/peer_review/') {
  77. // Locate the button using its onclick attribute
  78. const specificButton = Array.from(document.querySelectorAll('button'))
  79. .find(button => button.getAttribute('onclick') && button.getAttribute('onclick').includes("/next/peer_review"));
  80.  
  81. if (specificButton) {
  82. specificButton.click();
  83. }
  84. }
  85.  
  86. })();