Skip to content

Instantly share code, notes, and snippets.

@samirfor
Created April 1, 2025 13:53
Show Gist options
  • Save samirfor/b4d40b01d18f395520652e962d4f2809 to your computer and use it in GitHub Desktop.
Save samirfor/b4d40b01d18f395520652e962d4f2809 to your computer and use it in GitHub Desktop.
Reload Galileu
// ==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
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment