diff mandarake-direct-link.user.js @ 85:9c8cde985caf

Update standard and fix
author nanaya <me@nanaya.pro>
date Thu, 15 Apr 2021 15:01:22 +0900
parents 86da34e62d29
children b2d0b37f945f
line wrap: on
line diff
--- a/mandarake-direct-link.user.js	Thu Apr 15 14:56:23 2021 +0900
+++ b/mandarake-direct-link.user.js	Thu Apr 15 15:01:22 2021 +0900
@@ -17,8 +17,8 @@
   $('.r18mark').remove()
   $(".r18item ~ a[href^='#adult_confirm']").remove()
 
-  var fixR18Link = function (_i, el) {
-    var url = `/order/detailPage/item?itemCode=${el.id}`
+  const fixR18Link = function (_i, el) {
+    const url = `/order/detailPage/item?itemCode=${el.id}`
 
     el.setAttribute('href', url)
     el.setAttribute('class', '')
@@ -26,9 +26,9 @@
 
   $("[href^='#adult_confirm']").each(fixR18Link)
 
-  var currentQuery = new URLSearchParams(window.location.search)
-  var fixSearchLink = function (_i, el) {
-    var query = new URLSearchParams(el.search)
+  const currentQuery = new URLSearchParams(window.location.search)
+  const fixSearchLink = function (_i, el) {
+    const query = new URLSearchParams(el.search)
 
     for (const [key, value] of currentQuery) {
       if (!query.has(key)) {