Last active
January 1, 2016 15:09
-
-
Save dasrecht/8162576 to your computer and use it in GitHub Desktop.
BitTorrent Installer Deconstruction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Skip the offer if the current country is not within this list. | |
*/ | |
var cList = ["AU", "AT", "BR", "CA", "DK", "FI", "FR", "DE", "HK", "IN", "IE", "IT", "KR", "MX", "NL", "NO", "SG", "ES", "SE", "CH", "TW", "GB", "US"]; | |
var country = window.installer.getenv("COUNTRY"); | |
if (country !== "??") { | |
var ret = cList.filter(function(c) {if (c == country) {return c;}}); | |
if (ret === undefined || ret === null || ret.length === 0) { | |
window.installer.log("Country not supported by offer"); | |
window.installer.forward(); | |
return; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment