Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read
Q&A

Permanently disable motivational messages and animations on duolingo.com

+3
−0

I'm using firefox to access duolingo. The website offers settings to disable motivational messages and animations. However the settings frequently turn themselves back on automatically.

screenshot of the duolingo preferences

Is there a way to permanently switch them off? Maybe with a user scrip?

Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

1 answer

+3
−0

The problem is that these two settings are only stored in the local storage of the browser and not transmitted to duolingo. This means that when the local storage is cleared for some reason (for me, the local storage gets cleared when restarting the firefox), these settings are lost.

As a workaround, I wrote the following tampermonkey user script, which will check the local storage if these settings are switched off and, if necessary, will alter the local storage to disable them:

// ==UserScript==
// @name         duolingo
// @description  manipulate localStorage
// @version      1.0
// @match        *.duolingo.com/*
// @run-at       document-start
// @grant        GM_cookie
// ==/UserScript==

var myitem = localStorage.getItem('duo.state');

if (myitem === null )
{
    // local storage does not exist
} else {
    // local storage exists

    // check for reduced motion - should be true, if not change it
    if ( myitem.search('"prefersReducedMotion":false') > -1 ){
        myitem=myitem.replace('"prefersReducedMotion":false','"prefersReducedMotion":true');
        localStorage.setItem('duo.state',myitem);
    }

    myitem = localStorage.getItem('duo.state');

    // check for coachEnabled - should be false, if not change it
    if ( myitem.search('"coachEnabled":true') > -1 ){
        myitem=myitem.replace('"coachEnabled":true','"coachEnabled":false');
        localStorage.setItem('duo.state',myitem);
    }

}
Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »

This community is part of the Codidact network. We have other communities too — take a look!

You can also join us in chat!

Want to advertise this community? Use our templates!

Like what we're doing? Support us! Donate