Advertisement
Guest User

Untitled

a guest
Sep 29th, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        GameFAQs Fixes
  3. // @namespace   Kraust
  4. // @include     *gamefaqs.com/*
  5. // @version     1
  6. // @grant       none
  7. // @require     http://yandex.st/highlightjs/8.0/highlight.min.js
  8. // ==/UserScript==
  9.  
  10. //JSON.stringify(localStorage)
  11.  
  12.  
  13. /*if(typeof(Storage)!=="undefined") {
  14.     var storage = localStorage.getItem("avatar");
  15.     var enableWebm = localStorage.getItem("enableWebm");
  16.     var enableCode = localStorage.getItem("enableCode");
  17.     var enableQuickEdit = localStorage.getItem("enableQuickEdit");
  18.     var enableAvatars = localStorage.getItem("enableAvatars");
  19.     var enableHighlight = localStorage.getItem("enableHighlight");
  20.    
  21. } else {
  22.     var storage = "left";
  23.     var enableWebm;
  24.     var enableCode;
  25.     var enableQuickEdit;
  26.     var enableAvatars;
  27.     var enableHighlight;
  28.  
  29. }*/
  30.  
  31.  
  32. /*$(".masthead_systems").html("<a href='' id='toggle'>GameFAQs Slim</a> <a href='/boards/3-'>PotD</a>");
  33. $(".masthead").css("box-shadow", "0px 10px 5px rgb(100, 100, 100)");
  34. $(".masthead_main.container.row").css("display", "none");*/
  35. $(".YAD").remove();
  36. $("#leader_top").remove();
  37. $(".board.topics.othertopics").remove();
  38. /*$("#mantle_skin").css("padding-bottom", "0px");*/
  39.  
  40. /*$('#toggle').toggle(function() {
  41.     $(".masthead_main.container.row").css("display", "block");
  42. }, function() {
  43.     $(".masthead_main.container.row").css("display", "none");
  44. });*/
  45.  
  46.  
  47. // Bigger Quickpost http://puu.sh/7zp1f.png
  48. $(".span8:contains(Post New Message)").css("width", "100%");
  49. $(".span8 textarea").css("width", "100%");
  50.  
  51. /*$("h1").css("font-family", "\"nimbus-sans\",\"Helvetica Neue\",\"HelveticaNeue\",Arial,sans-serif");
  52. $("h1").css("font-weight", "700");
  53. $("h1").css("letter-spacing", "-1px");
  54.  
  55. $("h2").css("font-family", "\"nimbus-sans\",\"Helvetica Neue\",\"HelveticaNeue\",Arial,sans-serif");
  56. $("h2").css("font-weight", "700");
  57. $("h2").css("letter-spacing", "-1px");
  58.  
  59. $(".title").css("text-transform", "none");
  60.  
  61. $("h3").css("font-family", "\"nimbus-sans\",\"Helvetica Neue\",\"HelveticaNeue\",Arial,sans-serif");
  62. $("h3").css("font-weight", "500");
  63. $("h3").css("letter-spacing", "-1px");*/
  64.  
  65.  
  66. /*
  67. // <code> tag module.
  68. if (enableCode === "checked") {
  69.     $("code").wrap("<pre></pre>");
  70.     $("head").append("<link rel='stylesheet' type='text/css' href='http://yandex.st/highlightjs/8.0/styles/default.min.css' >");
  71.     hljs.initHighlightingOnLoad();
  72. }
  73.  
  74.  
  75. /*$('td.msg').each(function() {
  76.     var text = $(this).html();
  77.     var regex = /http:\/\/.*\.webm/;
  78.     var matches = regex.exec(text);
  79.    
  80.     if (matches !== null) {
  81.         if ( matches[0] !== null) {
  82.        
  83.             $(this).html(text.replace(/<a href="http:\/\/.*\.webm">http:\/\/.*\.webm<\/a>/, '<video width=\"720\" height=\"480\" controls ><source src=\"' + matches[0] + '\" type=\'video/webm; codecs=\"vp8, vorbis\"\'></video>'));
  84.         }
  85.  
  86.     }
  87. });*/
  88.  
  89.  
  90. // jQuery-UI Test
  91.  
  92. /*if(jQuery.ui) {
  93. $('.masthead_systems').append(" \
  94.                 <script> \
  95.                         $(function() { \
  96.                             $('button').button(); \
  97.                         }); \
  98.                         </script> \
  99.                 <button class='btn'>Test</button> \
  100.     ");
  101. }*/
  102.  
  103.  
  104. // Highlighting
  105. /*
  106. if(typeof(Storage)!=="undefined") {
  107.     var enableHighlight = localStorage.getItem("enableHighlight");
  108.    
  109. } else {
  110.     var enableHighlight;
  111. }
  112.  
  113.  
  114. if (enableHighlight === "checked") {
  115.     var highlightList = JSON.parse(localStorage.getItem("highlightList"));
  116.  
  117.     var msgCount = $("td.msg").length;
  118.  
  119.  
  120.     for( var i = 0; i < msgCount; i++) {
  121.         for( var j = 0; j < highlightList.groups.length; j++) {
  122.             for(var k = 0; k < highlightList.groups[j].userNames.length; k++) {
  123.                 if( highlightList.groups[j].userNames[k] === $(".name").eq(i).text()) {
  124.                     $("span.author_data:nth-child(2)").eq(i).after("<span class='author_data'>(" + highlightList.groups[j].groupName + ")</span>");
  125.                     $("td.author").eq(i).css("background-color", highlightList.groups[j].color);   
  126.                     $("td.msg").eq(i).css("background-color", highlightList.groups[j].color);  
  127.                     }
  128.             }
  129.         }
  130.     }
  131.    
  132. }
  133.  
  134. // Highlighting
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141. // Ignore+
  142.  
  143. if(typeof(Storage)!=="undefined") {
  144.     var enableIgnore = localStorage.getItem("enableIgnore");
  145.    
  146. } else {
  147.     var enableIgnore;
  148. }
  149.  
  150. if (enableIgnore === "checked") {
  151.     var user = $(".welcome").text().slice(0, -1);
  152.     var ignoreList = JSON.parse(localStorage.getItem("ignoreList"));
  153.  
  154.     function editCallback(i) {
  155.         return function() {
  156.             ignoreList.users.push($(".name").eq(i-1).text());
  157.             localStorage.setItem("ignoreList", JSON.stringify(ignoreList));
  158.             location.reload(true);
  159.         }
  160.     }
  161.  
  162.  
  163.  
  164.     var msgCount = $("td.msg").length;
  165.  
  166.     for( var i = 0; i < msgCount; i++) {
  167.         for( var j = 0; j < ignoreList.users.length; j++ ) {
  168.             if( $(".name").eq(i).text() == ignoreList.users[j] ) {         
  169.                 $("tr.msg").eq(i).css("display", "none");      
  170.             }      
  171.         }
  172.        
  173.         if( $(".name").eq(i).text() !== user ) {
  174.                 $("a.qq").eq(i).after(" - <a class='ignore' id='ignore-" + (i+1) + "'>ignore</a> ");
  175.                 $("#ignore-" + (i+1)).click(editCallback(i+1));
  176.         }
  177.     }
  178.    
  179.     var topicCount = $("tr.topics").length;
  180.    
  181.     for( var i = 0; i < topicCount; i++) {
  182.         for( var j = 0; j < ignoreList.users.length; j++ ) {
  183.             if( $("td.tauthor").eq(i).text() == ignoreList.users[j] ) {        
  184.                 $("tr.topics").eq(i).css("display", "none");       
  185.             }      
  186.         }
  187.     }  
  188.  
  189. }
  190. */
  191. // Ignore+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement