当前位置:迷你笔记 » 技术 » 用油猴脚本给美国亚马逊Brand Registry批量勾选投诉

用油猴脚本给美国亚马逊Brand Registry批量勾选投诉

(function() {
    'use strict';

    // 添加浮动按钮
    let button = document.createElement('button');
    button.textContent = '一键点击';
    button.style = 'position: fixed; bottom: 20px; right: 20px; z-index: 99999;';
    document.body.appendChild(button);

    // 按钮点击事件
    button.addEventListener('click', function() {
        let labels = document.querySelectorAll('.custom-control-label');
        labels.forEach(label => {
            label.click();
        });
    });
})();

设置油猴的URL用户自定规则为:https://brandregistry.amazon.com/brand/report-a-violation?searchType=KEYWORD&WITH_PARENT_ASIN=*

或者直接使用下面的代码粘贴在油猴里即可:

// ==UserScript==
// @name         Amazon Brand Registry Checkbox Toggler
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Toggle all checkboxes on the Amazon Brand Registry violation report page
// @author       You
// @match        https://brandregistry.amazon.com/brand/report-a-violation?searchType=*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // 创建一个按钮
    var toggleButton = document.createElement('button');
    toggleButton.innerText = 'Toggle Checkboxes';
    toggleButton.style.position = 'fixed';
    toggleButton.style.bottom = '20px';
    toggleButton.style.right = '20px';
    toggleButton.style.zIndex = '9999';
    toggleButton.addEventListener('click', function() {
        // 找到所有的复选框
        var checkboxes = document.querySelectorAll('input[type="checkbox"]');
        checkboxes.forEach(function(checkbox) {
            // 切换复选框状态
            checkbox.click(); // 使用 click() 方法来模拟点击
        });
    });

    // 将按钮添加到页面
    document.body.appendChild(toggleButton);
})();
未经允许不得转载:迷你笔记 » 用油猴脚本给美国亚马逊Brand Registry批量勾选投诉

相关文章

评论 (0)

4 + 6 =