-
-
Save Niceblack/3472fee8616cd98de532 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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