summaryrefslogtreecommitdiff
path: root/sklady
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-04-28 19:45:17 +0200
committeremkael <emkael@tlen.pl>2018-04-28 19:45:17 +0200
commita7a867cc5e76f09dd45c14ff4964e8ab4938edd1 (patch)
tree14f0d3ca8a8573cd517c46185d3abe269b069488 /sklady
parentbfa5f4c1f9873536fde8bee124c7c6deb17c06a4 (diff)
Ignore two consecutive identical table numbers detected from referer.
Fixes michzimny/teamy-diff-deals#7 - possibly?
Diffstat (limited to 'sklady')
-rw-r--r--sklady/tdd.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/sklady/tdd.js b/sklady/tdd.js
index bc75356..70a8424 100644
--- a/sklady/tdd.js
+++ b/sklady/tdd.js
@@ -39,10 +39,14 @@ var TDD = {
ev.stopPropagation();
},
+ lastRefererNumber: undefined,
detectReferer: function() {
var regex = document.referrer.match(/\d+t(\d+)-\d+\.htm/);
if (regex) {
- return regex[1];
+ if (regex[1] != TDD.lastRefererNumber) {
+ TDD.lastRefererNumber = regex[1];
+ return regex[1];
+ }
}
return undefined;
},