Auto Refresh

Tự động refresh.

目前為 2019-08-24 提交的版本,檢視 最新版本

// ==UserScript==
// @name  Auto Refresh
// @namespace  Nguyen Kim Long
// @description  Tự động refresh.
// @version  1.0.0
// @author  NKL
// @match  https://colkidsclub.vn/backpack-season-3
// @require  https://code.jquery.com/jquery-2.2.4.min.js
// @require  https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.8/js/select2.full.min.js
// @run-at  document-idle
// ==/UserScript==

(function() {
    'use strict';
    $( document ).ready(function() {
        if (document.getElementsByClassName('sold-out').length == 1) {
            setTimeout(function() {
                location.reload();
            }, 3000);
        } else {
            var audioo = new Audio('https://www.w3schools.com/html/horse.mp3');
            audioo.loop = true;
            audioo.play();
        }
    });
})();