Where EU shops hide the 30-day lowest price before Black Friday
---
title: Where EU shops hide the 30-day lowest price before Black Friday
published: true
description:
tags: blackfriday, opensource, webdev, javascript
cover_image:
---
I already wrote about the EU 30-day rule: when a shop announces a discount, the crossed-out "old" price is supposed to be the lowest price it charged in the previous 30 days. This post is a walk through the places where shops actually put that number, and the lookalike figures next to it.
I built truediscount, a free open-source browser extension and userscript, to read those numbers on the product page. What follows comes from the shop adapters and the saved product pages I test against, not from today's live prices.
A generic sweep, then a dedicated reader
Many EU shops already print a sentence such as "lowest price in the last 30 days", "niedrigster Preis der letzten 30 Tage", "più basso ultimi 30gg" or "le plus bas". truediscount walks visible text for a "lowest" word plus a mention of 30 days, then reads the price next to that label.
That sweep is enough when the disclosure is ordinary text. Some shops need a dedicated reader, because the 30-day figure is in page state, in a labelled buy box, or next to a recommended retail price that looks similar.
Amazon: the was-price in the buy box
On Amazon EU stores, the current price is the one in the buy box. The crossed-out "was" price lives in the same block, often as a basisPrice or a struck a-price.
That "was" figure is not automatically the 30-day low. If Amazon prints a separate "lowest price in the last 30 days" label, the generic sweep picks it up. If it does not, the crossed-out price is just a was-price until you have your own history from a later visit.
One parsing trap I fixed in truediscount 0.13.3: amounts of 1,000 or more must be read in full. A price written as €1,599.00, 1.299,99 or a Swiss 1'299.00 used to get cut after the first digits, so the comparison never saw the real reference price.
Zalando: a struck price in the price container
Zalando's old price, when it is shown, is a strikethrough in the product price container. The current price often comes from JSON-LD. On one live product page I saved for tests, there was no struck old price at all, so there was nothing to compare until a 30-day label or a later visit provided a reference.
MediaMarkt, Saturn and MediaWorld: the type of the struck price matters
These three share a layout. The struck figure's data-test type is the whole story:
- rrp is a recommended retail price (in Germany, the "UVP" label). It is not the shop's 30-day low.
- previous is a claimed earlier shop price.
- lop or lowest (and the Italian "Più basso ultimi 30gg") is the 30-day disclosure. It must not be treated as a "was" price.
On a saved MediaMarkt.de page the struck amount was labelled UVP, so it is an RRP. On a saved MediaWorld Italy page a "30gg" label was the 30-day disclosure, with no claimed old price. Swiss pages group thousands with an apostrophe, which has to be read as a whole, not as 1.
Lidl: look at the word next to the strike
Lidl prints the current price in one element and the struck amount in another. If the label next to the strike is "UVP", it is a manufacturer's recommended price. If the strike is bare, it is Lidl's own earlier price.
I have checked that on saved pages from lidl.de and lidl.fr. Other Lidl country sites share the same layout, but I have not live-tested each of them yet.
Notino: the selected size, not the JSON-LD offer
Notino is the shop that made me stop trusting the first JSON-LD offer on the page. That block lists every size, and the first offer is often another size or the price before a voucher code.
The shelf price is the selected size. The 30-day low is recentMinPrice on that same variant in the page state, also printed as "Mindestpreis" or "Letzter niedrigster Preis". If the page state is missing, the printed label is enough. A recommended price in that state is not crossed out, so it is not treated as a previous shop price.
This reader is in v0.13.3, for 25 Notino country sites. I checked it on saved pages from notino.de, and the same price state on notino.fr.
Euronics Italy: "prezzo precedente" versus "prezzo consigliato"
This is the RRP trap I want people to watch for this Black Friday. On euronics.it, the buy box holds the current price and two labels:
- prezzo precedente, the barred previous price, is defined on the page as the lowest price charged in the 30 days before the promotion. That is the 30-day low.
- prezzo consigliato is the manufacturer's recommended price. It is only an RRP. The extension uses it as a reference only when there is no previous price, and flags it as an RRP.
A later compare column repeats other prices, including figures that do not belong to this product, so it is ignored. On a saved promotion page the current price was under the barred previous price, so the discount looked real against the shop's own 30-day figure. On a saved page with only a recommended price, there was no 30-day number, so tracking starts and that figure is flagged as an RRP.
Euronics Italy landed on the main branch after 0.13.3. Other country sites are separate storefronts and are not included.
Otto and bol.com: what I have not checked yet
For otto.de I look for a retail-style old price. For bol.com I look for the list price in the buy block. Neither selector is, by itself, a 30-day disclosure. I have not yet checked those shops against a saved live product page, so I am not going to describe a disclosure I have not seen.
What to do with this
If you only remember one thing before Black Friday: a crossed-out number is not enough. Check the label. UVP, "prezzo consigliato", "retail price" and "adviesprijs" are recommended prices. The 30-day low may be in a quieter line, in a "30gg" or "Mindestpreis" label, or in the page's own definition of "prezzo precedente".
truediscount does that comparison on the product page. Price history stays in your browser. No account, no tracking, nothing is sent anywhere.
- Firefox: install from addons.mozilla.org
- Chrome, Edge and Brave: load the Chrome zip from the latest GitHub release
- Userscript: Greasy Fork
The current release is truediscount 0.13.3. A live demo is on the site.
Install it before you trust a "-50%" label this November.
truediscount now also works on Notino in 25 countries. It reads the shop's own 'lowest price in the last 30 days' and tells you if the Black Friday deal is real, all locally in your browser. Free and open source: emirmrkaljevic/truediscount
How to tell if a Black Friday discount is fake in the EU (the 30-day rule)
---
title: How to tell if a Black Friday discount is fake in the EU (the 30-day rule)
published: true
tags: webdev, opensource, javascript, firefox
---
In the EU, a discount is not allowed to invent its "old" price. Under the Omnibus Directive (Directive 2019/2161), the reference price has to be the lowest price from the last 30 days. Black Friday still fills shop pages with crossed-out numbers that look bigger than that.
I built a free, open-source tool called truediscount so the check happens on the product page.
What it does
- Reads the visible price and the shop's own 30-day lowest-price label when the shop prints one
- Flags inflated "was" prices and RRP-style crossed prices
- Keeps a small price history and watchlist in the browser only
- Works as a Firefox add-on (AMO), a Chrome-loadable MV3 build, and a Greasy Fork userscript
No account. No telemetry. MIT licensed.
Install
- Firefox: AMO listing
- Userscript: Greasy Fork
- Source: emirmrkaljevic/truediscount
- Site and shop list: emirmrkaljevic.github.io
Why this matters before 27 Nov 2026
Black Friday is when the loudest "was" labels show up. If you shop in the EU, open a product page, look for the shop's 30-day low, and compare it with the crossed price. truediscount automates that comparison and keeps a local trail so the next visit is faster.
If a shop is missing or wrong, the popup has a "Report a problem" button that opens a prefilled GitHub issue.
Earlier write-up
I wrote a more code-oriented post when the project was smaller: Catching fake Black Friday discounts with a browser extension. This one is the shopper-facing version for 2026.
I built a userscript and Firefox add-on that checks if EU discounts are real
---
title: "I built a userscript and Firefox add-on that checks if EU discounts are real"
published: true
tags: javascript, webdev, opensource, firefox
---
Every November the same thing happens: prices go up a little in October, then "drop" by 40% for Black Friday. In the EU there is actually a rule against this. I built truediscount to make that rule visible while you shop.
The rule: Omnibus 30-day lowest price
Since 2022 the EU Omnibus Directive (Article 6a of the Price Indication Directive) says that when a shop announces a price reduction, the "before" price must be the lowest price it charged in the previous 30 days. Not the RRP, not a price from last spring. Many shops now print this "lowest price in the last 30 days" somewhere on the page, often in small grey text far from the big red percentage.
So the honest discount is: (30-day lowest price minus current price) divided by the 30-day lowest price. Sometimes that number is much smaller than the badge. Sometimes it is zero or negative.
What truediscount does
- Finds the current price, the advertised "was" price and the 30-day lowest price on a product page
- Recalculates the discount against the 30-day lowest price and shows it next to the shop's claim
- Keeps a small local price history so you can see a graph of prices you have already seen
- Stores everything locally in the browser. No account, no server, no tracking
Three ways to install
Userscript (Greasy Fork). If you already use Tampermonkey, Violentmonkey or similar, this is the fastest option: greasyfork.org
Firefox add-on. The add-on is currently in review on addons.mozilla.org. Until it is approved you can grab the Firefox zip from the GitHub releases.
Chrome-based browsers. Load the Chrome zip from the releases page as an unpacked extension.
A few things I learned
- Price parsing is the hard part. "1.299,00 €", "€1,299.00" and "1 299,00 zł" all need to end up as the same number. I normalise by locale and treat the last separator followed by exactly two digits as the decimal mark.
- Shops phrase the 30-day price differently in every language. "Niedrigster Preis der letzten 30 Tage", "prix le plus bas des 30 derniers jours", "najniższa cena z 30 dni" and so on. The extension keeps a list of phrases per language and searches near the price block.
- One codebase, several targets. The MV3 extension and the userscript share the detection code. A small build script produces the Firefox zip, the Chrome zip and the .user.js from the same source.
- Local-only is a feature. Not having a backend made the privacy policy short and the review process simple.
Try it, break it
The code is MIT licensed: emirmrkaljevic/truediscount
If you find a shop where detection fails, an issue with the product URL is the most helpful thing you can send. Happy (honest) Black Friday shopping.
AI tools helped with editing this post.
How EU shops label the 30-day lowest price, and how a browser extension reads them in 15 languages
---
title: How EU shops label the 30-day lowest price, and how a browser extension reads them in 15 languages
published: true
tags: javascript, webdev, opensource, browserextensions
canonical_url: emirmrkaljevic.github.io
---
Since 2022 every shop in the EU that advertises a price reduction has to show the lowest price it charged in the 30 days before the reduction. That is Article 6a of the Price Indication Directive, added by the Omnibus Directive 2019/2161. The rule is the same everywhere. The way shops print it is not.
I maintain truediscount, a free, open source extension for Chrome and Firefox that puts a small badge on product pages and tells you whether a discount is real. This post is about the messiest part of that job: finding the 30-day price on a page, in whatever language and layout the shop chose.
What the label looks like across countries
A few real phrasings, collected from shop pages:
| Country | Typical label |
|---|---|
| Germany, Austria | Niedrigster Preis der letzten 30 Tage: 49,99 € |
| France | Prix le plus bas des 30 derniers jours : 49,99 € |
| Italy | Prezzo più basso degli ultimi 30 giorni: 49,99 € |
| Spain | Precio más bajo de los últimos 30 días: 49,99 € |
| Netherlands, Belgium | Laagste prijs van de afgelopen 30 dagen: € 49,99 |
| Poland | Najniższa cena z 30 dni przed obniżką: 49,99 zł |
| Czechia | Nejnižší cena za posledních 30 dní: 1 299 Kč |
| Romania | Cel mai mic preț din ultimele 30 de zile: 249,99 lei |
| Sweden | Lägsta pris senaste 30 dagarna: 499 kr |
On top of the language there are layout differences:
1. Inline label. The number sits in the same short element as the words. This is the easy case.
2. Footnote. The struck price carries an asterisk and the explanation lives in the page footer, far away from the number. About You does this with "Letzter niedrigster Preis: der letzten 30 Tage vor der Preisermäßigung".
3. Tooltip or popover. Alternate puts the explanation in a popover attribute on an info icon next to the price.
4. Nothing at all next to the struck price. The crossed out number is the shop's own earlier price and you have to trust that it is the 30-day low.
5. RRP instead. The struck price is the manufacturer's recommended price ("UVP" in German, "PVPR" in Spanish, "adviesprijs" in Dutch). Comparing against RRP is legal, but it says nothing about what the shop charged last month.
Case 5 matters most for shoppers, because "was 599, now 349" reads like a 42% cut when it is really a cut against a list price nobody paid.
How the extension reads it
The extractor runs in three passes, all on the page that is already open. Nothing is crawled and nothing leaves the browser.
Pass 1: the current price. Structured data first (JSON-LD Product and Offer, including products nested inside other types, then microdata), then a per shop selector if one exists, then generic selectors.
Pass 2: the advertised old price. Per shop selectors first, then generic ones such as s, del, [style*="line-through"] and class names containing old-price or strike. A candidate only counts if it is higher than the current price and less than 20 times it, which filters out unrelated numbers.
The kind of old price is decided by its label. The newest fix (v0.9.0) came from Lidl, which renders UVP: <s>599.00</s>. The word sits in the parent element, not inside the <s>, so the extension now also looks at the short parent text:
const label = (el.parentElement?.textContent || '').length < 60 ? el.parentElement.textContent : '';
oldKind = /rrp|uvp|retail price|adviesprijs|\bmsrp\b/i.test(`${selector} ${el.textContent} ${label} ${hint}`)
? 'rrp' : 'previous';
On lidl.fr the same layout shows a bare <s>49.99 €</s> with no label, and that stays a "previous price".
Pass 3: the shop's own 30-day disclosure. Two regular expressions do most of the work (shortened here): one for "lowest" in about 15 languages and one for "30 days":
const LOW_WORD = /(lowest|niedrigste|tiefstpreis|le plus bas|più basso|más bajo|laagste|najniższa|nejnižší|cel mai mic|lägsta|laveste|alhaisin|legalacsonyabb|najniža)/iu;
const DAYS_30 = /30[\s\u00a0-]*(?:tage?n?|days?|jours|giorni|días|dagen|dagarna|dni|dní|zile|dana|nap)/giu;
When both match inside a short element, the first price in that element becomes the shop's declared 30-day low. Prices are parsed with EU formats in mind: 1.299,99 €, 1 299 Kč, 49,- and € 49,99 all come out as numbers.
The verdict
With those three numbers the badge says one of a few things:
- The old price matches the shop's 30-day low: the discount is real.
- The old price is higher than the declared 30-day low: the discount is inflated, and the badge shows the real percentage.
- The old price is an RRP: the badge says so and shows the 30-day low if the shop printed one.
- No disclosure on the page: the extension falls back to its own local price history (one price per day, kept 90 days on your device).
What is still hard
- Footnote layouts (case 2) are only understood when the footnote is close to the price. Matching asterisks across a whole page gives too many false hits.
- Many shops render prices with JavaScript after load, so the content script watches the page for changes and checks again once it settles.
- Several big shops block automated requests, so I can only build per shop rules from pages I can actually load. The supported shops page says which shops are tested against live pages and which only use generic rules.
If a shop near you prints the 30-day label in a way the extension misses, the popup has a "Report a problem" button that opens a prefilled GitHub issue with just the domain. That is the fastest way to get a new country covered before Black Friday. And if the badge gets in the way on a site you do not care about, v0.10.0 lets you hide it per domain from the popup; nothing is recorded on hidden sites.
Code and builds: emirmrkaljevic/truediscount
This article was written with AI assistance.
1 reaction
Mentions
Where EU shops hide the 30-day lowest price before Black Friday --- title: Where EU shops hide the 30-day lowest price before Black Friday published: true description: tags: blackfriday, opensource, webdev, javascript cover_image: --- I already wrote about the EU 30-day rule: when a shop announces a discount, the crossed-out "old" price is supposed to be the lowest price it charged in the previous 30 days. This post is a walk through the places where shops actually put that number, and the lookalike figures next to it. I built truediscount, a free open-source browser extension and userscript, to read those numbers on the product page. What follows comes from the shop adapters and the saved product pages I test against, not from today's live prices. A generic sweep, then a dedicated reader Many EU shops already print a sentence such as "lowest price in the last 30 days", "niedrigster Preis der letzten 30 Tage", "più basso ultimi 30gg" or "le plus bas". truediscount walks visible text for a "lowest" word plus a mention of 30 days, then reads the price next to that label. That sweep is enough when the disclosure is ordinary text. Some shops need a dedicated reader, because the 30-day figure is in page state, in a labelled buy box, or next to a recommended retail price that looks similar. Amazon: the was-price in the buy box On Amazon EU stores, the current price is the one in the buy box. The crossed-out "was" price lives in the same block, often as a basisPrice or a struck a-price. That "was" figure is not automatically the 30-day low. If Amazon prints a separate "lowest price in the last 30 days" label, the generic sweep picks it up. If it does not, the crossed-out price is just a was-price until you have your own history from a later visit. One parsing trap I fixed in truediscount 0.13.3: amounts of 1,000 or more must be read in full. A price written as €1,599.00, 1.299,99 or a Swiss 1'299.00 used to get cut after the first digits, so the comparison never saw the real reference price. Zalando: a struck price in the price container Zalando's old price, when it is shown, is a strikethrough in the product price container. The current price often comes from JSON-LD. On one live product page I saved for tests, there was no struck old price at all, so there was nothing to compare until a 30-day label or a later visit provided a reference. MediaMarkt, Saturn and MediaWorld: the type of the struck price matters These three share a layout. The struck figure's data-test type is the whole story: - rrp is a recommended retail price (in Germany, the "UVP" label). It is not the shop's 30-day low. - previous is a claimed earlier shop price. - lop or lowest (and the Italian "Più basso ultimi 30gg") is the 30-day disclosure. It must not be treated as a "was" price. On a saved MediaMarkt.de page the struck amount was labelled UVP, so it is an RRP. On a saved MediaWorld Italy page a "30gg" label was the 30-day disclosure, with no claimed old price. Swiss pages group thousands with an apostrophe, which has to be read as a whole, not as 1. Lidl: look at the word next to the strike Lidl prints the current price in one element and the struck amount in another. If the label next to the strike is "UVP", it is a manufacturer's recommended price. If the strike is bare, it is Lidl's own earlier price. I have checked that on saved pages from lidl.de and lidl.fr. Other Lidl country sites share the same layout, but I have not live-tested each of them yet. Notino: the selected size, not the JSON-LD offer Notino is the shop that made me stop trusting the first JSON-LD offer on the page. That block lists every size, and the first offer is often another size or the price before a voucher code. The shelf price is the selected size. The 30-day low is recentMinPrice on that same variant in the page state, also printed as "Mindestpreis" or "Letzter niedrigster Preis". If the page state is missing, the printed label is enough. A recommended price in that state is not crossed out, so it is not treated as a previous shop price. This reader is in v0.13.3, for 25 Notino country sites. I checked it on saved pages from notino.de, and the same price state on notino.fr. Euronics Italy: "prezzo precedente" versus "prezzo consigliato" This is the RRP trap I want people to watch for this Black Friday. On euronics.it, the buy box holds the current price and two labels: - prezzo precedente, the barred previous price, is defined on the page as the lowest price charged in the 30 days before the promotion. That is the 30-day low. - prezzo consigliato is the manufacturer's recommended price. It is only an RRP. The extension uses it as a reference only when there is no previous price, and flags it as an RRP. A later compare column repeats other prices, including figures that do not belong to this product, so it is ignored. On a saved promotion page the current price was under the barred previous price, so the discount looked real against the shop's own 30-day figure. On a saved page with only a recommended price, there was no 30-day number, so tracking starts and that figure is flagged as an RRP. Euronics Italy landed on the main branch after 0.13.3. Other country sites are separate storefronts and are not included. Otto and bol.com: what I have not checked yet For otto.de I look for a retail-style old price. For bol.com I look for the list price in the buy block. Neither selector is, by itself, a 30-day disclosure. I have not yet checked those shops against a saved live product page, so I am not going to describe a disclosure I have not seen. What to do with this If you only remember one thing before Black Friday: a crossed-out number is not enough. Check the label. UVP, "prezzo consigliato", "retail price" and "adviesprijs" are recommended prices. The 30-day low may be in a quieter line, in a "30gg" or "Mindestpreis" label, or in the page's own definition of "prezzo precedente". truediscount does that comparison on the product page. Price history stays in your browser. No account, no tracking, nothing is sent anywhere. - Firefox: install from addons.mozilla.org - Chrome, Edge and Brave: load the Chrome zip from the latest GitHub release - Userscript: Greasy Fork The current release is truediscount 0.13.3. A live demo is on the site. Install it before you trust a "-50%" label this November.
truediscount now also works on Notino in 25 countries. It reads the shop's own 'lowest price in the last 30 days' and tells you if the Black Friday deal is real, all locally in your browser. Free and open source: emirmrkaljevic/truediscount
How to tell if a Black Friday discount is fake in the EU (the 30-day rule) --- title: How to tell if a Black Friday discount is fake in the EU (the 30-day rule) published: true tags: webdev, opensource, javascript, firefox --- In the EU, a discount is not allowed to invent its "old" price. Under the Omnibus Directive (Directive 2019/2161), the reference price has to be the lowest price from the last 30 days. Black Friday still fills shop pages with crossed-out numbers that look bigger than that. I built a free, open-source tool called truediscount so the check happens on the product page. What it does - Reads the visible price and the shop's own 30-day lowest-price label when the shop prints one - Flags inflated "was" prices and RRP-style crossed prices - Keeps a small price history and watchlist in the browser only - Works as a Firefox add-on (AMO), a Chrome-loadable MV3 build, and a Greasy Fork userscript No account. No telemetry. MIT licensed. Install - Firefox: AMO listing - Userscript: Greasy Fork - Source: emirmrkaljevic/truediscount - Site and shop list: emirmrkaljevic.github.io Why this matters before 27 Nov 2026 Black Friday is when the loudest "was" labels show up. If you shop in the EU, open a product page, look for the shop's 30-day low, and compare it with the crossed price. truediscount automates that comparison and keeps a local trail so the next visit is faster. If a shop is missing or wrong, the popup has a "Report a problem" button that opens a prefilled GitHub issue. Earlier write-up I wrote a more code-oriented post when the project was smaller: Catching fake Black Friday discounts with a browser extension. This one is the shopper-facing version for 2026.
I built a userscript and Firefox add-on that checks if EU discounts are real --- title: "I built a userscript and Firefox add-on that checks if EU discounts are real" published: true tags: javascript, webdev, opensource, firefox --- Every November the same thing happens: prices go up a little in October, then "drop" by 40% for Black Friday. In the EU there is actually a rule against this. I built truediscount to make that rule visible while you shop. The rule: Omnibus 30-day lowest price Since 2022 the EU Omnibus Directive (Article 6a of the Price Indication Directive) says that when a shop announces a price reduction, the "before" price must be the lowest price it charged in the previous 30 days. Not the RRP, not a price from last spring. Many shops now print this "lowest price in the last 30 days" somewhere on the page, often in small grey text far from the big red percentage. So the honest discount is: (30-day lowest price minus current price) divided by the 30-day lowest price. Sometimes that number is much smaller than the badge. Sometimes it is zero or negative. What truediscount does - Finds the current price, the advertised "was" price and the 30-day lowest price on a product page - Recalculates the discount against the 30-day lowest price and shows it next to the shop's claim - Keeps a small local price history so you can see a graph of prices you have already seen - Stores everything locally in the browser. No account, no server, no tracking Three ways to install Userscript (Greasy Fork). If you already use Tampermonkey, Violentmonkey or similar, this is the fastest option: greasyfork.org Firefox add-on. The add-on is currently in review on addons.mozilla.org. Until it is approved you can grab the Firefox zip from the GitHub releases. Chrome-based browsers. Load the Chrome zip from the releases page as an unpacked extension. A few things I learned - Price parsing is the hard part. "1.299,00 €", "€1,299.00" and "1 299,00 zł" all need to end up as the same number. I normalise by locale and treat the last separator followed by exactly two digits as the decimal mark. - Shops phrase the 30-day price differently in every language. "Niedrigster Preis der letzten 30 Tage", "prix le plus bas des 30 derniers jours", "najniższa cena z 30 dni" and so on. The extension keeps a list of phrases per language and searches near the price block. - One codebase, several targets. The MV3 extension and the userscript share the detection code. A small build script produces the Firefox zip, the Chrome zip and the .user.js from the same source. - Local-only is a feature. Not having a backend made the privacy policy short and the review process simple. Try it, break it The code is MIT licensed: emirmrkaljevic/truediscount If you find a shop where detection fails, an issue with the product URL is the most helpful thing you can send. Happy (honest) Black Friday shopping. AI tools helped with editing this post.
How EU shops label the 30-day lowest price, and how a browser extension reads them in 15 languages --- title: How EU shops label the 30-day lowest price, and how a browser extension reads them in 15 languages published: true tags: javascript, webdev, opensource, browserextensions canonical_url: emirmrkaljevic.github.io --- Since 2022 every shop in the EU that advertises a price reduction has to show the lowest price it charged in the 30 days before the reduction. That is Article 6a of the Price Indication Directive, added by the Omnibus Directive 2019/2161. The rule is the same everywhere. The way shops print it is not. I maintain truediscount, a free, open source extension for Chrome and Firefox that puts a small badge on product pages and tells you whether a discount is real. This post is about the messiest part of that job: finding the 30-day price on a page, in whatever language and layout the shop chose. What the label looks like across countries A few real phrasings, collected from shop pages: | Country | Typical label | |---|---| | Germany, Austria | Niedrigster Preis der letzten 30 Tage: 49,99 € | | France | Prix le plus bas des 30 derniers jours : 49,99 € | | Italy | Prezzo più basso degli ultimi 30 giorni: 49,99 € | | Spain | Precio más bajo de los últimos 30 días: 49,99 € | | Netherlands, Belgium | Laagste prijs van de afgelopen 30 dagen: € 49,99 | | Poland | Najniższa cena z 30 dni przed obniżką: 49,99 zł | | Czechia | Nejnižší cena za posledních 30 dní: 1 299 Kč | | Romania | Cel mai mic preț din ultimele 30 de zile: 249,99 lei | | Sweden | Lägsta pris senaste 30 dagarna: 499 kr | On top of the language there are layout differences: 1. Inline label. The number sits in the same short element as the words. This is the easy case. 2. Footnote. The struck price carries an asterisk and the explanation lives in the page footer, far away from the number. About You does this with "Letzter niedrigster Preis: der letzten 30 Tage vor der Preisermäßigung". 3. Tooltip or popover. Alternate puts the explanation in a popover attribute on an info icon next to the price. 4. Nothing at all next to the struck price. The crossed out number is the shop's own earlier price and you have to trust that it is the 30-day low. 5. RRP instead. The struck price is the manufacturer's recommended price ("UVP" in German, "PVPR" in Spanish, "adviesprijs" in Dutch). Comparing against RRP is legal, but it says nothing about what the shop charged last month. Case 5 matters most for shoppers, because "was 599, now 349" reads like a 42% cut when it is really a cut against a list price nobody paid. How the extension reads it The extractor runs in three passes, all on the page that is already open. Nothing is crawled and nothing leaves the browser. Pass 1: the current price. Structured data first (JSON-LD Product and Offer, including products nested inside other types, then microdata), then a per shop selector if one exists, then generic selectors. Pass 2: the advertised old price. Per shop selectors first, then generic ones such as s, del, [style*="line-through"] and class names containing old-price or strike. A candidate only counts if it is higher than the current price and less than 20 times it, which filters out unrelated numbers. The kind of old price is decided by its label. The newest fix (v0.9.0) came from Lidl, which renders UVP: <s>599.00</s>. The word sits in the parent element, not inside the <s>, so the extension now also looks at the short parent text: const label = (el.parentElement?.textContent || '').length < 60 ? el.parentElement.textContent : ''; oldKind = /rrp|uvp|retail price|adviesprijs|\bmsrp\b/i.test(`${selector} ${el.textContent} ${label} ${hint}`) ? 'rrp' : 'previous'; On lidl.fr the same layout shows a bare <s>49.99 €</s> with no label, and that stays a "previous price". Pass 3: the shop's own 30-day disclosure. Two regular expressions do most of the work (shortened here): one for "lowest" in about 15 languages and one for "30 days": const LOW_WORD = /(lowest|niedrigste|tiefstpreis|le plus bas|più basso|más bajo|laagste|najniższa|nejnižší|cel mai mic|lägsta|laveste|alhaisin|legalacsonyabb|najniža)/iu; const DAYS_30 = /30[\s\u00a0-]*(?:tage?n?|days?|jours|giorni|días|dagen|dagarna|dni|dní|zile|dana|nap)/giu; When both match inside a short element, the first price in that element becomes the shop's declared 30-day low. Prices are parsed with EU formats in mind: 1.299,99 €, 1 299 Kč, 49,- and € 49,99 all come out as numbers. The verdict With those three numbers the badge says one of a few things: - The old price matches the shop's 30-day low: the discount is real. - The old price is higher than the declared 30-day low: the discount is inflated, and the badge shows the real percentage. - The old price is an RRP: the badge says so and shows the 30-day low if the shop printed one. - No disclosure on the page: the extension falls back to its own local price history (one price per day, kept 90 days on your device). What is still hard - Footnote layouts (case 2) are only understood when the footnote is close to the price. Matching asterisks across a whole page gives too many false hits. - Many shops render prices with JavaScript after load, so the content script watches the page for changes and checks again once it settles. - Several big shops block automated requests, so I can only build per shop rules from pages I can actually load. The supported shops page says which shops are tested against live pages and which only use generic rules. If a shop near you prints the 30-day label in a way the extension misses, the popup has a "Report a problem" button that opens a prefilled GitHub issue with just the domain. That is the fastest way to get a new country covered before Black Friday. And if the badge gets in the way on a site you do not care about, v0.10.0 lets you hide it per domain from the popup; nothing is recorded on hidden sites. Code and builds: emirmrkaljevic/truediscount This article was written with AI assistance.