Skip to content

Instantly share code, notes, and snippets.

@corecode
Created September 23, 2018 13:00
Show Gist options
  • Select an option

  • Save corecode/b269848e9f759f0fb5b3f621de6b2e3b to your computer and use it in GitHub Desktop.

Select an option

Save corecode/b269848e9f759f0fb5b3f621de6b2e3b to your computer and use it in GitHub Desktop.
// ==UserScript==
// @run-at document-start
// @id Ebay URL Cleaner
// @name Ebay URL Cleaner
// @namespace
// @description Clean ebay item URL
// @include http://www.ebay.tld/itm/*
// @include https://www.ebay.tld/itm/*
// @version 1.1
// ==/UserScript==
var newurl = document.URL.match(/https?:\/\/(|www).ebay.(.+?)\/itm/g) + document.URL.match(/\/[0-9]{11,13}[^#?/]/g);
if (newurl != document.URL) location.replace(newurl);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment