// ==UserScript== // @name Steam Extra Game Links // @namespace http://greasyfork.org/users/2240-doodles // @author Doodles // @version 1 // @description Adds extra links to Steam Store and Game Hub pages. // @include *://steamcommunity.com/app/* // @include *://store.steampowered.com/app/* // @grant none // @updateVersion 1 // @downloadURL none // ==/UserScript== var $, jQuery; $ = jQuery = window.jQuery; function urlContains(urlfragment) { return document.URL.indexOf(urlfragment) != -1; } $("").prop("type", "text/css").html("\ div.sel_links {background-color:#252525;padding:2px 5px 2px 5px;margin-bottom:10px;font-size:10px;text-align:left;color:#888888;}\ div.sel_links a, div.sel_links a:link {color:#5491cf;text-decoration:none;}\ div.sel_links a:visited {color:#5491cf;}\ div.sel_links a:hover {color:#5491cf;text-decoration:underline;}\ div.sel_links a:active {color:#5491cf;}\ div.sel_links hr {border:0;height:1px;background:#0a0a0a;margin-top:2px;margin-bottom:2px;}\ div.sel_foot {margin:0;padding:0;text-align:center;font-size:10px;color:#444444;}\ div.sel_foot a, div.sel_foot a:link {color:#444444;text-decoration:none;}\ div.sel_foot a:visited {color:#444444;}\ div.sel_foot a:hover {color:#999999;text-decoration:underline;}\ div.sel_foot a:active {color:#444444;}\ div.sel_float {float:right;display:block;width:200px;}").appendTo("head"); var gameId = document.URL.split("/app/")[1].split("/")[0].split("?")[0]; var appName; var appNameDiv = $(".apphub_AppName").first(); if(appNameDiv.length != 0) { appName = $(appNameDiv).text(); } var link_01_01 = "AchievementStats.com"; var link_01_02 = "AStats.nl"; var link_01_03 = "HowLongToBeat.com"; var link_02_01 = "SteamCharts.com"; var link_02_02 = "SteamGraph.net"; var link_02_03 = "SteamDB.info"; var link_02_04 = "PC Gaming Wiki"; var link_03_01 = "Steam Stats and Achievements"; var link_03_02 = "Official Steam Group"; var link_03_03 = "Steam Store"; var link_04_01 = "Steam Hub"; var link_04_02 = "Discussions"; var link_04_03 = "Screenshots"; var link_04_04 = "Artwork"; var link_04_05 = "Videos"; var link_04_06 = "News"; var link_04_07 = "Announcements"; var link_04_08 = "Guides"; var link_04_09 = "Reviews"; var link_foot_1 = "GreasyFork"; var link_foot_2 = "DoodlesStuff"; if (urlContains("store.steampowered.com/app/")) { // STORE PAGE - START var linkDiv = $("
").addClass("sel_links"); var rightColBox = $("#my_activity"); if (rightColBox.length != 0) { $(linkDiv).insertBefore(rightColBox); } else { var rightBox2 = $("#demo_block"); if (rightBox2.length != 0) { $(linkDiv).insertBefore(rightBox2); } } var achDiv = $(".communitylink_achievement_inner").first(); if(achDiv.length != 0) { var achLinkText = "Achievements"; var achP = $(achDiv).find("p").first(); if(achP.length != 0) { var numText = $(achP).text(); var numBer = numText.split(" "); if(numBer.length > 1) { achLinkText = numBer[1] + " Achievements"; } } linkDiv.append($("
"+ achLinkText +"
")); } else { linkDiv.append($("
No achievements
")); } linkDiv.append($("
" + link_01_01 + " | " + link_01_02 + "
" + link_01_03 + "
")); linkDiv.append($("
")); linkDiv.append($("
" + link_02_01 + "
" + link_02_02 + "
" + link_02_03 + "
" + link_02_04 + "
")); linkDiv.append($("
")); linkDiv.append($("
" + link_04_01 + ": " + link_04_02 + ", " + link_04_03 + ", " + link_04_04 + ", " + link_04_05 + ", " + link_04_06 + ", " + link_04_07 + ", " + link_04_08 + ", " + link_04_09 + "
")); linkDiv.append($("
")); linkDiv.append($("
" + link_03_01 + "
" + link_03_02 + "
")); linkDiv.append($("
")); linkDiv.append($("
Steam Extra Links: " + link_foot_1 + " | " + link_foot_2 + "
")); // STORE PAGE - END } else if (urlContains("steamcommunity.com/app/")) { // HUB PAGE - START var linkDiv = $("
").addClass("sel_links"); var topBox = $(".apphub_sectionTabsHR").first(); if (topBox.length != 0) { $(linkDiv).insertAfter(topBox); linkDiv.append($("
Steam Extra Links:
" + link_foot_1 + " | " + link_foot_2 + "
")); linkDiv.append($("
" + link_01_01 + " | " + link_01_02 + " | " + link_01_03 + " | " + link_02_01 + " | " + link_02_02 + " | " + link_02_03 + " | " + link_02_04 + "
")); linkDiv.append($("
")); linkDiv.append($("
" + link_03_03 + " | " + link_03_01 + " | " + link_03_02 + "
")); } // HUB PAGE - END }