Open Elements in Background Tab

將選定的元素在背景分頁或新分頁開啟

目前為 2024-11-01 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Open Elements in Background Tab
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  將選定的元素在背景分頁或新分頁開啟
// @author       You
// @match        https://tixcraft.com/ticket/area/*
// @grant        GM_openInTab
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // 選擇所有符合條件的 `<a>` 元素,這裡假設使用 class `select_form_b` 作為範例
    const elements = document.querySelectorAll('.select_form_b > a');

    elements.forEach(element => {
        // 使用 GM_openInTab 以在背景分頁開啟
        GM_openInTab(element.href, { active: false });
    });
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址