From 992fe4fc8b593128a74cba90a873c942c921ac13 Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Mon, 20 Feb 2023 15:31:30 +0100 Subject: [PATCH] notify-test.js --- notify-test.js | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 notify-test.js diff --git a/notify-test.js b/notify-test.js new file mode 100644 index 0000000..af883df --- /dev/null +++ b/notify-test.js @@ -0,0 +1,36 @@ +import { html_game_list, notify } from "./util.js"; + +const delay = ms => new Promise(resolve => setTimeout(resolve, ms)); + +const URL_CLAIM = 'https://gaming.amazon.com/home'; // dummy URL + +if (true) { + const notify_games = [ + // { title: 'Kerbal Space Program', status: 'claimed', url: URL_CLAIM }, + // { title: "Shadow Tactics - Aiko's Choice", status: 'claimed', url: URL_CLAIM }, + { title: 'Epistory - Typing Chronicles', status: 'claimed', url: URL_CLAIM }, + ]; + notify(`epic-games:
${html_game_list(notify_games)}`); +} + +if (false) { + await delay(1000); + const notify_games = [ + { title: 'Faraway 2: Jungle Escape', status: 'claimed', url: URL_CLAIM }, + { title: 'Chicken Police - Paint it RED!', status: 'claimed', url: URL_CLAIM }, + { title: 'Lawn Mowing Simulator', status: 'claimed', url: URL_CLAIM }, + { title: 'Breathedge', status: 'claimed', url: URL_CLAIM }, + { title: 'The Evil Within 2', status: `redeem H97S6FB38FA6D09DEA on gog.com`, url: URL_CLAIM }, + { title: 'Beat Cop', status: `redeem BMKM8558EC55F7B38F on gog.com`, url: URL_CLAIM }, + { title: 'Dishonored 2', status: `redeem NNEK0987AB20DFBF8F on gog.com`, url: URL_CLAIM }, + ]; + notify(`prime-gaming:
${html_game_list(notify_games)}`); +} + +if (false) { + await delay(1000); + const notify_games = [ + { title: 'Haven Park', status: 'claimed', url: URL_CLAIM }, + ]; + notify(`gog:
${html_game_list(notify_games)}`); +}