Skip to content

Instantly share code, notes, and snippets.

@AvverbioPronome
Created October 10, 2020 08:23
Show Gist options
  • Save AvverbioPronome/28c57a2634e4e7e3358cbe69163d3183 to your computer and use it in GitHub Desktop.
Save AvverbioPronome/28c57a2634e4e7e3358cbe69163d3183 to your computer and use it in GitHub Desktop.
force facebook 2020 interface to use the light theme
// ==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
)
//)
})();
@AvverbioPronome
Copy link
Author

This is not optimal, it works but it takes some time. Refinements welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment