Narodmon.com Sensors Location Redirector

Automatically select sensors of desired location instead of default selection based on geolocation

// ==UserScript==
// @name         Narodmon.com Sensors Location Redirector
// @namespace    https://violentmonkey.github.io/
// @version      1.1
// @description  Automatically select sensors of desired location instead of default selection based on geolocation
// @author       Streampunk
// @icon         data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxISEhUSDxQQEBAVEBYVFRAYGBUVFRIWFRUWFxUVFhYYHyggGBolGxcWITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OGhAQGisfHx0rLS0tLSstLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKystLS0tLf/AABEIALQAtAMBEQACEQEDEQH/xAAcAAABBAMBAAAAAAAAAAAAAAAABAUGBwEDCAL/xABGEAABAgMDBQkPAwMEAwAAAAABAAIDBBEFEiEGBzGRsRM1QVFSYXFzwQgVFhciMjM0VGOBg5Kh0UJichQjgiR0wuFDU/D/xAAaAQEAAwEBAQAAAAAAAAAAAAAAAQQFAgMG/8QALhEBAAIBAgYABQMEAwAAAAAAAAECAwQREhMhMUFRBSIyQmEUM4EVIzShRGJx/9oADAMBAAIRAxEAPwCqsk8mY1oR9wl7t+4XeUaCgSRMvEnaXuPqKA8Sdpe4+ooDxJ2l7j6igPEnaXuPqKA8Sdpe4+ooDxJ2l7j6igPEnaXuPqKA8Sdpe4+ooAZk7S9x9RQHiTtL3H1FAeJK0vcfUUB4krS9x9RQHiStL3H1FAeJK0vcfUUB4krS9x9RQHiStL3H1FAeJK0vcfUUB4krS9x9RQHiStL3H1FAeJK0vcfUUCO2M0c/LwIkeJuNyG28aONaDiQV8Qgs3MDvl8h20oL+tK0jCdQAHCqrZM81vFY8qebUzTJFIju1Q7YJHBXiOCszE+FmeLw9G1H8gHoNV4Xtlr9u6tfLmr9u7x36dyQq86y0d6q0/ELR3qO/LuSFz+u/Dn+pT6Hfl3JCfrvwf1KfQ78u5ISNdM+E/wBSn0O/LuSE/XfhH9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t/Y8MLJ9ol9acjH6Obf2PDCyfaJfWnIx+jm39jwwsn2iX1pyMfo5t/Y8MLJ9ol9acnH6Obf2PC+yfaJfWnIx+jnX9jwvsn2iX1pyaejm39mjLnLGz4lnzEOFMwnPdBIa0HEniXq83MLhsGxBgFBm/wBGoIC90aggL3RqCAvdGoIC90aggL3RqCAvdGoIC90aggL3RqCAvdGoIC90aggL3RqCAvdGoIC90aggL3RqCAvdGoIC90aggL3RqCAvdGoIC90aggL3RqCDFUH/2Q==
// @match        https://narodmon.com/*
// @match        https://narodmon.ru/*
// @run-at       document-start
// @grant        none
// @license MIT
// ==/UserScript==

// To select sensors for a certain area, you need specify initial sensor number in the url. For example https://narodmon.com/6476
// You will be redirected to a general map view with all the sensors in the nearby area

function Redirect() {
   window.location.href = "/"; // will redirect to main page with all the sensors in the nearby area
}

if (window.location.pathname != '/') { // Detects if we're on a subpage or on the main page
  let captchaInterval_1 = setInterval(() => {
    clearInterval(captchaInterval_1);
    document.querySelector("#dialog > div.exit > div")?.click();
    Redirect();
  }, 5000); // will call the function after 5 seconds. Increase the time before the redirect starts if the initial sensor data fails to load in time
}  
else {
  let captchaInterval_2 = setInterval(() => {
    clearInterval(captchaInterval_2);
    document.querySelector("#dialog > div.exit > div")?.click();
  }, 3000); // will call the function after 3 seconds. Increase the time if the annoying pop-up has not closed
}