Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name ROBLOX Developer Forum Improver
- // @namespace http://the-tavern.eu/Vorlias
- // @description Fixes the ROBLOX developer forum
- // @include http://developer.roblox.com/forum/*
- // @version 1.0.1.0
- // @grant none
- // ==/UserScript==
- var settings =
- {
- useLoungeHider: true, // Makes the Lounge topics less... obvious.
- fullyHideLounge: false // Hide lounge posts completely (Needs useLoungeHider enabled)
- && this.useLoungeHider,
- blockSignatures: true, // Block images/spoilers in signatures
- fixGrammar: true, // Fix the hideous grammar the forum has
- removeAdColumn: true, // Removes the ad column on the side, giving more forum room
- ignoreUsers: [ // ignore this user's posts/threads
- ],
- }
- var imgs = $('.kmsgsignature .kmsgimage'); // annoying images
- var sigs = $('.kmsgsignature .kspoiler'); // spoilers
- if (settings.blockSignatures)
- {
- for (var i = 0; i < imgs.length; i++)
- {
- var obj = $(imgs[i]);
- obj.html("[<b>Signature image blocked</b>]");
- }
- for (var i = 0; i < sigs.length; i++)
- {
- var signature = $(sigs[i]).parent().parent().parent()
- signature.html("[<b>Spoiler blocked</b>]");
- }
- }
- if (settings.removeAdColumn)
- {
- // Remove that pointless right column
- $('#right-col').remove();
- $('#middle-col').css("width", "97%");
- }
- if (settings.fixGrammar)
- {
- // Remove the annoying grammar mistakes... ugh.
- var tys = $('.kmessage-thankyou');
- for (var i = 0; i < tys.length; i++)
- {
- var src = $(tys[i]);
- var oldHTML = src.html();
- // "and has also been thanked by ## other(s)" would have been better - but nevermind.
- // Seems whoever wrote this forum software has really terrible english
- var re = /and this user have (\d+) others thankyou/;
- oldHTML = oldHTML.replace(re, "+ $1 other(s)");
- // 'said' is the wrong context, they were thanked without actual posts saying "thank you".
- oldHTML = oldHTML.replace(/The following user\(s\) said Thank You:/,"Users that have thanked this post: ");
- src.html(oldHTML);
- }
- }
- var authors = $('.kwho-user');
- for (var i = 0; i < authors.length; i++)
- {
- var elem = $(authors[i]);
- var user = elem.text();
- for (var j = 0;j < settings.ignoreUsers.length; j++)
- {
- var val = settings.ignoreUsers[j];
- if (val.toLowerCase() === user.toLowerCase())
- elem.parent().parent().parent().parent().remove();
- }
- }
- var is_recent = document.location.toString().search(/\/forum\/recent/g);
- if (is_recent !== -1 && settings.useLoungeHider)
- {
- var results = $('.ktopic-category a');
- for (var i = 0; i < results.length; i++)
- {
- var result = $(results[i]);
- if (result.html() === "Lounge")
- {
- var parent = result.parent().parent().parent().parent();
- if (settings.fullyHideLounge)
- {
- parent.css('display','none');
- }else{
- parent.css('color', '#AAAAAA');
- //parent.find('td').css('background-color','#FFDDDD');
- parent.find(".ktopic-posted-time").html("");
- parent.find(".ktopic-category").css("display","none");
- parent.find("[rel='follow']").attr("style","color:#AAAAAA !important;");
- parent.find("[rel='nofollow']").attr("style","color:#AAAAAA !important;");
- var title = parent.children('.kcol-mid').children('.ktopic-title-cover').children('.ktopic-title');
- title.html(title.html() + " <font style='color:red;font-size:12px;'>[ Off Topic ]</font>");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment