Greasy Fork 还支持 简体中文。

Geoguessr Blink Mode

Shows the round briefly, then screen goes black and you have unlimited time to make your guess.

目前為 2022-04-13 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Geoguessr Blink Mode
  3. // @description Shows the round briefly, then screen goes black and you have unlimited time to make your guess.
  4. // @version 0.2.0
  5. // @author macca#8949
  6. // @license MIT
  7. // @include https://www.geoguessr.com/*
  8. // @run-at document-start
  9. // @grant none
  10. // @namespace https://greasyfork.org/en/scripts/438579-geoguessr-blink-mode
  11. // ==/UserScript==
  12.  
  13. const timeLimit = 1.5; // MODIFY THIS IF YOU WANT TO CHANGE THE TIME
  14.  
  15. function onScreen(element) {
  16. let rect = element.getBoundingClientRect();
  17. if (element.isSameNode(document.elementFromPoint(rect.left, rect.top))) {
  18. return true;
  19. }
  20. return false;
  21. }
  22.  
  23. let observer = new MutationObserver((mutations) => {
  24. if (document.querySelector('.compass__indicator')) {
  25. if (onScreen(document.querySelector('.compass__indicator'))) {
  26. setTimeout(() => {
  27. document.querySelector('.widget-scene-canvas').style.display = 'none';
  28. }, timeLimit * 1000);
  29. }
  30. }
  31. });
  32.  
  33. observer.observe(document.body, {
  34. characterDataOldValue: false,
  35. subtree: true,
  36. childList: true,
  37. characterData: false
  38. });