Skip to content
Permalink
Browse files

Fix getting user location after latest summary page changes.

  • Loading branch information...
malcom committed May 20, 2019
1 parent 29a4598 commit 65f1cc6823495a597788732a79c3a9b4938c9625
Showing with 3 additions and 3 deletions.
  1. +3 −3 allegro-seller-info.user.js
@@ -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;
}
}
@@ -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

0 comments on commit 65f1cc6

Please sign in to comment.
You can’t perform that action at this time.