Skip to content

Instantly share code, notes, and snippets.

@Shibe
Last active May 1, 2020 22:18
Show Gist options
  • Save Shibe/e47c9fe99b159914af6a34d54887c03f to your computer and use it in GitHub Desktop.
Save Shibe/e47c9fe99b159914af6a34d54887c03f to your computer and use it in GitHub Desktop.
April fools knight for Lichess
// ==UserScript==
// @name Use the april fools knight, as knight on the board.
// @namespace http://tampermonkey.net/
// @version 0.1
// @description improves rating by 1000
// @author Shibe
// @match https://lichess.org/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
};
addGlobalStyle(
'.is2d .knight.white { background-image: url(https://i.imgur.com/gCXGXXi.png); }' +
'.is2d .knight.black { background-image: url(https://i.imgur.com/AL2qSlJ.png); }'
);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment