Skip to content

Instantly share code, notes, and snippets.

@zackbcom
Created December 7, 2017 17:16
Show Gist options
  • Save zackbcom/d227f11ef092ed2702dd0356a1ef73c3 to your computer and use it in GitHub Desktop.
Save zackbcom/d227f11ef092ed2702dd0356a1ef73c3 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name linearKittens
// @namespace https://github.com/dwhalen/linearKittens
// @version 6.6.6
// @description Launch linearKittens and start
// @include *bloodrizer.ru/games/kittens/*
// ==/UserScript==
var loadTest = function() {
if (typeof gamePage === 'undefined') {
// Test if kittens game is already loaded or wait 2s and try again
setTimeout(function(){
loadTest();
}, 2000);
} else {
var script = document.createElement('script');
script.id = 'linearKittens-script';
script.src = 'https://rawgit.com/dwhalen/linearKittens/master/linearKittens.js';
document.body.appendChild(script);
setTimeout(function(){
startLinearKittens();
}, 3000);
}
};
loadTest();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment