Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name GameFAQs Fixes
- // @namespace Kraust
- // @include *gamefaqs.com/*
- // @version 1
- // @grant none
- // @require http://yandex.st/highlightjs/8.0/highlight.min.js
- // ==/UserScript==
- //JSON.stringify(localStorage)
- /*if(typeof(Storage)!=="undefined") {
- var storage = localStorage.getItem("avatar");
- var enableWebm = localStorage.getItem("enableWebm");
- var enableCode = localStorage.getItem("enableCode");
- var enableQuickEdit = localStorage.getItem("enableQuickEdit");
- var enableAvatars = localStorage.getItem("enableAvatars");
- var enableHighlight = localStorage.getItem("enableHighlight");
- } else {
- var storage = "left";
- var enableWebm;
- var enableCode;
- var enableQuickEdit;
- var enableAvatars;
- var enableHighlight;
- }*/
- /*$(".masthead_systems").html("<a href='' id='toggle'>GameFAQs Slim</a> <a href='/boards/3-'>PotD</a>");
- $(".masthead").css("box-shadow", "0px 10px 5px rgb(100, 100, 100)");
- $(".masthead_main.container.row").css("display", "none");*/
- $(".YAD").remove();
- $("#leader_top").remove();
- $(".board.topics.othertopics").remove();
- /*$("#mantle_skin").css("padding-bottom", "0px");*/
- /*$('#toggle').toggle(function() {
- $(".masthead_main.container.row").css("display", "block");
- }, function() {
- $(".masthead_main.container.row").css("display", "none");
- });*/
- // Bigger Quickpost http://puu.sh/7zp1f.png
- $(".span8:contains(Post New Message)").css("width", "100%");
- $(".span8 textarea").css("width", "100%");
- /*$("h1").css("font-family", "\"nimbus-sans\",\"Helvetica Neue\",\"HelveticaNeue\",Arial,sans-serif");
- $("h1").css("font-weight", "700");
- $("h1").css("letter-spacing", "-1px");
- $("h2").css("font-family", "\"nimbus-sans\",\"Helvetica Neue\",\"HelveticaNeue\",Arial,sans-serif");
- $("h2").css("font-weight", "700");
- $("h2").css("letter-spacing", "-1px");
- $(".title").css("text-transform", "none");
- $("h3").css("font-family", "\"nimbus-sans\",\"Helvetica Neue\",\"HelveticaNeue\",Arial,sans-serif");
- $("h3").css("font-weight", "500");
- $("h3").css("letter-spacing", "-1px");*/
- /*
- // <code> tag module.
- if (enableCode === "checked") {
- $("code").wrap("<pre></pre>");
- $("head").append("<link rel='stylesheet' type='text/css' href='http://yandex.st/highlightjs/8.0/styles/default.min.css' >");
- hljs.initHighlightingOnLoad();
- }
- /*$('td.msg').each(function() {
- var text = $(this).html();
- var regex = /http:\/\/.*\.webm/;
- var matches = regex.exec(text);
- if (matches !== null) {
- if ( matches[0] !== null) {
- $(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>'));
- }
- }
- });*/
- // jQuery-UI Test
- /*if(jQuery.ui) {
- $('.masthead_systems').append(" \
- <script> \
- $(function() { \
- $('button').button(); \
- }); \
- </script> \
- <button class='btn'>Test</button> \
- ");
- }*/
- // Highlighting
- /*
- if(typeof(Storage)!=="undefined") {
- var enableHighlight = localStorage.getItem("enableHighlight");
- } else {
- var enableHighlight;
- }
- if (enableHighlight === "checked") {
- var highlightList = JSON.parse(localStorage.getItem("highlightList"));
- var msgCount = $("td.msg").length;
- for( var i = 0; i < msgCount; i++) {
- for( var j = 0; j < highlightList.groups.length; j++) {
- for(var k = 0; k < highlightList.groups[j].userNames.length; k++) {
- if( highlightList.groups[j].userNames[k] === $(".name").eq(i).text()) {
- $("span.author_data:nth-child(2)").eq(i).after("<span class='author_data'>(" + highlightList.groups[j].groupName + ")</span>");
- $("td.author").eq(i).css("background-color", highlightList.groups[j].color);
- $("td.msg").eq(i).css("background-color", highlightList.groups[j].color);
- }
- }
- }
- }
- }
- // Highlighting
- // Ignore+
- if(typeof(Storage)!=="undefined") {
- var enableIgnore = localStorage.getItem("enableIgnore");
- } else {
- var enableIgnore;
- }
- if (enableIgnore === "checked") {
- var user = $(".welcome").text().slice(0, -1);
- var ignoreList = JSON.parse(localStorage.getItem("ignoreList"));
- function editCallback(i) {
- return function() {
- ignoreList.users.push($(".name").eq(i-1).text());
- localStorage.setItem("ignoreList", JSON.stringify(ignoreList));
- location.reload(true);
- }
- }
- var msgCount = $("td.msg").length;
- for( var i = 0; i < msgCount; i++) {
- for( var j = 0; j < ignoreList.users.length; j++ ) {
- if( $(".name").eq(i).text() == ignoreList.users[j] ) {
- $("tr.msg").eq(i).css("display", "none");
- }
- }
- if( $(".name").eq(i).text() !== user ) {
- $("a.qq").eq(i).after(" - <a class='ignore' id='ignore-" + (i+1) + "'>ignore</a> ");
- $("#ignore-" + (i+1)).click(editCallback(i+1));
- }
- }
- var topicCount = $("tr.topics").length;
- for( var i = 0; i < topicCount; i++) {
- for( var j = 0; j < ignoreList.users.length; j++ ) {
- if( $("td.tauthor").eq(i).text() == ignoreList.users[j] ) {
- $("tr.topics").eq(i).css("display", "none");
- }
- }
- }
- }
- */
- // Ignore+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement