mirror of
https://github.com/kou029w/user-script.git
synced 2025-01-18 08:05:09 +00:00
8 lines
253 B
JavaScript
8 lines
253 B
JavaScript
// ==UserScript==
|
|
// @match https://www.amazon.co.jp/*
|
|
// ==/UserScript==
|
|
"use strict";
|
|
|
|
const { pathname } = window.location;
|
|
const dp = pathname.match(/(?<=\/dp\/|\/gp\/product\/)\w*/)?.[0];
|
|
if (dp) window.history.replaceState(null, "", `/dp/${dp}`);
|