14
|
1 // ==UserScript==
|
|
2 // @name Jiku-Chu direct link
|
|
3 // @namespace https://myconan.net
|
33
|
4 // @version 2.5.1
|
14
|
5 // @description Make proper link on Jiku-Chu pages
|
|
6 // @author nanaya
|
|
7 // @match http://www.jiku-chu.com/*
|
|
8 // @grant none
|
35
|
9 // @downloadURL https://bitbucket.org/!api/2.0/snippets/nanayapro/TK64/tip/files/jiku-chu-direct-link.user.js
|
14
|
10 // ==/UserScript==
|
|
11
|
|
12 ;(function() {
|
33
|
13 "use strict";
|
|
14 var links = document.querySelectorAll("a[onclick^=\"age_verification_submit('/products/detail.php?product_id=\"]")
|
|
15 var removeOnClick = function(el) {
|
|
16 var productId = el.getAttribute("onclick").replace(/.*product_id=(\d+).*/, "$1")
|
|
17 var url = "/products/detail.php?product_id=" + productId
|
|
18
|
|
19 el.setAttribute("href", url)
|
|
20 el.setAttribute("onclick", "")
|
|
21 }
|
|
22
|
|
23 Array.prototype.forEach.call(links, removeOnClick)
|
14
|
24 }).call(); |