试】管13249836101

Wanna get some food during the Corona Time?

// ==UserScript==
// @name         试】管13249836101
// @namespace    http://tampermonkey.net/
// @version      0.11
// @description  Wanna get some food during the Corona Time?
// @author       Y2Nk4
// @match        https://www.amazon.com/gp/buy/*
// @grant        none
// @require      https://unpkg.com/[email protected]/dist/jquery.min.js
// ==/UserScript==

(function() {
    'use strict';
    var $ = $ || jQuery;

    var cart_icon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAbPUlEQVR4Xu2deWxcx33Hv/PeHrxvihR1UBSp+7AoyRKlJI5dJ23imG4QwElhyzmMIGnTFm2CNk4LF3ERp0kawG6L+o+0SYPYTtJYiJNYtnM1lp1YIqmDlKibFkVR4n2TyyW5x3tTzFuvRElc7r7Z5e6S8xuA4LHzmze/7+99OMebmcdAiRQgBSIqwEgbUoAUiKwAAUJ3BykwjwIECN0epAABQvcAKSCnALUgcrqRlSIKECCKBJrclFOAAJHTjawUUYAAUSTQ5KacAgSInG5kpYgCBIgigSY35RQgQOR0IytFFCBAFAk0uSmnAAEipxtZKaIAAaJIoMlNOQUIEDndyEoRBQgQRQJNbsopQIDI6UZWiihAgCgSaHJTTgECRE43slJEAQJEkUCTm3IKECByupGVIgoQIIoEmtyUU4AAkdONrBRRgABRJNDkppwCBIicbmSliAIEiCKBJjflFCBA5HQjK0UUIEAUCTS5KacAASKnG1kpogABokigyU05BQgQOd3IShEFCBBFAk1uyilAgMjpRlaKKECAKBJoclNOAQJETjeyUkQBAkSRQJObcgoQIHK6kZUiChAgigSa3JRTgACR042sFFGAAFEk0OSmnAIEiJxuZKWIAgSIIoEmN+UUIEDkdCMrRRQgQBQJNLkppwABIqcbWSmiAAGiSKDJTTkFCBA53chKEQUIEEUCTW7KKUCAyOlGVoooQIAoEmhyU04BAkRON7JSRAECRJFAk5tyChAgcrqRlSIKECCKBJrclFOAAJHTjawUUYAAUSTQ5KacAgSInG5kpYgCBIgigSY35RQgQOR0IytFFCBAFAk0u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qSha6ShAl2M4ZtFRUWJ2QIcg4NJBSRcn6Gh0Y8C/GOMQcxi3XyRXQwVpizKKTDMOV7XdfZyYWHhz5PtfUoAme3k2NjYTtM093DO7gb4/QAqky0CXS+tFOgE+O8YY8c1TTtWUJC8Gau5VEg5ILdXinOeMTw8vJ0xfStgbgXYBwHrCbrEy5vTKvBUmVsVEO93uwLw34q363HOzxYXF7cyxkJv7kmTlHaARNJlZGQk3zCMdYC+TtN4DaBVA1yAI75WpImeVI1bFegOQcCuAGY7Y453DMN/WdO0tuLi4lsOvU5X4RYNINEE7OnpycrMzCwNBoOlmqaVcM7FSl4xvrFW8nJuPa0vAlgh52ahOMs3Wpn0+U0FxMmWjImVvGJFL0YYw4hYyQtArOgVK3mHTNMccjgcg9PT04MVFRWxvSs6zUVeMoDI6tzX15et63q+2+3O8/v9+Q6HIzcYDOYBei5g5GqaJs6azRF7QQAtG+DZnIu9ICwL4KLbJ/aHWPtCAKTLafHXOefTmib2gmAKEN/5FGPwAswLmF7GmNgDMmma5iSgewDD43A4JoLBoMflco37fL4JwzDGy8vLl8Tectn7Q3lAZIWLZsc5dwwODmZkZGS4fT6f2+l0ujVNc01PB91ut+Y0DMNlmqaLMeY0Tc3pcMBhmqb1Lg5N0wLBIIKaZgY45wFN0/y6rvt9PjOQmenwmabpDwQCPrfb7ZuZmfGVlpbOMMYS84bTaI4p9jkBoljAyV17ChAg9vSi3IopQIAoFnBy154CBIg9vSi3YgoQIIoFnNy1pwABYk8vyq2YAgSIYgEnd+0pQIDY04tyK6YAAaJYwMldewoQIPb0otyKKUCAKBZwcteeAgSIPb0ot2IKECCKBZzctafA/wOLKvhfqKDb5QAAAABJRU5ErkJggg==';

    $(document).ready(() => {
        setTimeout(() => {
            if(Notification.permission !== 'granted') {
                Notification.requestPermission((result) => {
                    if(result !== 'granted'){
                        console.log('Please allow Chrome notification')
                    }
                })
            }
            // Check if the page needs to continue, due to an item become out-stock or other reason.
            // If need, there is no need to do anything else beside to click that button
            // After clicking the button, the page will be automaticlly refreshed

            if(window.location.href.indexOf('spc/handlers') !== -1){
                // In Checkout Page
                if($('[name="placeYourOrder1"]').length > 0){
                    new Notification('Good News!', {
                        dir: 'ltr',
                        body: '\n Time Slot is ALAILABLE!!! \n Go Check it Out!!!',
                        icon: cart_icon
                    });
                }
            }
            if(window.location.href.indexOf('shipoptionselect') !== -1){
                // In Reserve Time Slot Page
                if($('input[name=continue-bottom]').length > 0){
                    $('input[name=continue-bottom]').click();
                }else{
                    $('.ss-carousel-items > li').each((i, el) => {
                        // Only Detect the first 5 Date
                        if (i <= 5) {
                            setTimeout(() => {
                                $(el).find('.a-button-text').click();
                                $('.Date-slot-container').each((i, el) => {
                                    if($(el).attr('style').indexOf('block') !== -1){
                                        $(el).find('.a-box.spanOutsideSlotButton').each((i, el) => {
                                            new Notification('Good News!', {
                                                dir: 'ltr',
                                                body: '\n Time Slot is ALAILABLE!!! \n Go Check it Out!!!',
                                                icon: cart_icon
                                            });
                                        })
                                        if(!!$(el).find('span.a-size-base-plus').text() && !!$(el).find('span.a-size-base-plus').text().replace(/(^\s*)|(\s*$)/g, "") && $(el).find('span.a-size-base-plus').text().indexOf('No attended delivery') !== -1){
                                            console.log('No time slot yet')
                                        }else{
                                            if(Notification.permission !== 'granted') {
                                                new Notification('Good News!', {
                                                    dir: 'ltr',
                                                    body: '\n Time Slot is ALAILABLE!!! \n Go Check it Out!!!',
                                                    icon: cart_icon
                                                });
                                            }
                                        }
                                    }
                                });
                            }, i * 500)
                        }
                    })
            }
            }
            // refresh every 55 sec
            setTimeout(() => {
                history.go(0);
            }, 55 * 1000);
        }, 3000);
    })
    // Your code here...
})();