-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathZenmarketPlease.user.js
25 lines (22 loc) · 1012 Bytes
/
ZenmarketPlease.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// ==UserScript==
// @name ZenMarket, Please
// @namespace [email protected]
// @include https://page.auctions.yahoo.co.jp*auction/*
// @grant none
// @version 0.1.1
// @author nightson
// @description Add a link that redirects the current product page to the Zenmarket one.
// @icon https://zenmarket.jp/favicon.ico?1
// @updateURL https://github.com/nightson/UserScripts/raw/main/ZenmarketPlease.user.js
// @downloadURL https://github.com/nightson/UserScripts/raw/main/ZenmarketPlease.user.js
// ==/UserScript==
(function (){
var targetNode = document.querySelector(".Price__buttonArea a");
var a = document.createElement("a");
br = document.createElement("br");
a.text = "Go ZenMarket";
a.href = "https://zenmarket.jp/auction.aspx?itemCode=" + document.location.href.match(/[\d,\w]{9,11}/g);
a.setAttribute("class", "Button--buynow");
targetNode.parentNode.insertBefore(a, targetNode);
targetNode.parentNode.insertBefore(br, targetNode);
})();