diff jiku-chu-direct-link.user.js @ 66:444b17e657be

Standardize code style
author nanaya <me@nanaya.pro>
date Wed, 10 Jul 2019 22:36:31 +0900
parents 960d452dea99
children 521dda0a0b6f
line wrap: on
line diff
--- a/jiku-chu-direct-link.user.js	Wed Jul 10 22:30:14 2019 +0900
+++ b/jiku-chu-direct-link.user.js	Wed Jul 10 22:36:31 2019 +0900
@@ -11,15 +11,15 @@
 // ==/UserScript==
 
 ;(function () {
-  'use strict';
-  const links = document.querySelectorAll("a[onclick^=\"age_verification_submit('/products/detail.php?product_id=\"]");
+  'use strict'
+  const links = document.querySelectorAll("a[onclick^=\"age_verification_submit('/products/detail.php?product_id=\"]")
   const removeOnClick = function (el) {
-    const productId = el.getAttribute('onclick').replace(/.*product_id=(\d+).*/, '$1');
-    const url = `/products/detail.php?product_id=${productId}`;
+    const productId = el.getAttribute('onclick').replace(/.*product_id=(\d+).*/, '$1')
+    const 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)
+}())