Field Raider Firefox

Bypass field restrictions when pasting data from the clipboard (Ctrl + Alt + V)

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

// ==UserScript==
// @name         Field Raider Firefox
// @namespace    http://tampermonkey.net/
// @version      1.72
// @description  Bypass field restrictions when pasting data from the clipboard (Ctrl + Alt + V)
// @author       Seth@WiiPlaza
// @match        :///*
// @icon         https://pbs.twimg.com/media/FR11DSvX0AI1W44.png
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const excludeRegex = /https?:\/\/.*?\.(facebook\.com|messenger\.com|google\.com|github\.com|imgur\.com).*/;
    const includeRegex = /https?:\/\/.*/;

    const allowCopyAndPaste = function(e) {
        e.stopImmediatePropagation();
        return true;
    };

    const isRestrictedSite = () => {
        const location = window.location.href;
        return includeRegex.test(location) && !excludeRegex.test(location);
    };

    const pasteCippi = async () => {
        const elemsUndeRat = document.querySelectorAll(":hover");
        const lastElemUndeRat = elemsUndeRat[elemsUndeRat.length - 1];
        const textInClippi = await navigator.clipboard.readText();
        if (lastElemUndeRat.tagName === 'INPUT' || lastElemUndeRat.tagName === 'TEXTAREA') {
            lastElemUndeRat.value = textInClippi;
        }
    };

    const triggerMoi = (event) => {
        if (event.altKey && event.ctrlKey && event.key === "y") { 
            pasteCippi();
        }
    };

    document.addEventListener('keyup', triggerMoi, false);

    if (isRestrictedSite()) {
        document.addEventListener('copy', allowCopyAndPaste, true);
        document.addEventListener('paste', allowCopyAndPaste, true);
    }

})();

QingJ © 2025

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