Skip to content

Instantly share code, notes, and snippets.

@samirfor
Created April 1, 2025 13:53
Show Gist options
  • Select an option

  • Save samirfor/b4d40b01d18f395520652e962d4f2809 to your computer and use it in GitHub Desktop.

Select an option

Save samirfor/b4d40b01d18f395520652e962d4f2809 to your computer and use it in GitHub Desktop.

Revisions

  1. samirfor created this gist Apr 1, 2025.
    23 changes: 23 additions & 0 deletions reload_galileu.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    // ==UserScript==
    // @name Reload Galileu
    // @namespace http://tampermonkey.net/
    // @version 2025-03-12
    // @description try to take over the world!
    // @author Samir
    // @match https://galileu.pefoce.ce.gov.br/pages/*
    // @icon https://www.google.com/s2/favicons?sz=64&domain=gov.br
    // @grant none
    // ==/UserScript==

    (function() {
    'use strict';

    setInterval(function() {
    var xpathResult = document.evaluate('//*[@id="chronoExample"]/span[contains(text(), "00:01")]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
    var node = xpathResult.singleNodeValue;

    if (node) {
    location.reload(); // Recarrega a página quando o XPath é encontrado
    }
    }, 5000); // Intervalo de 5 segundos para verificar o XPath
    })();