scripts-greasemonkey: invidio_dark_theme, improve log message
This commit is contained in:
parent
3b0c894274
commit
7acf613c58
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name Invidious - Dark Mode
|
||||
// @version 1.1.6
|
||||
// @version 1.1.7
|
||||
// @author Jesús E.
|
||||
// @license GPL version 3 or any later version::: https://www.gnu.org/licenses/gpl-3.0.html
|
||||
// @description This script automatically toggles dark mode on Invidious and its various public instances.
|
||||
@ -21,12 +21,16 @@
|
||||
// ==/UserScript==
|
||||
|
||||
window.addEventListener('load', () => {
|
||||
let consoleCSS = 'background: #000; color: #00FF00; padding: 0px 7px; border: 1px solid #00FF00; line-height: 16px;';
|
||||
const consoleCSS = 'background: #000; color: #00FF00; padding: 0px 7px; border: 1px solid #00FF00; line-height: 16px;';
|
||||
const name = GM_info.script.name;
|
||||
const version = GM_info.script.version;
|
||||
const log = (...args) => console.log('%cUSERSCRIPT | %s %s | %s', consoleCSS, name, version, ...args);
|
||||
|
||||
log('successfully initialized');
|
||||
|
||||
let defaultMode = document.getElementsByClassName('ion-ios-moon')[0];
|
||||
if (defaultMode != null) {
|
||||
defaultMode.click();
|
||||
log('Dark theme ready!');
|
||||
}
|
||||
|
||||
console.log("%cUSERSCRIPT | " + GM_info.script.name + " " + GM_info.script.version + " | successfully initialized", consoleCSS);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user