wckfxhs

用于测试

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         wckfxhs
// @namespace    http://tampermonkey.net/
// @version      0.1.2
// @description  用于测试
// @author       You
// @match        https://*/*
// @grant        unsafeWindow
// @require      https://cdn.staticfile.org/jquery/1.10.2/jquerdescirptiony.min.js
// @include      https://ark.xiaohongshu.com/app-order/dispatch/waybill/wait
// @license      MIT
// ==/UserScript==

// 等待网页完成加载
   (function () {
        'use strict';
        setTimeout(function () {
            var targetElement = document.querySelector('.table-op-row');
            console.log('targetElement', targetElement);
            if (targetElement) {
                var newButton = document.createElement('button');
                newButton.textContent = '打开小眼睛';
                newButton.style.marginLeft = '10px';
                newButton.classList.add('d-button');
                newButton.classList.add('d-button-default');
                newButton.classList.add('d-button-with-content');
                newButton.classList.add('--color-static');
                newButton.classList.add('bold');
                newButton.classList.add('--color-bg-primary');
                newButton.classList.add('--color-white');
                newButton.addEventListener('click', function () {
                    var elements = document.querySelectorAll('img[data-v-589d67da]');
                    for (var i = 0; i < elements.length; i++) {
                        var element = elements[i];
                        var clickEvent = new MouseEvent('click', {
                            bubbles: true,
                            cancelable: true,
                        });
                        element.dispatchEvent(clickEvent);
                    }
                });
                targetElement.appendChild(newButton);
            } else {
                console.error('Target element not found.');
            }
        }, 5000);
    })();