SHOW:
|
|
- or go back to the newest paste.
| 1 | // ==UserScript== | |
| 2 | - | // @name padoru padoru |
| 2 | + | // @name Padoru Padoru 2021 |
| 3 | // @version 2.0 | |
| 4 | // @icon https://i.fiery.me/FwdBW.gif | |
| 5 | // @namespace * | |
| 6 | // @include http://iichan.hk/* | |
| 7 | // @include http://*.iichan.hk/* | |
| 8 | // @include https://iichan.hk/* | |
| 9 | // @include https://*.iichan.hk/* | |
| 10 | // ==/UserScript== | |
| 11 | ||
| 12 | function animateChibi(event){
| |
| 13 | var element = event.target; | |
| 14 | ||
| 15 | if(typeof(element.src) != 'undefined' && element.hasAttribute('framesRunning')) {
| |
| 16 | switch(element.src) {
| |
| 17 | case element.getAttribute('framesStill'):
| |
| 18 | element.src = element.getAttribute('framesRunning');
| |
| 19 | break; | |
| 20 | case element.getAttribute('framesRunning'):
| |
| 21 | element.src = element.getAttribute('framesStill');
| |
| 22 | break; | |
| 23 | } | |
| 24 | } | |
| 25 | } | |
| 26 | ||
| 27 | function init(){
| |
| 28 | if(document.location.href.indexOf("/b/") != -1)
| |
| 29 | {
| |
| 30 | /* https://safe.fiery.me/a/LsiVxjLH | |
| 31 | originally from http://iichan.hk/b/res/5090803.html | |
| 32 | */ | |
| 33 | var still = | |
| 34 | [ | |
| 35 | "https://i.fiery.me/FwdBW.gif", /* Chiyo */ | |
| 36 | "https://i.fiery.me/oMEz2.gif", /* Cirno */ | |
| 37 | "https://i.fiery.me/gKGjW.gif", /* CT */ | |
| 38 | "https://i.fiery.me/dXMA7.gif" /* Hurma */ | |
| 39 | ]; | |
| 40 | ||
| 41 | var running = | |
| 42 | [ | |
| 43 | "https://i.fiery.me/9LOei.gif", /* Chiyo */ | |
| 44 | "https://i.fiery.me/bbVeY.gif", /* Cirno */ | |
| 45 | "https://i.fiery.me/0mW4T.gif", /* CT */ | |
| 46 | "https://i.fiery.me/cTvHf.gif" /* Hurma */ | |
| 47 | ]; | |
| 48 | ||
| 49 | var form = document.getElementById("postform");
| |
| 50 | if(!form) return; | |
| 51 | if(document.getElementById("chibisTable")) return;
| |
| 52 | ||
| 53 | var newTable = document.createElement("table");
| |
| 54 | newTable.setAttribute('id', 'chibisTable');
| |
| 55 | ||
| 56 | var innerHtml = "<tbody><tr>"; | |
| 57 | for (var i=0; i < still.length; i++) | |
| 58 | {
| |
| 59 | innerHtml += '\ | |
| 60 | <td> \ | |
| 61 | <img \ | |
| 62 | style="cursor: pointer;" \ | |
| 63 | onclick="animateChibi(event);" \ | |
| 64 | framesStill="' + still[i] + '" \ | |
| 65 | framesRunning="' + running[i] + '" \ | |
| 66 | src="' + still[i] + '" \ | |
| 67 | ></img> \ | |
| 68 | </td>'; | |
| 69 | } | |
| 70 | newTable.innerHTML = innerHtml + "</tr></tbody>"; | |
| 71 | form.appendChild(newTable); | |
| 72 | } | |
| 73 | } | |
| 74 | ||
| 75 | init(); | |
| 76 | ||
| 77 | ||
| 78 |