Mercurial > ec-userscripts
diff mandarake-direct-link.user.js @ 49:2e1cae72a63e
Semicolons
author | nanaya <me@nanaya.pro> |
---|---|
date | Thu, 12 Oct 2017 16:40:13 +0900 |
parents | b60f0fd9c417 |
children | f0d5a5d80bfd |
line wrap: on
line diff
--- a/mandarake-direct-link.user.js Wed Oct 11 22:22:06 2017 +0900 +++ b/mandarake-direct-link.user.js Thu Oct 12 16:40:13 2017 +0900 @@ -12,28 +12,28 @@ ;(function() { "use strict"; - $(".r18mark").remove() + $(".r18mark").remove(); var fixR18Link = function(_i, el) { - var url = `/order/detailPage/item?itemCode=${el.id}` + var url = `/order/detailPage/item?itemCode=${el.id}`; - el.setAttribute("href", url) - el.setAttribute("class", "") - } + el.setAttribute("href", url); + el.setAttribute("class", ""); + }; - $("[href^='#adult_confirm']").each(fixR18Link) + $("[href^='#adult_confirm']").each(fixR18Link); - var currentQuery = new URLSearchParams(location.search) + var currentQuery = new URLSearchParams(location.search); var fixSearchLink = function(_i, el) { - var query = new URLSearchParams(el.search) + var query = new URLSearchParams(el.search); for (let [key, value] of currentQuery) { if (!query.has(key)) { - query.set(key, value) + query.set(key, value); } } - el.setAttribute("href", `/order/listPage/list?${query.toString()}`) - } + el.setAttribute("href", `/order/listPage/list?${query.toString()}`); + }; - $("[href^='/order/listPage/list?']").each(fixSearchLink) + $("[href^='/order/listPage/list?']").each(fixSearchLink); }).call();