WalmartRingFit/Switch

Play a sound if Ring Fit Adventure or switch is in stock

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name        WalmartRingFit/Switch
// @namespace   WalmartRingFit/Switch
// @description Play a sound if Ring Fit Adventure or switch is in stock
// @version     8
// @include 	https://www.walmart.com/ip/Nintendo-Switch-Ring-Fit-Adventure-Black/434503657*
// @include     https://www.walmart.com/ip/Nintendo-Switch-Bundle*
// @include     https://www.walmart.com/ip/Nintendo-Switch-Console*
// @author      Dawdie

// ==/UserScript==


var player = document.createElement('audio');
player.src = 'https://notificationsounds.com/soundfiles/a86c450b76fb8c371afead6410d55534/file-sounds-1108-slow-spring-board.mp3';
player.preload = 'auto';

if (!(/Technical difficulties/i.test (document.body.innerHTML) ) && (/Nintendo/i.test (document.body.innerHTML)))
{ 
  if (!(/font-bold">Out of stock/i.test (document.body.innerHTML) ))
  {
    document.title = "MATCH";
    player.play()
  }
  else {
  setTimeout(function(){ location.reload(); }, 15*1000);
  }
}
else {
  setTimeout(function(){ location.reload(); }, 10*1000);
}