# HG changeset patch # User Edho Arief # Date 1438840446 0 # Node ID 06e6dbdedd47bfc7e7cf37b958b22d9a667ef278 # Parent c1a01d69291000f122b4362b4250ced75ebc11e6 diff -r c1a01d692910 -r 06e6dbdedd47 jiku-chu-direct-link.js --- a/jiku-chu-direct-link.js Thu Aug 06 05:52:29 2015 +0000 +++ b/jiku-chu-direct-link.js Thu Aug 06 05:54:06 2015 +0000 @@ -14,9 +14,9 @@ function(el) { var productId = el.getAttribute("onclick").replace(/.*product_id=(\d+).*/, "$1"), - url = "/products/detail.php?product_id=" + productId - el.setAttribute("href", url) - el.setAttribute("onclick", "") + url = "/products/detail.php?product_id=" + productId; + el.setAttribute("href", url); + el.setAttribute("onclick", ""); } ) }).call(); \ No newline at end of file