Created
October 10, 2020 08:23
-
-
Save AvverbioPronome/28c57a2634e4e7e3358cbe69163d3183 to your computer and use it in GitHub Desktop.
force facebook 2020 interface to use the light theme
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Force Facebook to use the light theme. | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.facebook.com/* | |
// @grant none | |
// @run-at document-idle | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var $ = window.$; | |
var a; | |
// $(document).ready( | |
a = setInterval( | |
(function(){ | |
$('#facebook').attr('class', $('#facebook').attr('class').replace('dark', 'light')) | |
if($('#facebook').attr('class') == $('#facebook').attr('class').replace('dark', 'light')){ | |
clearInterval(a); | |
} | |
}), | |
50 | |
) | |
//) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is not optimal, it works but it takes some time. Refinements welcome.