Automatically switch Youtube to its built-in dark theme.
It's possible to use Youtube built-in dark theme, by enabling it using the dedicated menu. But, if like me you automatically clean cache, cookies, history, ... before closing your browser, you need to manually enable it each time you start the browser and navigate to youtube. It might even be worse if you automatically clean cookies after closing tabs: expect to re-enable it each time you close all youtube tabs.
I've made this extension so that it will enable Youtube dark theme automatically for me. After hours of research, I've finally managed to find how to make it work, so I can share it here.
Copyright (C) 2019 Victor VOISIN
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.