Podání #39030 » Viletova.Medicina.Tampermonkey.js
1 |
// ==UserScript==
|
---|---|
2 |
// @name Viletova medicina
|
3 |
// @namespace http://tampermonkey.net/
|
4 |
// @version 0.1
|
5 |
// @description Přinese pohodu a klid
|
6 |
// @author Ondřej Kotas
|
7 |
// @match https://forum.pirati.cz/viewtopic.php*
|
8 |
// @icon https://www.google.com/s2/favicons?sz=64&domain=pirati.cz
|
9 |
// @require http://code.jquery.com/jquery-3.4.1.min.js
|
10 |
// @grant none
|
11 |
// ==/UserScript==
|
12 |
|
13 |
(function() { |
14 |
'use strict'; |
15 |
|
16 |
var $jq = jQuery.noConflict(); // noConflict to prevent mismatch with jQuery used on forum |
17 |
|
18 |
$jq(document).ready(function() { |
19 |
$jq("div.post").each(function(postNum) { |
20 |
if($jq(this).find("p.author").text().indexOf('Petr.Vileta') >= 0) { |
21 |
$jq(this).find(".postprofile").hide(); |
22 |
$jq(this).find(".postbody").hide(); |
23 |
$jq(this).find(".back2top").hide(); |
24 |
|
25 |
$jq(this).on("click", function() { |
26 |
$jq(this).find(".postprofile").show(); |
27 |
$jq(this).find(".postbody").show(); |
28 |
$jq(this).find(".back2top").show(); |
29 |
$jq(this).find(".ignore").hide(); |
30 |
});
|
31 |
|
32 |
$jq(this).find(".postbody").after("<div class=\"ignore\">Tento příspěvek napsal <b>Petr.Vileta</b>.<br /> <br />Klikni kamkoliv na tento příspěvek pro zobrazení jeho obsahu.</div>"); |
33 |
}
|
34 |
});
|
35 |
});
|
36 |
})();
|
- « Předchozí
- 1
- 2
- Další »