Countries I think that are missing: China, India, Russia, Turkey, Ukraine, and any other CIS country. Does that look right?
Yes. You could have easier gotten there by looking at the other subs, because there is one for China, one for Russia + former CIS countries and one for South America, no sub for Turkey currently (or just not known to SteamDB yet).
Comment has been collapsed.
So I need to add Latin American countries to the list of what to block from the giveaway. Got it.
Comment has been collapsed.
There are 63 country codes from SteamGifts country list (244) that isn't included in SteamDB country list (187). SG and SteamDB use different sets of country code so the number is off.
I can see that part of SEA isn't included.
DZ AR AM AZ BH BD BY BZ BT BO BR CL CN CO EC EG SV GE GT GY HN IN ID IQ JO KZ KW KG LB LY SA MY MX MD MA NP NI OM PK PS PA PY PE PH QA RU SA ZA LK SD SR TW TJ TH TN TR TM UA UY UZ VE VN YE
The code I use to get the list, run at https://www.steamgifts.com/giveaways/new
:
const steamdbRestrictedCountries = prompt('SteamDB restricted countries (2-letter code):').split(' ');
let countries = '';
document.querySelectorAll('[data-input="country_item_string"] .form_list_item_summary_name').forEach((country) => {
const countryCode = country.textContent.match(/[A-Z]{2}/)[0];
if (!steamdbRestrictedCountries.includes(countryCode)) {
if (!countries) {
countries = countryCode;
} else {
countries += " " + countryCode;
}
}
})
alert(countries);
Comment has been collapsed.
Dang, that is a lot of countries to disable. Is the best way to make a giveaway just selecting all available countries, and then going alphabetically and checking off the countries that aren't allowed?
Presets only get a small portion of the way since I don't think I can use multiple presets at once.
Comment has been collapsed.
The games I did giveaway only have a handful of restricted countries, so I pick them manually.
I update the JavaScript code above to handle this situation.
To use it, navigate to the create new giveaway page, press Select All so all countries are checked, then open browser developer console (shortcut F12), run the code, and input the SteamDB country codes when prompted.
The code will toggle the check state of countries that aren't in the input country list.
const steamdbRestrictedCountries = prompt('SteamDB restricted countries (2-letter code):').split(' ');
// list countries that aren't included in SteamDB
let countries = '';
document.querySelectorAll('[data-input="country_item_string"] .form_list_item_summary_name').forEach((country) => {
const countryCode = country.textContent.match(/[A-Z]{2}/)[0];
if (!steamdbRestrictedCountries.includes(countryCode)) {
if (!countries) {
countries = countryCode;
} else {
countries += ' ' + countryCode;
}
// toggle countries
country.parentElement.parentElement.click();
}
})
alert(countries);
There is discrepancy between SG and SteamDB so please take it with a grain of salt.
Comment has been collapsed.
Appreciate your help. I tested some of the notable countries that need to be disabled and it was correct for all of them. Will double-check again all 60+ countries when I make the giveaway later this week.
Comment has been collapsed.
62 Comments - Last post 15 minutes ago by pb1
887 Comments - Last post 33 minutes ago by MeguminShiro
530 Comments - Last post 34 minutes ago by MeguminShiro
16 Comments - Last post 55 minutes ago by klingki
47,105 Comments - Last post 2 hours ago by Pish4
39 Comments - Last post 6 hours ago by shivam13
1,758 Comments - Last post 7 hours ago by CutieTheRooster
100 Comments - Last post 4 minutes ago by Ivannes
121 Comments - Last post 39 minutes ago by CBlade
1,196 Comments - Last post 48 minutes ago by CBlade
37 Comments - Last post 1 hour ago by wigglenose
145 Comments - Last post 1 hour ago by rimvydasm
65 Comments - Last post 1 hour ago by cg
90 Comments - Last post 2 hours ago by cicangkeling
I used Steamdb and got the sub of the key purchased from the US since I own the game already. This was the linked sub from the extension's error message.
I see it has restrictions, but is there a way to see what countries are blocked rather than which ones are allowed? I also tried feeding the list of 2 letter country codes into an AI to ask what country codes were missing and it fed me a response that was inaccurate, so just want to double check with other actual people before I make my giveaway.
Countries I think that are missing: China, India, Russia, Turkey, Ukraine, and any other CIS country. Does that look right?
I would appreciate if someone more experienced with region cross checking would verify my current list of countries.
Comment has been collapsed.