Welcome to the Power Users community on Codidact!
Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.
Permanently disable motivational messages and animations on duolingo.com
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.
Is there a way to permanently switch them off? Maybe with a user scrip?
1 answer
The following users marked this post as Works for me:
User | Comment | Date |
---|---|---|
samcarter | (no comment) | Jun 19, 2023 at 18:17 |
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);
}
}
0 comment threads