diff jiku-chu-direct-link.user.js @ 108:2c4470b73ad9

Switch to semistandard No more `;` at the start of line.
author nanaya <me@nanaya.net>
date Sun, 15 Jan 2023 23:24:03 +0900
parents 86da34e62d29
children ef21ef445fc6
line wrap: on
line diff
--- a/jiku-chu-direct-link.user.js	Sun Jan 15 23:15:45 2023 +0900
+++ b/jiku-chu-direct-link.user.js	Sun Jan 15 23:24:03 2023 +0900
@@ -10,16 +10,16 @@
 // @downloadURL  https://hg.myconan.net/ec-userscripts/raw-file/tip/jiku-chu-direct-link.user.js
 // ==/UserScript==
 
-;(function () {
-  'use strict'
-  const links = document.querySelectorAll("a[onclick^=\"age_verification_submit('/products/detail.php?product_id=\"]")
+(function () {
+  '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);
+}());