Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Tuts4You Sanitizer
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description try to take over the world!
- // @author You
- // @match https://forum.tuts4you.com/*
- // @grant none
- // ==/UserScript==
- /* jshint -W097 */
- 'use strict';
- // Your code here...
- function addGlobalStyle(css) {
- if (typeof GM_addStyle != "undefined") {
- GM_addStyle(css);
- } else if (typeof PRO_addStyle != "undefined") {
- PRO_addStyle(css);
- } else if (typeof addStyle != "undefined") {
- addStyle(css);
- } else {
- var node = document.createElement("style");
- node.type = "text/css";
- node.appendChild(document.createTextNode(css));
- var heads = document.getElementsByTagName("head");
- if (heads.length > 0) {
- heads[0].appendChild(node);
- } else {
- // no head yet, stick it whereever
- document.documentElement.appendChild(node);
- }
- }
- }
- var css = "";
- css += [
- //set the font everywhere
- 'body, font, input, td, th, a { font-family: Tahoma, sans-serif; }',
- // hyperlink color and underline
- 'a { color: #c60; text-decoration: none; }',
- 'a:hover { text-decoration: underline; }',
- // hide "Header", "Create" button on top and post counts for each subforum
- '.ipsPageHeader { display: none; }',
- '#cCreate { display: none;}',
- '.ipsDataItem_statsLarge { display: none;}',
- '#elCopyright { display: none;}',
- // widen sidebar
- '#ipsLayout_sidebar { min-width: 415px; max-width: 365px; padding: 10px 0 10px 0;}',
- // font sizes.
- '.ipsType_large { font-size: 14px; }',
- 'body { font-size: 12px; }',
- '.ipsWidget .ipsDataItem_title { font-size: 12px; }',
- '.ipsType_medium { font-size: 12px; }',
- // User avatars, rounded edges, not circles.
- '.ipsUserPhoto_xlarge img, img.ipsUserPhoto_xlarge, .ipsUserPhoto_xlarge:after { border-radius: 20px; }',
- '.ipsUserPhoto_large img, img.ipsUserPhoto_large, .ipsUserPhoto_large:after { border-radius: 15px; }',
- '.ipsUserPhoto_medium img, img.ipsUserPhoto_medium, .ipsUserPhoto_medium:after { border-radius: 12px; }',
- '.ipsUserPhoto_small img, img.ipsUserPhoto_small, .ipsUserPhoto_small:after { border-radius: 9px; }',
- '.ipsUserPhoto_tiny img, img.ipsUserPhoto_tiny, .ipsUserPhoto_tiny:after { border-radius: 6px; }',
- '.ipsUserPhoto_mini img, img.ipsUserPhoto_mini, .ipsUserPhoto_mini:after { border-radius: 7px; }',
- // posts, separate author info from post content
- '.cAuthorPane {background: #f3f3f3;}',
- 'ul.cAuthorPane_info > li.ipsResponsive_hidePhone { display: none; }',
- 'ul.cAuthorPane_info > li.ipsType_break { display: block; }',
- // remove extra padding and margins
- '.ipsType_sectionTitle { padding: 10px 10px 10px 10px}',
- '.ipsDataList_large .ipsDataItem_main, .ipsDataList_large .ipsDataItem_stats, .ipsDataList_large .ipsDataItem_lastPoster, .ipsDataList_large .ipsDataItem_generic { padding: 10px 10px; }',
- '.ipsBreadcrumb.ipsBreadcrumb_top { margin: 0px 20px 0px 20px; }',
- '.ipsDataItem_title { margin: 0 0 0 0; }',
- '.ipsApp .ipsSpacer_bottom, .ipsApp .ipsSpacer_both { margin-bottom: 5px; }',
- '.ipsDataItem_main, .ipsDataItem_stats, .ipsDataItem_lastPoster, .ipsDataItem_generic, .ipsDataItem_modCheck, .ipsDataItem_icon { padding: 5px 5px; }',
- '.cTopicList .ipsDataItem_main { padding: 5px 5px; }',
- // subforum icons, idea based on ipsfocus
- '.ipsItemStatus.ipsItemStatus_large, .ipsItemStatus.ipsItemStatus_large.ipsItemStatus_read { background: transparent; border-radius: 3px; color: #5884AD; font-size: 21px; line-height: 36px; height: 36px; width: 36px; vertical-align: top; }',
- // rounded borders of sections titles
- '.ipsType_sectionTitle, .ipsWidget_title { ; border-radius: 4px 4px 0 0;}',
- ''
- ].join("\n");
- addGlobalStyle(css);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement