Steam Context Menu allows this. It is also available for Firefox.
https://github.com/Skylark95/chrome-steam-context-menu
Chrome:
https://chrome.google.com/webstore/detail/steam-context-menu/mcglhmpnpongdigcmccjallgoinlklnj?hl=en
Firefox:
https://addons.mozilla.org/en-US/firefox/addon/steam-context-menu/
Comment has been collapsed.
Thanks to you, I just installed context search myself ^^
Comment has been collapsed.
At first you could switch between default search engines in Firefox using a drop-down menu, and that let you search text in wikipedia, wordreference, twitter... by just right-clicking. They changed it dunno why, and it has been one of my most hated changes Firefox has done.
Comment has been collapsed.
oh, that would indeed have been nice to do. One problem with the above extensions are that the context menus are cascaded which requires more clicks and mouse movements :S
I wonder how hard it wold be to hack in a search "icon" in one of the steamgifts overhaul scrips. It will probably take me days and hours to accomplish and save me almost a second for each search :D
Comment has been collapsed.
It might be trivial and possible also already existing. I've just never really looked in to scripts or scripting with tampermonkey/greasemonkey etc. This would probably be the most convenient option for me though. I have to research a bit this coming weekend :)
Comment has been collapsed.
Something like this?
// ==UserScript==
// @name Steamgifts - ITAD links
// @description Adds an icon next to each giveaway that links to its ITAD page
// @include https://www.steamgifts.com/
// @include https://www.steamgifts.com/giveaways/*
// @version 0.1
// @grant none
// ==/UserScript==
$('.giveaway__heading').each(function(){
var gameName = $(this).children('a').text();
var itadDiv = '<a class="giveaway__icon" rel="nofollow" target="_blank" href="https://isthereanydeal.com/#/search:'+gameName+'"><i class="fa fa-fw fa-gamepad"></i></a>';
$(this).append(itadDiv);
});
Comment has been collapsed.
That easy huh? That would be amazing. I'll give it a test run tonight. I'd honor your contribution with a spot in my whitelist, unfortunately you're already there :)
Edit: I couldn't wait. For some reason the string " BTAWLMEOX" gets added to every search. Probably a conflict with another script. That has to wait for tonight though. :)
Comment has been collapsed.
Yes, it is indeed a conflict with another script(s). Those strings are BTA, WL, ... But it is also because I wasn't careful with the code and selected all the children('a') >_<
I have looked around and saw this script by mahermen that adds info from ITAD inside each giveaway page, so I borrowed a pair of functions from him to save you a click when searching the game (you go directly to the ITAD game page, not the ITAD search page). Also this version shouldn't conflict with the rest of your mods scripts (now I only select children('a:first-child')).
// ==UserScript==
// @name Steamgifts - ITAD links
// @description Adds an icon next to each giveaway that links to its ITAD page
// @include https://www.steamgifts.com/
// @include https://www.steamgifts.com/giveaways/*
// @version 0.2
// @grant none
// ==/UserScript==
//Functions by mahermen
var staticReplacements = {
"storiesofbethemfullmoon":"storiesofbethemfullmoonedition",
"feariireborndlc":"feariireborn",
"justcauseiiixl":"justcauseiiixledition"
};
function romanize(num) {
var key = ["","i","ii","iii","iv","v","vi","vii","viii","ix"];
return key[parseInt(num)];
}
function encodeName(str){
str = str.toLowerCase(); //lowercase
str = str.replace(/[1-9]/g, romanize);//romanize digits
str = str.replace(/(^the[^a-z])|([^a-z]the[^a-z])|([^a-z]the$)/g, ""); //remove "the", but not e.g. "other" or "them"
str = str.replace(/\+/g, "plus"); //spell out "plus"
str = str.replace(/\&/g, "and"); //spell out "and"
str = str.replace(/[^a-z0]/g, ''); //remove remaining invalid characters, like spaces, braces, hyphens etc
return staticReplacements[str] || str;
}
//Main
$('.giveaway__heading').each(function(){
var gameName = $(this).children('a:first-child').attr('href').split('/')[3];
var itadDiv = '<a class="giveaway__icon" rel="nofollow" target="_blank" href="https://isthereanydeal.com/#/page:game/info?plain='+encodeName(gameName)+'"><i class="fa fa-fw fa-eur"></i></a>';
$(this).append(itadDiv);
});
Rarely this can fail due to special URIs given to the games, in that case you can add an exception in staticReplacements var, and report it to mahermen in his thread.
Comment has been collapsed.
Bug: steamgifts urls doesn't include characters like "+" or "&" but ITAD replaces them instead of removing them so all the games with those characters will lead to an ITAD error page :( I am getting the name from the url because when the game name is too long it is truncated.
I could get the game name from the giveaway page, but that would mean making more than 50 requests per page and obviously I don't like that. If you prefer you can use the first version with some modifications, it would mean one more click for you but you should be able to (almost) always find the game.
// ==UserScript==
// @name Steamgifts - ITAD links
// @description Adds an icon next to each giveaway that links to its ITAD page
// @include https://www.steamgifts.com/
// @include https://www.steamgifts.com/giveaways/*
// @version 0.1.b
// @grant none
// ==/UserScript==
//EDIT: SAME BUG THAN VERSION 0.2 ARGGHHGHG T__T
function encodeName(str){
str = str.replace(/\-/g, " ");
return str;
}
$('.giveaway__heading').each(function(){
var gameName = $(this).children('a:first-child').attr('href').split('/')[3];
var itadDiv = '<a class="giveaway__icon" rel="nofollow" target="_blank" href="https://isthereanydeal.com/#/search:'+encodeName(gameName)+'"><i class="fa fa-fw fa-eur"></i></a>';
$(this).append(itadDiv);
});
Nope, that fails too T_T I wish I could search ITAD game pages by their appID
Don't you like when trivial things end up being not so trivial?
Comment has been collapsed.
You could take the game name from the title and fall back to fetching the full name from the GA page only when its truncated (.endsWith("...")).
This way you only need to make a few additional requests every page.
Check SgApi Giveaway Tools for that, especially the loadGiveaway() function.
Giveaways.loadGiveaway(href, function(ga){console.log(ga.gameTitle);})
Comment has been collapsed.
Thanks for your advice, mahermen. I just wanted to make a small script to help Spiff00. As it is impossible to do what I wanted to do without using more than 1 request (or using ITAD's API) I'm out. Anyway it seems he is already using your script so his needs are well covered at this point :)
Comment has been collapsed.
But I would still have to send requests to your server, right? To get the "plain" name. That is what I mean, extra requests. Even just requesting the plain name of those games which name is truncated, as mahermen suggested, it would mean an average of 5 requests to your server per page.
In the version 0.2 posted some posts above I already bypassed the search page, borrowing mahermen function to encode the name of the game into the "plain" name accepted by ITAD. But it fails if the game contains "&" or "+" signs.
It would be the same making a request to your server to get the plain name, or making a request to the giveaway page to get the complete name from the title and then apply the encodeName function to it. Indeed this last option would be better since I can assure the server will never be down (the request is made by loading the giveaway page of that same server).
Anyway, I just create small scripts for personal use as pastime, kinda like small puzzles. There are already better programmers in this forum whose scripts are fully compatible between them, make more things, are better made, and updated frequently. Under my point of view if the initial task can't be made without making extra requests, it is just not worth and it is better using just another better script as mahermen's one.
BTW is there some script out there that asks you before leaving the page if you are writing a comment? Not like this is the second time I'm writing this because I pressed that stupid button I never use in my mouse that leads me to the previous page....
Comment has been collapsed.
This has been very helpful to me and so far I've not encountered any bugs. However reading about the other ITAD script and trying it out for a bit made me want to fetch some of that data and put it beside the search icons right away. This is surely going to end up with me researching scripting in this environment and probably failing badly at it :D
Comment has been collapsed.
763 Comments - Last post 46 minutes ago by grimfandango8888
43 Comments - Last post 1 hour ago by Qnemes
70 Comments - Last post 1 hour ago by orono
12 Comments - Last post 1 hour ago by orono
17 Comments - Last post 2 hours ago by SeaGoblin
345 Comments - Last post 2 hours ago by Vasharal
1,041 Comments - Last post 3 hours ago by sensualshakti
16 Comments - Last post 2 minutes ago by Fluffster
113 Comments - Last post 13 minutes ago by Axelflox
34 Comments - Last post 18 minutes ago by Mets9
42 Comments - Last post 19 minutes ago by Thexder
414 Comments - Last post 32 minutes ago by Dragonnx
68 Comments - Last post 34 minutes ago by seboleq97
535 Comments - Last post 36 minutes ago by Gellax
Since my spirit animal is the sloth I'm obviously lazy as hell and would like some help figuring out a decently easy way to add a "search on ITAD" functionality to the right click menu in chrome. Like the way I'm able to mark text and do a google search.
As I realize that my imagination is quite limited regarding this and I'm sure there are other methods to accomplish a more convenient ITAD search any suggestion is welcome :)
Comment has been collapsed.