Last active
August 11, 2021 10:31
-
-
Save eranbetzalel/ade8fc319d1f80c046526e86fa3fbba6 to your computer and use it in GitHub Desktop.
10Bis - Receive alert when a restaurant is opened
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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