SHOW:
|
|
- or go back to the newest paste.
1 | // ==UserScript== | |
2 | // @name Derpibooru Downvote Links | |
3 | // @namespace N/A | |
4 | // @author Background Pony | |
5 | // @description Adds downvote links to the thumbnails on derpibooru. | |
6 | - | // @version 1 |
6 | + | // @version 1.1 |
7 | // @include https://derpiboo.ru/* | |
8 | // @include https://derpibooru.org/* | |
9 | // @include https://trixiebooru.org/* | |
10 | // @include https://derpy-hoov.es/* | |
11 | // @include http://derpiboo.ru/* | |
12 | // @include http://derpibooru.org/* | |
13 | // @include http://trixiebooru.org/* | |
14 | // @include http://derpy-hoov.es/* | |
15 | // @grant none | |
16 | // ==/UserScript== | |
17 | ||
18 | // This software is public domain. | |
19 | // Do whatever you like with it, as long as you have fun. | |
20 | // Life is too short for worry, anger or bitterness. | |
21 | ||
22 | - | function AddDownvoteLinks () |
22 | + | function AddDownvoteLink () |
23 | { | |
24 | ||
25 | var link_start = ' • <a class="vote_down_link" data-image-id="'; | |
26 | var link_end = '" href="#" rel="nofollow"><span class="downvote-span-downvoted">neigh</span><span class="downvote-span">neigh</span></a>'; | |
27 | ||
28 | function addLink( index ) | |
29 | { | |
30 | var imgid = $(this).attr("data-image-id"); | |
31 | $(this).children("span").append(link_start + imgid + link_end); | |
32 | } | |
33 | ||
34 | function addAllLinks() | |
35 | { | |
36 | $("div.imageinfo").each( addLink ); | |
37 | } | |
38 | ||
39 | addAllLinks(); | |
40 | window.booru.interactions.setupLinks1(); | |
41 | ||
42 | } | |
43 | ||
44 | (function () { | |
45 | 'use strict'; | |
46 | ||
47 | var script = document.createElement('script'); | |
48 | var script2 = document.createElement('script'); | |
49 | - | script.textContent = '(' + AddDownvoteLinks.toString() + ')();'; |
49 | + | |
50 | script.textContent = '(' + AddDownvoteLink.toString() + ')();'; | |
51 | ||
52 | script2.textContent = $("body > div").next().next().next().text(); | |
53 | ||
54 | document.body.appendChild(script); | |
55 | document.body.appendChild(script2); | |
56 | }()); |