Skip to content

Instantly share code, notes, and snippets.

@Niceblack
Last active September 19, 2016 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Niceblack/3472fee8616cd98de532 to your computer and use it in GitHub Desktop.
Save Niceblack/3472fee8616cd98de532 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Gcup.ru Forum Optimizer
// @namespace GcupForum
// @description Remove some info, resize avatars
// @include https://gcup.ru/forum/*
// @version 1.0
// @grant none
// ==/UserScript==
function removeQuery(query) {
var ifr = document.querySelectorAll(query)
if (ifr.length > 0)
for (var i = 0; i < ifr.length; i++)
ifr[i].parentNode.removeChild(ifr[i])
}
function resizeImages(query, height) {
var ifr = document.querySelectorAll(query)
if (ifr.length > 0)
for (var i = 0; i < ifr.length; i++) {
//ifr[i].setAttribute("width", "64");
ifr[i].setAttribute("height", height);
}
}
// User info
removeQuery(".menuBar") // Количество сообщений
removeQuery(".postRankName") // Имя ранга
removeQuery(".postRankIco") // Картинка ранга
removeQuery(".reputation") // Всего наград, Репутация, Замечания, Сейчас на сайте
// Avatars
resizeImages(".userAvatar", "64")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment