# HG changeset patch # User Edho Arief # Date 1430625882 0 # Node ID f0c125358b244f7feddf9c38e4e82e8b0e3a218b # Parent 165404d5a0a4178c6d7ff96095bd764dabaa0f4e diff -r 165404d5a0a4 -r f0c125358b24 jiku-chu-direct-link.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jiku-chu-direct-link.js Sun May 03 04:04:42 2015 +0000 @@ -0,0 +1,18 @@ +// ==UserScript== +// @name Jiku-Chu direct link +// @namespace https://myconan.net +// @version 1.0 +// @description Make proper link on Jiku-Chu pages +// @author nanaya +// @match http://www.jiku-chu.com/products/list.php?* +// @grant none +// ==/UserScript== + +$(".title a").each(function() { + var + $el = $(this), + productId = $el.attr("onclick").replace(/.*product_id=(\d+).*/, "$1"), + url = "/products/detail.php?product_id=" + productId + $el.attr("href", url) + $el.attr("onclick", "") +}) \ No newline at end of file diff -r 165404d5a0a4 -r f0c125358b24 test.md --- a/test.md Wed Mar 18 15:03:09 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -my first snippet ----------------- - -holy - -shit \ No newline at end of file