11번가 찜 목록 바로 가기

홈페이지 좌측 하단에 11 번가 찜 목록 바로 가기를 추가합니다.

当前为 2023-07-15 提交的版本,查看 最新版本

// ==UserScript==
// @name         11번가 찜 목록 바로 가기
// @namespace    11번가 찜 목록 바로 가기
// @version      0.1
// @description  홈페이지 좌측 하단에 11 번가 찜 목록 바로 가기를 추가합니다.
// @match        https://www.11st.co.kr/*
// @grant        none
// @icon         https://s.011st.com/img/common/icon/favicon.ico
// ==/UserScript==

(function() {
    'use strict';

    // Create the button element
    let button = document.createElement('button');
    button.innerHTML = '❤️<br><span style="font-size: 12px; font-weight: bold; color: #ff69b4;">찜 목록</span>';
    button.style.position = 'fixed';
    button.style.bottom = '10px';
    button.style.left = '10px';
    button.style.fontSize = '30px';
    button.style.backgroundColor = 'transparent';
    button.style.border = 'none';

    // Add the click event listener
    button.addEventListener('click', function() {
        window.location.href = 'https://www.11st.co.kr/minimall/MyMiniMallAction.tmall?method=getMyMiniMall&tabType=F&clickpram=MY11minimall';
    });

    // Append the button to the body
    document.body.appendChild(button);

    // Add the animation
    setInterval(function() {
        let text = button.querySelector('span');
        text.style.textShadow = '0 0 5px yellow';

        let animation = button.animate([
            { transform: 'translateY(0px)' },
            { transform: 'translateY(-10px)' },
            { transform: 'translateY(0px)' },
            { transform: 'translateY(-10px)' },
            { transform: 'translateY(0px)' }
        ], {
            duration: 1000,
            iterations: 1
        });

        animation.onfinish = function() {
            text.style.textShadow = '';
        };
    }, 3000);
})();