wckfxhs

用于测试

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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.

(I already have a user style manager, let me install it!)

// ==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);
    })();