Duolingo Simple XP Cheat

Get Duolingo XP easily

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==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});
    
})();