Mercurial > ec-userscripts
diff jiku-chu-direct-link.user.js @ 49:2e1cae72a63e
Semicolons
author | nanaya <me@nanaya.pro> |
---|---|
date | Thu, 12 Oct 2017 16:40:13 +0900 |
parents | 32a213717e6a |
children | e8517cc75a74 |
line wrap: on
line diff
--- a/jiku-chu-direct-link.user.js Wed Oct 11 22:22:06 2017 +0900 +++ b/jiku-chu-direct-link.user.js Thu Oct 12 16:40:13 2017 +0900 @@ -11,14 +11,14 @@ ;(function() { "use strict"; - var links = document.querySelectorAll("a[onclick^=\"age_verification_submit('/products/detail.php?product_id=\"]") + var links = document.querySelectorAll("a[onclick^=\"age_verification_submit('/products/detail.php?product_id=\"]"); var removeOnClick = function(el) { - var productId = el.getAttribute("onclick").replace(/.*product_id=(\d+).*/, "$1") - var url = "/products/detail.php?product_id=" + productId + var productId = el.getAttribute("onclick").replace(/.*product_id=(\d+).*/, "$1"); + var url = "/products/detail.php?product_id=" + productId; - el.setAttribute("href", url) - el.setAttribute("onclick", "") - } + el.setAttribute("href", url); + el.setAttribute("onclick", ""); + }; - Array.prototype.forEach.call(links, removeOnClick) + Array.prototype.forEach.call(links, removeOnClick); }).call(); \ No newline at end of file