Skip to content

Commit

Permalink
Fix getting user location after latest changes on summary page
Browse files Browse the repository at this point in the history
  • Loading branch information
malcom committed May 20, 2019
1 parent 29a4598 commit ea67956
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions allegro-seller-info.user.js
Expand Up @@ -104,9 +104,9 @@

var loc;
for (var p of node.getElementsByTagName('p')) {
if (p.innerText.startsWith('Lokalizacja:')) {
if (p.innerText.startsWith('Wysy\u0142ka z:')) {
var i = p.innerText.lastIndexOf(', Polska');
loc = i != -1 ? p.innerText.substr(0, i) : p.innerText;
loc = p.innerText.substr(10, i != -1 ? i - 10 : undefined).trim();
break;
}
}
Expand Down Expand Up @@ -134,7 +134,7 @@
}

// a jako druga komorka leci nasza wstawka
node.insertAdjacentHTML('beforeend', `<div class="${cssName}">${loc}</div>`);
node.insertAdjacentHTML('beforeend', `<div class="${cssName}">Lokalizacja: ${loc}</div>`);
}

// Workaround/Hack
Expand Down

0 comments on commit ea67956

Please sign in to comment.