-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForumStyle.user.js
More file actions
67 lines (52 loc) · 2.21 KB
/
Copy pathForumStyle.user.js
File metadata and controls
67 lines (52 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// ==UserScript==
// @name Pirati phpBB style
// @namespace http://pirati.cz/
// @version 0.37
// @description Extention for Stylish script on forum.pirati.cz
// @author Ondrej Kotas
// @match https://forum.pirati.cz/*
// @grant none
// ==/UserScript==
$("a.lastsubject").each(function() {
$( this ).text($( this).attr("title"));
});
$("a[itemprop='url']").each(function() {
$( this ).text($( this).attr("title"));
});
$("#nav-main li.rightside:not(:first)").each(function() {
var prevLeft = parseFloat($( this ).prev().css("left").replace(/[^-\d\.]/g, ''));
prevLeft = prevLeft || 0;
var prevWidth = $ ( this ).prev().width();
$( this ).css("left", prevLeft + prevWidth + 10);
});
var newTopics = $("#nav-main li.responsive-hide:contains('Nové')");
newTopics.html(newTopics.html().replace("Nové", "Nového"));
var activeTopics = $("#nav-main li.responsive-hide:first");
activeTopics.parent().append(activeTopics);
var navMain = $("#nav-main");
var logout = $("#username_logged_in a[title='Odhlásit se']").clone();
logout.attr("id", "ok_logoutButton");
navMain.append(logout);
var modPanel = $("#quick-links a[title='Moderátorský panel']").clone();
modPanel.attr("id", "ok_modPanel");
navMain.append(modPanel);
var thanksList = $("#quick-links a[href='/app.php/thankslist']").clone();
thanksList.attr("id", "ok_thanksList");
navMain.append(thanksList);
var groupsList = modPanel.clone();
groupsList.find("span").text("Nastavit zobrazovaná fóra");
groupsList.attr("href", "https://forum.pirati.cz/ucp.php?i=167");
groupsList.attr("id", "ok_groupsList");
groupsList.find("i").addClass("fa-user-plus").removeClass("fa-thumbs-o-up");
navMain.append(groupsList);
$(".postbody .post-buttons .button span:contains('Upravit')").addClass("ok_showText");
$(".postbody .post-buttons .button span:contains('Citace')").addClass("ok_showText");
var thanksButton = $(".postbody .post-buttons .button span:contains('Poděkujte')");
if(thanksButton.length) {
thanksButton.addClass("ok_showText");
thanksButton.html(thanksButton.html().replace("Poděkujte", "Dík"));
}
$("div.post").each(function(){
var notice = $( this ).find("div.notice");
$( this ).find("div.signature").append(notice);
});