Estoy tratando de crear un script que se ejecute cada 10 segundos y envíe una notificación de GM. Pero no recibo ninguna notificación. ¿Qué ocurre?
// ==UserScript== // @name _Notification test // @grant GM_notification // @require http://code.jquery.com/jquery-1.12.4.min.js // ==/UserScript== setTimeout(function() { GM_notification ( {title: 'foo', text: '42'} ); }, 1000);necesita match la url , proporcione la URL de la página y cada 10 segundos necesita setInterval no setTimeout
// ==UserScript== // @name _Notification test // @match https://stackoverflow.com/questions/70249774/tampermonkey-run-script-every-10s* // @grant GM_notification // @require http://code.jquery.com/jquery-1.12.4.min.js // ==/UserScript== var intervalId = window.setInterval(function(){ GM_notification ( { title: 'foo', text: '42' } ); }, 10000);