Skip to content

Instantly share code, notes, and snippets.

@eranbetzalel
Last active August 11, 2021 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eranbetzalel/ade8fc319d1f80c046526e86fa3fbba6 to your computer and use it in GitHub Desktop.
Save eranbetzalel/ade8fc319d1f80c046526e86fa3fbba6 to your computer and use it in GitHub Desktop.
10Bis - Receive alert when a restaurant is opened
// ==UserScript==
// @name 10bis Notfiy Restaurant has opened
// @description Receive alert when a restaurant is opened
// @version 0.1
// @include http*//www.10bis.co.il/next/Restaurants/menu/delivery/*
// @copyright Eran Betzalel
// ==/UserScript==
//======================================================================================================
function notifyResturantOpen() {
const isOpen = mtjQuery('div :contains("אינה פעילה")').length === 0;
if (!isOpen) {
setTimeout(() => location.reload(), 3000);
} else {
alert('המסעדה פעילה');
}
}
setTimeout(() => notifyResturantOpen(), 10000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment