Skip to content

Instantly share code, notes, and snippets.

@vladkorotnev
Last active August 29, 2015 14:27
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save vladkorotnev/84598aa1245e58c18abb to your computer and use it in GitHub Desktop.
Pikabu Suzumiya Haruhi themed mascot installer (thx to the image author http://pikabu.ru/profile/PrincessPanda)
// ==UserScript==
// @name Pikabu Haruhiism
// @namespace http://ryuunosuke.me/
// @version 0.1
// @description thx to http://pikabu.ru/story/pechenki_po_suzumiya_haruhi_no_yuuutsu_3559752#comments
// @author Akasaka Ryuunosuke
// @match http://pikabu.ru/*
// @grant none
// ==/UserScript==
if(document.getElementById("brovdiv") != null) {
var root="//software.vladkorotnev.me/service/customcookie/haruhi/";
var images = ["haruhi_k.png","haruhi.png","mikuru.png","nagato.png","kyon.png","koizumi.png"];
var descriptions = ["Судзумия Харухи (версия Коёэн)","Судзумия Харухи","Асахина Микуру","Нагато Юки","Кён","Коидзуми Ицки"];
var clink = document.getElementById("brovdiv").children[0];
var imgel = clink.children[0];
var i=Math.floor(Math.random()*images.length);
clink.href = "http://pikabu.ru/story/pechenki_po_suzumiya_haruhi_no_yuuutsu_3559752";
imgel.title = descriptions[i];
imgel.src= root+images[i];
imgel.height=300;
$('.footer-fornex').html('Печеньки by<a href="http://pikabu.ru/story/pechenki_po_suzumiya_haruhi_no_yuuutsu_3559752">PrincessPanda</a>');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment