This file contains 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
// Toggleable dark mode for those of us that care about that kind of thing. | |
const toggleButton = '<button class="sidebar__toolbar-button rc-tooltip rc-tooltip--down js-button" aria-label="Toggle Dark Mode">D</button>'; | |
function addDarkModeToggle() { | |
const sidebarToolbar = $('.sidebar__toolbar'); | |
// wait for the sidebar toolbar to be visible | |
// this will also be false if the toolbar doesn't exist yet | |
if(!sidebarToolbar.is(':visible')) { | |
setTimeout(addDarkModeToggle, 250); |
This file contains 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 () { | |
const popupBackgroundColor = '#efefef'; | |
const popupTextColor = '#333'; | |
const popupBorderColor = '#aaa'; | |
function gogoGadgetFootnotePopup() { | |
const footnotes = document.querySelectorAll('.footnote'); | |
footnotes.forEach(node => { | |
node.addEventListener('mouseenter', displayFootnotePopup); | |
node.addEventListener('mouseleave', destroyFootnotePopup); |
This file contains 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
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit } | |
$hexified = "00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00".Split(',') | % { "0x$_"}; | |
$kbLayout = 'HKLM:\System\CurrentControlSet\Control\Keyboard Layout'; | |
New-ItemProperty -Path $kbLayout -Name "Scancode Map" -PropertyType Binary -Value ([byte[]]$hexified); |