Mercurial > ec-userscripts
comparison jiku-chu-direct-link.js @ 1:f0c125358b24
(none)
author | Edho Arief <me@myconan.net> |
---|---|
date | Sun, 03 May 2015 04:04:42 +0000 |
parents | |
children | ce30c81f3f0c |
comparison
equal
deleted
inserted
replaced
0:165404d5a0a4 | 1:f0c125358b24 |
---|---|
1 // ==UserScript== | |
2 // @name Jiku-Chu direct link | |
3 // @namespace https://myconan.net | |
4 // @version 1.0 | |
5 // @description Make proper link on Jiku-Chu pages | |
6 // @author nanaya | |
7 // @match http://www.jiku-chu.com/products/list.php?* | |
8 // @grant none | |
9 // ==/UserScript== | |
10 | |
11 $(".title a").each(function() { | |
12 var | |
13 $el = $(this), | |
14 productId = $el.attr("onclick").replace(/.*product_id=(\d+).*/, "$1"), | |
15 url = "/products/detail.php?product_id=" + productId | |
16 $el.attr("href", url) | |
17 $el.attr("onclick", "") | |
18 }) |