Skip to content

Instantly share code, notes, and snippets.

@revooms
Last active August 29, 2015 14:07
Show Gist options
  • Save revooms/faacbaa3a78b5d33ceb5 to your computer and use it in GitHub Desktop.
Save revooms/faacbaa3a78b5d33ceb5 to your computer and use it in GitHub Desktop.
greasemonkey: Steam Discussions Enhancements (SDE)
// ==UserScript==
// @name Steam Discussions Enhancements
// @namespace sde
// @description Steam Discussions Enhancements
// @include http*://steamcommunity.com/app/*/discussions/*
// @include http*://steamcommunity.com/id/*/commentnotifications/
// @include http*://steamcommunity.com/id/*/home/invites/
// @version 0.1
// @grant none
// @require http://code.jquery.com/jquery-2.1.1.min.js
// ==/UserScript==
this.$ = this.jQuery = jQuery.noConflict(true);
sde_AddStyles();
sde_AddActions();
console.log('Greasemonkey Steam Discussions Enhancements loaded');
// -------------------------------------------
function sde_AddStyles() {
var originalBackgroundcolor = '#262627';
// Add styles to elements
$('.pagecontent').css('background', 'none #141416');
$('center').css('margin-top', '110px').prepend('<a name="sdeTop"></a>');
$('#global_header').css('position', 'fixed');
$('#global_header').css('top', '0');
$('#global_header').css('width', '98%');
$('#global_header').css('background', 'none #000');
$('#global_header .content').css('background', 'none #000');
$('#global_header .content').css('width', '1200px');
// alter read topics
// $("div.forum_topic:not(.unread):not(.sticky)").css('background-color', '#333');
// alter moved topics
// $("div.forum_topic.moved:not(.sticky)").css('background-color', '#');
// alter deleted topics
$("div.forum_topic.deleted:not(.sticky)").css('background-color', '#222');
$("div.forum_topic.deleted:not(.sticky)").children().css('color', '#444');
console.log('sde: Styles added');
}
function sde_AddActions() {
// Adds some useful actions to the top menu
var sdeMenu = '<span id="sdeActions">';
sdeMenu += '<a href="#sdeTop">Back to top</a>';
sdeMenu += ' | ';
sdeMenu += '</span>';
$('#global_action_menu').append(sdeMenu);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment