Skip to content

Instantly share code, notes, and snippets.

@akuhn
Last active April 27, 2017 13:05
Show Gist options
  • Save akuhn/bc46c826c24440943e42 to your computer and use it in GitHub Desktop.
Save akuhn/bc46c826c24440943e42 to your computer and use it in GitHub Desktop.
// ==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