Created
August 8, 2021 09:24
-
-
Save jcwillox/b790653f57572cf1c23dfd5f3e133c32 to your computer and use it in GitHub Desktop.
Userscript extension to log version and name of the script to the console
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
function logVersion(primary = "#039BE5", secondary = "white") { | |
let name = GM_info.script.name.toUpperCase(); | |
let version = GM_info.script.version; | |
console.info( | |
`%c ${name} %c ${version} `, | |
`color: ${secondary}; background: ${primary}; font-weight: 700;`, | |
`color: ${primary}; background: ${secondary}; font-weight: 700;` | |
); | |
} |
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
console.info( | |
`%c ${GM_info.script.name.toUpperCase()} %c ${GM_info.script.version} `, | |
`color: white; background: #039BE5; font-weight: 700;`, | |
`color: #039BE5; background: white; font-weight: 700;` | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment