Last active
April 27, 2017 13:05
-
-
Save akuhn/bc46c826c24440943e42 to your computer and use it in GitHub Desktop.
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
// ==UserScript== | |
// @name Github Praise | |
// @namespace example | |
// @include https://git.musta.ch/* | |
// @include https://github.com/* | |
// @version 1.2 | |
// @grant GM_addStyle | |
// ==/UserScript== | |
GM_addStyle('.line-age { padding: 0px 12px !important; }'); | |
function praise() { | |
var node = document.querySelector('a[href*=blame]'); | |
if (node && node.innerText == 'Blame') { | |
node.innerText = 'Praise'; | |
} | |
} | |
var token = null; | |
document.addEventListener( | |
"DOMNodeInserted", | |
function() { clearTimeout(token); token = setTimeout(praise, 1); }, | |
false | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment