Temu ads redirect

Annoyed by the Temu ads that are forcing you to install the mobile app to see the product? Fear no more, this script is redirecting you directly to the product you are looking for.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Temu ads redirect
// @namespace    http://tampermonkey.net/
// @version      2024-01-26
// @license      MIT 
// @description  Annoyed by the Temu ads that are forcing you to install the mobile app to see the product? Fear no more, this script is redirecting you directly to the product you are looking for.
// @author       Bartek Igielski
// @match        https://www.temu.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=temu.com
// @grant        none
// ==/UserScript==

(function() {
  const params = new URL(document.location).searchParams
  const productId = params.get('goods_id')

  if (!productId) {
    return
  }

  document.location = `https://www.temu.com/g-${productId}.html`
})();