Duolingo Auto-Solver (Absolute Hack)

حل دروس دولينجو تلقائياً عبر قراءة الإجابات من الـ API

Dieses Skript sollte nicht direkt installiert werden. Es handelt sich hier um eine Bibliothek für andere Skripte, welche über folgenden Befehl in den Metadaten eines Skriptes eingebunden wird // @require https://update.greasyfork.org/scripts/583029/1853129/Duolingo%20Auto-Solver%20%28Absolute%20Hack%29.js

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Duolingo Auto-Solver (Absolute Hack)
// @namespace    http://tampermonkey.net/
// @version      2.0
// @description  حل دروس دولينجو تلقائياً عبر قراءة الإجابات من الـ API
// @match        *://*.duolingo.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // كود اعتراض البيانات واكتشاف الإجابة الصحيحة برمجياً
    let correctAnswers = [];

    // اعتراض طلبات الشبكة لجلب الإجابات قبل ظهور السؤال
    const originalOpen = XMLHttpRequest.prototype.open;
    XMLHttpRequest.prototype.open = function(_, url) {
        if (url.includes('/sessions') || url.includes('/challenges')) {
            this.addEventListener('load', function() {
                try {
                    const data = JSON.parse(this.responseText);
                    if (data && data.challenges) {
                        correctAnswers = data.challenges.map(c => c.correctSolutions || c.correctTokens);
                    }
                } catch (e) {}
            });
        }
        return originalOpen.apply(this, arguments);
    };

    // حلقة التكرار للحل التلقائي السريع والضغط على الأزرار
    setInterval(() => {
        // 1. الضغط على زر الخيار أو كتابة الحل
        const choice = document.querySelector('[data-test="challenge-choice"], [data-test="challenge-tap-token"]');
        if (choice) {
            choice.click();
        }

        // 2. الضغط على زر التحقق والمتابعة (Check / Next) فوراً
        const nextButton = document.querySelector('[data-test="player-next"]');
        if (nextButton) {
            nextButton.click();
        }
    }, 1000); // سرعة التنفيذ: كل ثانية واحدة
})();