Advertisement
Guest User

t4u

a guest
Nov 24th, 2015
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Tuts4You Sanitizer
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1
  5. // @description  try to take over the world!
  6. // @author       You
  7. // @match        https://forum.tuts4you.com/*
  8. // @grant        none
  9. // ==/UserScript==
  10. /* jshint -W097 */
  11. 'use strict';
  12.  
  13. // Your code here...
  14. function addGlobalStyle(css) {
  15. if (typeof GM_addStyle != "undefined") {
  16.     GM_addStyle(css);
  17. } else if (typeof PRO_addStyle != "undefined") {
  18.     PRO_addStyle(css);
  19. } else if (typeof addStyle != "undefined") {
  20.     addStyle(css);
  21. } else {
  22.     var node = document.createElement("style");
  23.     node.type = "text/css";
  24.     node.appendChild(document.createTextNode(css));
  25.     var heads = document.getElementsByTagName("head");
  26.     if (heads.length > 0) {
  27.         heads[0].appendChild(node);
  28.     } else {
  29.         // no head yet, stick it whereever
  30.         document.documentElement.appendChild(node);
  31.     }
  32. }
  33. }
  34.  
  35. var css = "";
  36.  
  37. css += [
  38.    
  39. //set the font everywhere
  40. 'body, font, input, td, th, a { font-family: Tahoma, sans-serif; }',
  41.  
  42. // hyperlink color and underline
  43. 'a { color: #c60; text-decoration: none; }',
  44. 'a:hover { text-decoration: underline; }',
  45.    
  46. // hide "Header", "Create" button on top and post counts for each subforum
  47. '.ipsPageHeader { display: none; }',
  48. '#cCreate { display: none;}',
  49. '.ipsDataItem_statsLarge { display: none;}',
  50. '#elCopyright { display: none;}',
  51.  
  52. // widen sidebar
  53. '#ipsLayout_sidebar {    min-width: 415px;    max-width: 365px;    padding: 10px 0 10px 0;}',
  54.  
  55. // font sizes.
  56. '.ipsType_large { font-size: 14px; }',
  57. 'body { font-size: 12px; }',
  58. '.ipsWidget .ipsDataItem_title { font-size: 12px; }',
  59. '.ipsType_medium { font-size: 12px; }',
  60.  
  61. // User avatars, rounded edges, not circles.
  62. '.ipsUserPhoto_xlarge img, img.ipsUserPhoto_xlarge, .ipsUserPhoto_xlarge:after { border-radius: 20px; }',
  63. '.ipsUserPhoto_large img, img.ipsUserPhoto_large, .ipsUserPhoto_large:after { border-radius: 15px; }',
  64. '.ipsUserPhoto_medium img, img.ipsUserPhoto_medium, .ipsUserPhoto_medium:after { border-radius: 12px; }',
  65. '.ipsUserPhoto_small img, img.ipsUserPhoto_small, .ipsUserPhoto_small:after { border-radius: 9px; }',
  66. '.ipsUserPhoto_tiny img, img.ipsUserPhoto_tiny, .ipsUserPhoto_tiny:after { border-radius: 6px; }',
  67. '.ipsUserPhoto_mini img, img.ipsUserPhoto_mini, .ipsUserPhoto_mini:after { border-radius: 7px; }',
  68.  
  69. // posts, separate author info from post content
  70. '.cAuthorPane {background: #f3f3f3;}',
  71. 'ul.cAuthorPane_info > li.ipsResponsive_hidePhone { display: none; }',
  72. 'ul.cAuthorPane_info > li.ipsType_break { display: block; }',
  73.  
  74. // remove extra padding and margins
  75. '.ipsType_sectionTitle {    padding: 10px 10px 10px 10px}',
  76. '.ipsDataList_large .ipsDataItem_main, .ipsDataList_large .ipsDataItem_stats, .ipsDataList_large .ipsDataItem_lastPoster, .ipsDataList_large .ipsDataItem_generic { padding: 10px 10px; }',
  77. '.ipsBreadcrumb.ipsBreadcrumb_top { margin: 0px 20px 0px 20px; }',
  78. '.ipsDataItem_title { margin: 0 0 0 0; }',
  79. '.ipsApp .ipsSpacer_bottom, .ipsApp .ipsSpacer_both { margin-bottom: 5px; }',
  80. '.ipsDataItem_main, .ipsDataItem_stats, .ipsDataItem_lastPoster, .ipsDataItem_generic, .ipsDataItem_modCheck, .ipsDataItem_icon { padding: 5px 5px; }',
  81. '.cTopicList .ipsDataItem_main { padding: 5px 5px; }',
  82.  
  83. // subforum icons, idea based on ipsfocus
  84. '.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; }',
  85.  
  86. // rounded borders of sections titles
  87. '.ipsType_sectionTitle, .ipsWidget_title { ; border-radius: 4px 4px 0 0;}',    
  88.     ''
  89. ].join("\n");
  90.  
  91. addGlobalStyle(css);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement