Mercurial > ec-userscripts
comparison jiku-chu-direct-link.js @ 4:59084566b064
(none)
author | Edho Arief <me@myconan.net> |
---|---|
date | Sun, 03 May 2015 06:36:02 +0000 |
parents | 7687bbda0bb4 |
children | de6281203374 |
comparison
equal
deleted
inserted
replaced
3:7687bbda0bb4 | 4:59084566b064 |
---|---|
8 // @grant none | 8 // @grant none |
9 // ==/UserScript== | 9 // ==/UserScript== |
10 | 10 |
11 ;(function() { | 11 ;(function() { |
12 Array.prototype.forEach.call( | 12 Array.prototype.forEach.call( |
13 document.querySelectorAll(".title a, .photo a"), | 13 document.querySelectorAll("a[onclick^=\"age_verification_submit('/products/detail.php?product_id=\"]"), |
14 function(el) { | 14 function(el) { |
15 var | 15 var |
16 productId = el.getAttribute("onclick").replace(/.*product_id=(\d+).*/, "$1"), | 16 productId = el.getAttribute("onclick").replace(/.*product_id=(\d+).*/, "$1"), |
17 url = "/products/detail.php?product_id=" + productId | 17 url = "/products/detail.php?product_id=" + productId |
18 el.setAttribute("href", url) | 18 el.setAttribute("href", url) |