File size: 2,425 Bytes
364eb96
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// MnkLightning Injector
// Run this in the browser console on Monkeytype.com

(function () {
    console.log("%c MnkLightning Injector Active ", "background: #222; color: #00ff00; font-size: 16px");
    console.log("Press 'Insert' key to copy current words to clipboard for the Python script.");

    function getVisibleText() {
        const words = document.querySelectorAll('.word');
        let textBuffer = [];

        words.forEach(word => {
            let wordText = "";
            word.querySelectorAll('letter').forEach(letter => {
                wordText += letter.textContent;
            });
            textBuffer.push(wordText);
        });

        return textBuffer.join(' ');
    }

    window.addEventListener('keydown', (e) => {
        if (e.key === 'Insert') {
            e.preventDefault();
            const text = getVisibleText();

            // Modern clipboard API
            navigator.clipboard.writeText(text).then(() => {
                console.log(`%c Copied ${text.length} chars to clipboard! `, "color: #00ff00");
                console.log("Now start the Python script and press the trigger key.");

                // Visual feedback
                const notification = document.createElement('div');
                notification.textContent = "MnkLightning: Text Copied!";
                notification.style.cssText = `

                        position: fixed;

                        top: 20px;

                        right: 20px;

                        background: #333;

                        color: #fff;

                        padding: 10px 20px;

                        border-radius: 5px;

                        z-index: 9999;

                        font-family: monospace;

                        transition: opacity 0.5s;

                    `;
                document.body.appendChild(notification);
                setTimeout(() => {
                    notification.style.opacity = '0';
                    setTimeout(() => notification.remove(), 500);
                }, 2000);
            }).catch(err => {
                console.error("Failed to copy text: ", err);
            });
        }
    });

    // Optional: Auto-copy on load if words are present
    // setTimeout(() => {
    //    if (document.querySelector('.word')) console.log("Ready. Press Insert.");
    // }, 1000);

})();