fix md file

This commit is contained in:
2015-03-20 20:27:40 +01:00
parent 6e7e6a2d67
commit 82de94490d
+11 -13
View File
@@ -1,25 +1,23 @@
## query for windows phone store cultures
1. Go to http://www.windowsphone.com/en-us/markets
1) Go to http://www.windowsphone.com/en-us/markets
2. Code:
2) Code:
var cultures = [];
$('.marketsLink:not(:empty)').each(function()
{
var culture = {
id: this.href.split('/')[this.href.split('/').length - 1],
uri: this.href,
};
var isInversed = this.title.indexOf('(') === 0;
var parts = this.title.split(isInversed ? ')' : '(');
culture.country = parts[isInversed ? 1: 0].trim();
culture.language = parts[isInversed ? 0 : 1].replace((isInversed ? '(' : ')'), '').trim();
cultures.push(culture);
cultures.push({
id: this.href.split('/')[this.href.split('/').length - 1],
uri: this.href,
country: parts[isInversed ? 1: 0].trim(),
language: parts[isInversed ? 0 : 1].replace((isInversed ? '(' : ')'), '').trim()
});
});
var output = JSON.stringify(cultures);
3. Output is copied to `cultures-windowsphone.json`
3) Output is copied to `cultures-windowsphone.json`