Duolingo Simple XP Cheat

Get Duolingo XP easily

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name         Duolingo Simple XP Cheat
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Get Duolingo XP easily
// @author       You
// @match        *://*.duolingo.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Duolingo PRO API URL
    const apiURL = "https://api.duolingopro.net";
    
    // Add XP button
    function addXpButton() {
        if (document.querySelector('#dlp-xp-button')) return;
        
        const button = document.createElement('button');
        button.id = 'dlp-xp-button';
        button.textContent = 'GET XP';
        button.style.cssText = `
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 9999;
            background: #1cb0f6;
            color: white;
            border: none;
            border-radius: 16px;
            padding: 12px 24px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        `;
        
        button.addEventListener('click', getXP);
        document.body.appendChild(button);
    }
    
    // Function to get XP
    async function getXP() {
        try {
            const button = document.querySelector('#dlp-xp-button');
            const originalText = button.textContent;
            button.textContent = 'GETTING...';
            button.disabled = true;
            
            // Get JWT token from cookies
            const cookies = document.cookie.split(';');
            let jwtToken = '';
            for (let cookie of cookies) {
                if (cookie.trim().startsWith('jwt_token=')) {
                    jwtToken = cookie.split('=')[1];
                    break;
                }
            }
            
            if (!jwtToken) {
                alert('Please login to Duolingo first');
                button.textContent = originalText;
                button.disabled = false;
                return;
            }
            
            // Request XP (amount - 100)
            const response = await fetch(apiURL + '/request', {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json',
                    'Authorization': 'Bearer ' + jwtToken
                },
                body: JSON.stringify({
                    type: 'xp',
                    amount: 100,
                    version: '3.1BETA.04.2',
                    lang: 'en'
                })
            });
            
            const data = await response.json();
            
            if (data.status === 'completed') {
                button.textContent = '✓ XP ADDED';
                setTimeout(() => {
                    button.textContent = originalText;
                    button.disabled = false;
                }, 3000);
                
                // Show notification
                alert('100 XP added successfully!');
                
            } else {
                alert('Failed to get XP: ' + (data.notification?.body || 'Unknown error'));
                button.textContent = originalText;
                button.disabled = false;
            }
            
        } catch (error) {
            console.error('Error:', error);
            alert('Error getting XP. Check console for details.');
            document.querySelector('#dlp-xp-button').textContent = 'GET XP';
            document.querySelector('#dlp-xp-button').disabled = false;
        }
    }
    
    // Initialize
    setTimeout(addXpButton, 3000);
    
    // Also add on page changes
    let lastUrl = location.href;
    new MutationObserver(() => {
        const url = location.href;
        if (url !== lastUrl) {
            lastUrl = url;
            setTimeout(addXpButton, 3000);
        }
    }).observe(document, {subtree: true, childList: true});
    
})();