Mercurial > ec-userscripts
comparison 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 |
comparison
equal
deleted
inserted
replaced
84:af4f8b25495e | 85:9c8cde985caf |
---|---|
15 'use strict' | 15 'use strict' |
16 | 16 |
17 $('.r18mark').remove() | 17 $('.r18mark').remove() |
18 $(".r18item ~ a[href^='#adult_confirm']").remove() | 18 $(".r18item ~ a[href^='#adult_confirm']").remove() |
19 | 19 |
20 var fixR18Link = function (_i, el) { | 20 const fixR18Link = function (_i, el) { |
21 var url = `/order/detailPage/item?itemCode=${el.id}` | 21 const url = `/order/detailPage/item?itemCode=${el.id}` |
22 | 22 |
23 el.setAttribute('href', url) | 23 el.setAttribute('href', url) |
24 el.setAttribute('class', '') | 24 el.setAttribute('class', '') |
25 } | 25 } |
26 | 26 |
27 $("[href^='#adult_confirm']").each(fixR18Link) | 27 $("[href^='#adult_confirm']").each(fixR18Link) |
28 | 28 |
29 var currentQuery = new URLSearchParams(window.location.search) | 29 const currentQuery = new URLSearchParams(window.location.search) |
30 var fixSearchLink = function (_i, el) { | 30 const fixSearchLink = function (_i, el) { |
31 var query = new URLSearchParams(el.search) | 31 const query = new URLSearchParams(el.search) |
32 | 32 |
33 for (const [key, value] of currentQuery) { | 33 for (const [key, value] of currentQuery) { |
34 if (!query.has(key)) { | 34 if (!query.has(key)) { |
35 query.set(key, value) | 35 query.set(key, value) |
36 } | 36 } |