Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Padoru Padoru 2021
- // @version 2.0
- // @icon https://i.fiery.me/FwdBW.gif
- // @namespace *
- // @include http://iichan.hk/*
- // @include http://*.iichan.hk/*
- // @include https://iichan.hk/*
- // @include https://*.iichan.hk/*
- // ==/UserScript==
- function animateChibi(event){
- var element = event.target;
- if(typeof(element.src) != 'undefined' && element.hasAttribute('framesRunning')) {
- switch(element.src) {
- case element.getAttribute('framesStill'):
- element.src = element.getAttribute('framesRunning');
- break;
- case element.getAttribute('framesRunning'):
- element.src = element.getAttribute('framesStill');
- break;
- }
- }
- }
- function init(){
- if(document.location.href.indexOf("/b/") != -1)
- {
- /* https://safe.fiery.me/a/LsiVxjLH
- originally from http://iichan.hk/b/res/5090803.html
- */
- var still =
- [
- "https://i.fiery.me/FwdBW.gif", /* Chiyo */
- "https://i.fiery.me/oMEz2.gif", /* Cirno */
- "https://i.fiery.me/gKGjW.gif", /* CT */
- "https://i.fiery.me/dXMA7.gif" /* Hurma */
- ];
- var running =
- [
- "https://i.fiery.me/9LOei.gif", /* Chiyo */
- "https://i.fiery.me/bbVeY.gif", /* Cirno */
- "https://i.fiery.me/0mW4T.gif", /* CT */
- "https://i.fiery.me/cTvHf.gif" /* Hurma */
- ];
- var form = document.getElementById("postform");
- if(!form) return;
- if(document.getElementById("chibisTable")) return;
- var newTable = document.createElement("table");
- newTable.setAttribute('id', 'chibisTable');
- var innerHtml = "<tbody><tr>";
- for (var i=0; i < still.length; i++)
- {
- innerHtml += '\
- <td> \
- <img \
- style="cursor: pointer;" \
- onclick="animateChibi(event);" \
- framesStill="' + still[i] + '" \
- framesRunning="' + running[i] + '" \
- src="' + still[i] + '" \
- ></img> \
- </td>';
- }
- newTable.innerHTML = innerHtml + "</tr></tbody>";
- form.appendChild(newTable);
- }
- }
- init();
Advertisement
Add Comment
Please, Sign In to add comment