Is there a way on Steamgifts to just paste a list of allowed regions/countries when making a giveaway and having it auto-select those? It can take forever to check off each country one at a time, and the general presets can't be stacked which making them of very limited use.

5 months ago*

Comment has been collapsed.

I don't think there is a way to do that with the default options.

I use a simple custom Tampermonkey script to deselect few countries I want to exclude. This requires use of Tampermonkey browser add-on/extension and little bit knowledge of javascript. If there is an add-on which does the same as Tampermonkey it's likely ok too for this.

I can help out if this is something you want to look into. Or maybe someone else has a better way of doing the same.

5 months ago
Permalink

Comment has been collapsed.

It could be done with a tampermonkey script easily, maybe even a console command to paste on browser.

Can you share a list of the regions you'd want to select? Either their names or acronyms.

5 months ago
Permalink

Comment has been collapsed.

list = "AF BR";
arr = list.split(" ");
for (i = 0; i < arr.length; i++) {
    $("div[data-input='country_item_string'] > div").each(function() {
        name = $(this).data("name");
        if ( name.substr(name.length-2) == arr[i] )
            $(this).click()
    });
}

Running this (F12 -> console on chrome) will click on both AF and BR countries (either selecting them, or unselecting if they were already selected).

So all you'd need would be to make a list of countries with their acronyms and place on the "list" variable.

Works here well, if it won't work anywhere else, maybe the jQuery lines would require me an additional line to add jQuery to the site, in case it doesn't have it and works here because of some plugin I use.

5 months ago
Permalink

Comment has been collapsed.

Unfortunately I can't use the Chrome developer console on Steamgifts. It works fine on every other site I've ever tried it on, but here it causes the mouse cursor and mouse buttons to go completely crazy whenever it's open. I don't use any steamgifts extensions/addons, and even if I disable all others it doesn't fix the problem, so no idea why it freaks out on this site specifically.

5 months ago
Permalink

Comment has been collapsed.

Weird!

There's a way to run scripts on a page without using the console, by making one line of javascript with the whole thing, and running it at the address bar by typing javascript: before the inline script.

So, go to the "create new giveaway" page, mark "region restricted" as yes, then go to the address bar, and type this:

javascript: list = "AF BR"; arr = list.split(" "); for (i = 0; i < arr.length; i++) { $("div[data-input='country_item_string'] > div").each(function() { name = $(this).data("name"); if ( name.substr(name.length-2) == arr[i] ) $(this).click() }); }

Check if it works (should check for you both AF and BR when run).

If it does, then edit the "AF BR" part with all the country acronyms you require, separated by space.

Also, when pasting, check if the browser isn't deleting the "javascript:" part of the code, it was doing it here, so I had to type it manually, then paste the rest of the code (probably a safety thing).

list = "AF BR"; arr = list.split(" "); for (i = 0; i < arr.length; i++) { $("div[data-input='country_item_string'] > div").each(function() { name = $(this).data("name"); if ( name.substr(name.length-2) == arr[i] ) $(this).click() }); }

If it doesn't work, sorry, that's all I have! It could be turned into a tampermonkey script to be run without the console as well, but I guess it'd be better using the other provided solutions instead.

Took me around 10 minutes to make it right, so if it won't be used by you or anyone, no worries, it was a nice simple challenge!

5 months ago*
Permalink

Comment has been collapsed.

ESGST lets you save a template which includes region restrictions/descriptions/etc..., nice to set baselines for certain things/groups for quick GA creation.

5 months ago
Permalink

Comment has been collapsed.

With the help of a userscript, maybe something like this can be adapted:

https://www.steamgifts.com/go/comment/Bp2zMZN

5 months ago
Permalink

Comment has been collapsed.

Sign in through Steam to add a comment.