Skip to content

Instantly share code, notes, and snippets.

@yamalight
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yamalight/8d0c6fefe7f63225f1fe to your computer and use it in GitHub Desktop.
Save yamalight/8d0c6fefe7f63225f1fe to your computer and use it in GitHub Desktop.
Tooltip for Steam Recommended By Curators miniatures
// ==UserScript==
// @name Steam Recommended By Curators Tooltip
// @namespace http://steam.recommended.tooltips.enhancement/
// @version 1.0
// @description Adds quotes from non-main curators into the tooltip for them.
// @include http://store.steampowered.com/*
// @copyright 2013+, Tim Ermilov <yamalight@gmail.com>
// ==/UserScript==
(function(){
// override jquery for this scope
var $ = jQuery;
// get curator links
var els = $('.steam_curator_icon');
els.each(function(index, item){
if(item.classList.contains('small')) {
var originalText = item.getAttribute('data-store-tooltip');
var link = $('a', item).attr('href');
// fetch data from link
$.get(link, function(data) {
var text = originalText + '<br/><hr/>' + $('.highlighted_recommendation_desc', data).text();
item.setAttribute('data-store-tooltip', text);
});
}
});
})();
@yamalight
Copy link
Author

Example screenshot: http://i.imgur.com/L6B0HnR.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment