Skip to content

Instantly share code, notes, and snippets.

@happiness801
Last active January 28, 2021 06:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save happiness801/80887534efadce0e86ff03669953cf05 to your computer and use it in GitHub Desktop.
Save happiness801/80887534efadce0e86ff03669953cf05 to your computer and use it in GitHub Desktop.
Simple Nyan.cat
// ==UserScript==
// @name Simple nyan.cat
// @namespace http://onai.net/
// @version 0.2
// @description Simplies Nyan.cat just for fun
// @author Kevin Gwynn
// @match http://nyan.cat/*
// @match http://www.nyan.cat/*
// @grant none
// ==/UserScript==
(function() {
// Make sure jQuery is available
var gen = 0;var act=function(){gen=1;var script=document.createElement('script');script.src='//code.jquery.com/jquery-1.11.0.min.js';script.type='text/javascript';document.getElementsByTagName('head')[0].appendChild(script);};(!window.jQuery)?act():1;setTimeout(function(){console.log('jQuery '+(gen?'loaded: ':'existing: ')+(window.jQuery?jQuery().jquery:'no jQuery/load failed'));}, 500);
var improveNav = function() {
console.log('KAG: NYANCAT');
let jQuery = $ || jQuery;
jQuery('#langchooser').remove();
jQuery('.col-md-8 DIV:first').remove();
jQuery('.col-md-2:nth(2)').remove();
jQuery('IMG[src="/images/lovebot.gif"]').remove();
// jQuery('#timer').hide();
jQuery('iframe').remove();
jQuery('.row:last').remove();
jQuery('.col-md-3:last').remove();
jQuery('#mySidenav').css('z-index', '1000');
// Make the media player and "pick a flavor" button bettersizes
jQuery('.fadeInOut .col-md-3:first').removeClass('col-md-3').addClass('col-md-6');
// Makes the last row mostly invisible but fades in on mouse-over
jQuery('<style type="text/css"> .fadeInOut { opacity: 0.02; transition: 0.3s all ease-in-out; } .fadeInOut:hover { opacity:1; } </style>').appendTo('head');
jQuery('.row:last').addClass('fadeInOut');
}
var removeCruft = function() {
jQuery('iframe').remove();
}
improveNav();
setTimeout(removeCruft, 2500);
})();
@happiness801
Copy link
Author

Easily the weirdest userscript I've made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment