您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Polls the visa appointment calendar and gives your a browser push notification when a desired date opens up
// ==UserScript== // @name USCIS desired visa appointment dates notifier // @description Polls the visa appointment calendar and gives your a browser push notification when a desired date opens up // @match https://cgifederal.secure.force.com/scheduleappointment // @version 0.1 // @license GNU AGPLv3 https://www.gnu.org/licenses/agpl-3.0.html // @namespace USCIS-poller // ==/UserScript== function exec(fn) { var script = document.createElement('script'); script.setAttribute("type", "application/javascript"); script.textContent = '(' + fn + ')();'; document.body.appendChild(script); // run the script document.body.removeChild(script); // clean up } //sleep(4000); exec(function() { return j_id184_onchange(); }); console.log("only " + document.getElementsByClassName("ui-datepicker-year")[0].innerText + " found. No 2022"); function notifyMe(earliestAppointmentYear) { // Let's check if the browser supports notifications if (!("Notification" in window)) { alert("Este navegador no soporta notificaciones de escritorio."); } // Let's check whether notification permissions have already been granted else if (Notification.permission === "granted") { // If it's okay let's create a notification createNotification(earliestAppointmentYear); } // Otherwise, we need to ask the user for permission else if (Notification.permission !== "denied") { Notification.requestPermission(function(permission) { // If the user accepts, let's create a notification if (permission === "granted") { createNotification(earliestAppointmentYear); } }); } } function createNotification(earliestAppointmentYear) { var title = earliestAppointmentYear +" date available!"; var options = { body: "Want it?", }; var notification = new Notification(title, options); notification.onclick = function() { window.focus(); }; } notifyMe(document.getElementsByClassName("ui-datepicker-year")[0].innerText); //GM_notification/GM.notification("2023");