Duolingo Simple XP Cheat

Get Duolingo XP easily

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==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});
    
})();