Last active
October 8, 2025 15:55
-
-
Save Wintus/f1d49203371531ee0287f89948e3282b to your computer and use it in GitHub Desktop.
UserScripts (Greasemonkey/Tampermonkey user scripts)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| env: { | |
| browser: true, | |
| es2021: true, | |
| }, | |
| extends: "eslint:recommended", | |
| overrides: [ | |
| { | |
| globals: { | |
| module: true, | |
| }, | |
| files: [".eslintrc.{js,cjs}"], | |
| parserOptions: { | |
| sourceType: "script", | |
| }, | |
| }, | |
| ], | |
| parserOptions: { | |
| ecmaVersion: "latest", | |
| }, | |
| rules: {}, | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # directory is not supported | |
| */* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "useTabs": true, | |
| "trailingComma": "all" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Amazon Discount List | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1.0 | |
| // @description show discount in search result | |
| // @author wint | |
| // @match https://www.amazon.co.jp/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=amazon.co.jp | |
| // @grant none | |
| // @require file:///C:\path\to\userscript.user.js | |
| // ==/UserScript== | |
| "use strict"; | |
| const formatter = new Intl.NumberFormat("ja", { style: "percent" }); | |
| const parse = (el) => Number(el.innerText.replaceAll(/\D/g, "")); | |
| const pricePairs = document.querySelectorAll( | |
| "#searchWidget .a-section:has(> .a-size-base-plus.a-color-price + .a-text-strike)", | |
| ); | |
| for (const el of pricePairs) { | |
| const p0 = parse(el.lastElementChild); | |
| const p1 = parse(el.firstElementChild); | |
| const percent = p1 / p0; | |
| const diff = percent - 1; | |
| // presenter | |
| const span = document.createElement("span"); | |
| span.innerText = `: ${formatter.format(percent)} (${formatter.format(diff)})`; | |
| el.append(span); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Amazon → e-hon | |
| // @version 0.1.1 | |
| // @description Add link to Move from Amazon to e-hon | |
| // @include https://www.amazon.co.jp/* | |
| // @icon https://www.google.com/s2/favicons?domain=www.amazon.jp | |
| // ==/UserScript== | |
| "use strict"; | |
| const makeBody = (isbn) => | |
| Object.entries({ | |
| 検索: "btnKodawari", | |
| クリア: "btnClear", | |
| mode: "kodawari", | |
| isbn, | |
| submitLabel: "検索", | |
| }) | |
| .map(([key, value]) => `${key}=${value}`) | |
| .join("&"); | |
| queueMicrotask(async () => { | |
| const attr = document.querySelector( | |
| "#rpi-attribute-book_details-isbn13 > .rpi-attribute-value > span", | |
| ); | |
| const isbn13 = attr.textContent.replaceAll(/\D/g, ""); | |
| try { | |
| const res = await fetch("https://www.e-hon.ne.jp/bec/SA/Forward", { | |
| method: "POST", | |
| body: makeBody(isbn13), | |
| headers: { "Content-Type": "application/x-www-form-urlencoded" }, | |
| mode: "cors", | |
| }); | |
| console.debug(res); | |
| const url = res.url; | |
| // DOM | |
| { | |
| const a = document.createElement("a"); | |
| a.href = url; | |
| a.innerText = "🔍 Search e-hon"; | |
| const span = document.createElement("span"); | |
| span.appendChild(a); | |
| const rich = document.getElementById("rich_product_information"); | |
| rich.appendChild(span); | |
| } | |
| } catch (e) { | |
| console.error(e); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Amazon → honto | |
| // @version 0.2.5 | |
| // @description Add link to Move from Amazon to honto | |
| // @match https://www.amazon.co.jp/* | |
| // @icon https://www.google.com/s2/favicons?domain=www.amazon.jp | |
| // ==/UserScript== | |
| "use strict"; | |
| // TODO: test this | |
| // init | |
| const getNode = (xpath, node) => | |
| document.evaluate(xpath, node, null, XPathResult.ANY_TYPE, null); | |
| { | |
| // ISBN | |
| const headings = getNode( | |
| `//*[@id="rich_product_information"]//ol/li[*]//span[contains(.,"ISBN-13")]`, | |
| document | |
| ); | |
| const heading = headings.iterateNext(); | |
| console.debug(heading); | |
| const codes = getNode(`../../div[3]/span/text()`, heading); | |
| const code = codes.iterateNext(); | |
| console.debug(code); | |
| const url = `https://honto.jp/netstore/search.html?detailFlg=1&isbn=${code}`; | |
| console.debug(url); | |
| // DOM | |
| { | |
| const a = document.createElement("a"); | |
| a.href = url; | |
| a.innerText = "Search honto"; | |
| const span = document.createElement("span"); | |
| span.appendChild(a); | |
| headings.parentNode.after(span); | |
| } | |
| } | |
| { | |
| // ISBN | |
| const headings = getNode( | |
| `//*[@id="detailBullets_feature_div"]/ul/li[*]/span[*]/span[contains(.,"ISBN-13")]`, | |
| document | |
| ); | |
| const heading = headings.iterateNext(); | |
| console.debug(heading); | |
| const codes = getNode(`../span[2]/text()`, heading); | |
| const code = codes.iterateNext(); | |
| console.debug(code); | |
| const url = `https://honto.jp/netstore/search.html?detailFlg=1&isbn=${code}`; | |
| console.debug(url); | |
| // DOM | |
| { | |
| const a = document.createElement("a"); | |
| a.href = url; | |
| a.innerText = "Search honto"; | |
| const span = document.createElement("span"); | |
| span.appendChild(a); | |
| headings.parentNode.after(span); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Amazon → honto (first view) | |
| // @version 0.2.6 | |
| // @description Add link to Move from Amazon to honto | |
| // @include https://www.amazon.co.jp/* | |
| // @icon https://www.google.com/s2/favicons?domain=www.amazon.jp | |
| // ==/UserScript== | |
| "use strict"; | |
| async function main() { | |
| // ISBN | |
| const attr = document.querySelector("#rpi-attribute-book_details-isbn13 > .rpi-attribute-value > span"); | |
| const isbn13 = attr.textContent.replaceAll(/\D/g, ""); | |
| const url = `https://honto.jp/netstore/search.html?detailFlg=1&isbn=${isbn13}`; | |
| // DOM | |
| { | |
| const a = document.createElement("a"); | |
| a.href = url; | |
| a.innerText = "Search honto"; | |
| const span = document.createElement("span"); | |
| span.appendChild(a); | |
| const rich = document.getElementById("rich_product_information"); | |
| rich.appendChild(span); | |
| } | |
| } | |
| main(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Amazon → honto | |
| // @version 0.2.5 | |
| // @description Add link to Move from Amazon to honto | |
| // @include https://www.amazon.co.jp/* | |
| // @icon https://www.google.com/s2/favicons?domain=www.amazon.jp | |
| // ==/UserScript== | |
| "use strict"; | |
| { | |
| // ISBN | |
| const details = document.querySelectorAll("#detailBullets_feature_div>ul>li"); | |
| const detail = Array.from(details).find(({ innerText: text }) => | |
| /^ISBN-13\b/.test(text) | |
| ); | |
| const isbn13 = detail | |
| .querySelector("li>span>span:last-child") | |
| .innerText.replaceAll(/\D/g, ""); | |
| const url = `https://honto.jp/netstore/search.html?detailFlg=1&isbn=${isbn13}`; | |
| // DOM | |
| { | |
| const a = document.createElement("a"); | |
| a.href = url; | |
| a.innerText = "Search honto"; | |
| const span = document.createElement("span"); | |
| span.appendChild(a); | |
| const div = document.querySelector( | |
| "#detailBullets_feature_div > #detailBulletsWrapper_feature_div > #detailBullets_feature_div" | |
| ); // ID is not unique! | |
| div.appendChild(span); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Amazon URL shortener | |
| // @version 1.5.37 | |
| // @description Amazon URL shortener runs in ES2015+ | |
| // @match https://www.amazon.co.jp/* | |
| // @run-at document-end | |
| // ==/UserScript== | |
| "use strict"; | |
| // lib | |
| /** | |
| * | |
| * @param {URL} from | |
| * @param {URL} to | |
| * @param {...string} keys | |
| */ | |
| const copyParams = (from, to, ...keys) => { | |
| /** | |
| * @type {[string, string][]} | |
| */ | |
| // @ts-ignore | |
| const props = keys | |
| .filter((key) => from.searchParams.has(key)) | |
| .map((key) => [key, from.searchParams.get(key)]); | |
| /** | |
| * Iterate over each key/value pair. | |
| * @type {IterableIterator<[string, string]>} | |
| */ | |
| for (const [key, value] of props) { | |
| console.debug("prop", key, value); | |
| to.searchParams.set(key, value); | |
| } | |
| }; | |
| const seg = `[^/]+`; | |
| const reASIN = "\\w{10}"; | |
| const reUUID = | |
| "[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[89AB][0-9A-F]{3}-[0-9A-F]{12}"; | |
| const hasASIN = `/(?:dp|product-reviews|kindle-dbs/product|hz/wishlist/${seg}|gp/video/detail|gp/${seg}|exec/obidos/ASIN|o/ASIN)/(${reASIN})\\b`; | |
| // main | |
| const { pathname: path } = location; | |
| const url = new URL(location.href); | |
| /** | |
| * @type {URL} | |
| */ | |
| let newUrl; | |
| const match = path.match(hasASIN); | |
| if (match) { | |
| console.debug("product:", match); | |
| if (path.match("/gp/buy/")) { | |
| throw new Error("abort on a cart page"); | |
| } | |
| console.log("ASIN"); | |
| const [path1, asin] = match; | |
| if (path.match("/(?:gp/(?:product|video/detail)|(?:exec/obidos|o)/ASIN)/")) { | |
| console.debug("old format"); | |
| newUrl = new URL(`/dp/${asin}`, origin); | |
| } else { | |
| newUrl = new URL(path1, origin); | |
| // preview | |
| copyParams(url, newUrl, "asin", "revisionId", "format", "depth"); | |
| // wishlist | |
| copyParams( | |
| url, | |
| newUrl, | |
| "type", | |
| "filter", | |
| "sort", | |
| "viewType", | |
| "itemSearchKeyword", | |
| ); | |
| // keep hash | |
| newUrl.hash = url.hash; | |
| } | |
| } else if (path.match(`^(?:/${seg})?/b\\b`)) { | |
| console.log("category"); | |
| newUrl = new URL("/b", origin); | |
| copyParams(url, newUrl, "node"); | |
| } else if (path.match(`^(?:/${seg})?/s\\b`)) { | |
| console.log("search"); | |
| newUrl = new URL("/s", origin); | |
| // beware infinity loop: | |
| // i < srs < bbn < rh | |
| // rh ?? i | |
| copyParams( | |
| url, | |
| newUrl, | |
| "k", | |
| "i", | |
| "srs", | |
| "bbn", | |
| "rh", | |
| "s", | |
| "fs", | |
| "node", | |
| "page", | |
| "emi", // → rh=p_6:$1 | |
| "keywords", | |
| "field-keywords", | |
| "text", | |
| ); | |
| } else if (path.match("^/stores/")) { | |
| console.log("stores"); | |
| const re_store = RegExp( | |
| `(/stores)(?:/${seg})?(/page/${reUUID}|/node/\\d+|/author/\\w{10}(?:/\\w+)?)`, | |
| ); | |
| const match = path.match(re_store); | |
| if (!match) { | |
| throw new Error("no match"); | |
| } | |
| const [, store, id] = match; | |
| newUrl = new URL(`${store}${id}`, origin); | |
| } else if (path.match("^/kindle-dbs/")) { | |
| console.log("kindle-dbs"); | |
| const match = path.match( | |
| RegExp(`^/kindle-dbs/(product/${reASIN}|${seg}(?:/${seg})*)`), | |
| ); | |
| if (!match) { | |
| throw new Error("no match"); | |
| } | |
| const [path1] = match; | |
| newUrl = new URL(path1, origin); | |
| // multi buy page | |
| copyParams(url, newUrl, "basketId"); | |
| // including thank you page | |
| copyParams(url, newUrl, "asin"); | |
| // including ebooks page | |
| copyParams(url, newUrl, "widgetId", "title", "storeType", "sourceType"); | |
| } else if (path.match("^/hko/deals")) { | |
| console.log("no query"); | |
| newUrl = new URL(path, origin); | |
| } else if (path.match("^/mypoints")) { | |
| console.log("my points"); | |
| newUrl = new URL(path, origin); | |
| copyParams(url, newUrl, "startTime", "filter", "pageToken", "scanForward"); | |
| } else if (path.match("/gp/customer-reviews/")) { | |
| console.log("review"); | |
| const re = RegExp("/gp/customer-reviews/(\\w+).*"); | |
| const newPath = path.replace(re, "/review/$1"); | |
| newUrl = new URL(newPath, origin); | |
| } else if (path.match("/ref_?=") && !path.match("/gp|/buy")) { | |
| console.log("ref segment"); | |
| const path1 = path.replace(RegExp(`/ref_?=${seg}`), ""); | |
| newUrl = new URL(path1, origin); | |
| newUrl.search = url.search; | |
| } else if (url.href.match("ref")) { | |
| console.log("ref query"); | |
| newUrl = new URL(url); | |
| newUrl.searchParams.delete("ref"); | |
| newUrl.searchParams.delete("ref_"); | |
| } else { | |
| throw new Error("no match"); | |
| } | |
| // debug: | |
| { | |
| console.debug("before & after"); | |
| console.table(url); | |
| console.table(newUrl); | |
| console.debug(path.match("/ref_?="), path.match("/gp|/buy")); | |
| } | |
| // guard | |
| if (url.href === newUrl.href) { | |
| throw new Error("no change"); | |
| } | |
| // navigate | |
| history.pushState( | |
| { from: url.href, to: newUrl.href }, | |
| "simplified", | |
| newUrl.href, | |
| ); | |
| console.log("URL simplified"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Copy Simple URL | |
| // @description Simplify URL running in ES6 | |
| // @version 1.0 | |
| // @run-at context-menu | |
| // @grant GM.setClipboard | |
| // ==/UserScript== | |
| "use strict"; | |
| const url = new URL(location.pathname, location.origin); | |
| GM.setClipboard(url); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Copy Title of YuGiOh Card Wiki | |
| // @namespace https://gist.github.com/Wintus/f1d49203371531ee0287f89948e3282b | |
| // @version 0.1.1 | |
| // @description for Scrapbox | |
| // @author wint | |
| // @match https://yugioh-wiki.net/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=yugioh-wiki.net | |
| // @grant none | |
| // ==/UserScript== | |
| "use strict"; | |
| const domId = "my-page-title"; | |
| // find title text | |
| const headerEl = document.getElementById("header"); | |
| const titleEl = headerEl.querySelector("h1.title > a"); | |
| const title = titleEl.innerText; | |
| const url = Array.from(document.querySelectorAll("#navigator > a")).find( | |
| (el) => el.innerText == "リロード" | |
| ).href; | |
| // create Element | |
| const span = document.createElement("span"); | |
| span.id = domId; | |
| span.style = `user-select: all;`; | |
| span.innerText = `[${url} ${title}‐遊戯王カードWiki]`; | |
| span.addEventListener("click", async ({ target }) => { | |
| console.debug(target); | |
| await navigator.clipboard.writeText(target.innerText); | |
| console.log("copied"); | |
| }); | |
| // run | |
| headerEl.append(span); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Copy URL | |
| // @description URL Copy running in ES6 | |
| // @version 1.0 | |
| // @run-at context-menu | |
| // @grant GM.setClipboard | |
| // ==/UserScript== | |
| "use strict"; | |
| GM.setClipboard(location.href); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Go Top | |
| // @description Go Top runs in ES6 | |
| // @version 1.0 | |
| // @run-at context-menu | |
| // ==/UserScript== | |
| "use strict"; | |
| location.hash = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name show google cache link | |
| // @namespace https://gist.github.com/Wintus/f1d49203371531ee0287f89948e3282b | |
| // @version 0.4.0 | |
| // @description pull out the action menu items | |
| // @author wint | |
| // @match https://www.google.com/search?* | |
| // @match https://www.google.co.jp/search?* | |
| // @icon https://www.google.com/s2/favicons?domain=google.com | |
| // @grant none | |
| // ==/UserScript== | |
| "use strict"; | |
| // init | |
| const query = "hl=en&gl=us"; | |
| const usp = new URLSearchParams(query); | |
| // update | |
| const url = new URL(location); | |
| for (const [k, v] of usp.entries()) { | |
| url.searchParams.set(k, v); | |
| } | |
| // navigate | |
| location = url; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name show google cache link | |
| // @namespace https://gist.github.com/Wintus/f1d49203371531ee0287f89948e3282b | |
| // @version 0.4.0 | |
| // @description pull out the action menu items | |
| // @author wint | |
| // @match https://www.google.com/search?* | |
| // @match https://www.google.co.jp/search?* | |
| // @icon https://www.google.com/s2/favicons?domain=google.com | |
| // @grant none | |
| // ==/UserScript== | |
| "use strict"; | |
| // selectors | |
| const buttonSelector = `#rso [role="button"][aria-label]`; | |
| const dialogSelector = '#gsr [role="dialog"]'; | |
| const closeButtonSelector = `#gsr [role="dialog"] [aria-label]`; | |
| const cacheBtnSelector = `#gsr [role="dialog"] span > span:first-child a`; | |
| console.debug("lastElementChild:", document.body.lastElementChild); | |
| const btns = document.querySelectorAll(buttonSelector); | |
| console.debug("btns:", btns); | |
| const tasks = Array.from(btns).map(async (btn) => { | |
| console.debug("btn:", btn); | |
| btn.click(); // open | |
| console.debug("lastElementChild:", document.body.lastElementChild); | |
| }).map(async (task) => task.then(() => { | |
| const dialog = document.querySelector(dialogSelector); | |
| console.debug("dialog:", dialog); | |
| const cacheBtn = document.querySelector(cacheBtnSelector); | |
| console.debug("cacheBtn:", cacheBtn); | |
| const closeBtn = document.querySelector(closeButtonSelector); | |
| console.debug("closeBtn:", closeBtn); | |
| closeBtn.click(); | |
| console.debug("lastElementChild:", document.body.lastElementChild); | |
| })); | |
| console.debug("lastElementChild:", document.body.lastElementChild); | |
| // style | |
| { | |
| const style = document.createElement(`style`); | |
| style.textContent = ` | |
| #gsr [role="dialog"] { | |
| box-shadow: unset; | |
| } | |
| `; | |
| document.head.append(style); | |
| console.log("dialog style updated"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name honto → Amazon | |
| // @version 0.3.0 | |
| // @description Add link to Move from honto to Amazon | |
| // @include https://honto.jp/* | |
| // @icon https://www.google.com/s2/favicons?domain=honto.jp | |
| // ==/UserScript== | |
| "use strict"; | |
| // main | |
| // extract ISBN | |
| const detail = document.querySelector( | |
| ".stLeftArea > .stExtra > ul.stItemData > li:last-child" | |
| ); | |
| const isbn13 = detail.innerText.replaceAll(/\D/g, ""); | |
| const url = `https://www.amazon.co.jp/s?i=stripbooks&rh=p_66:${isbn13}`; | |
| // presenter | |
| const a = document.createElement("a"); | |
| a.href = url; | |
| a.innerText = "Search Amazon"; | |
| const p = document.createElement("p"); | |
| p.appendChild(a); | |
| detail.appendChild(p); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "compilerOptions": { | |
| "checkJs": true, | |
| "module": "none", | |
| "target": "es2017", | |
| "lib": ["es2017", "DOM"] | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Kindle Multi Buy Point to Discount Ratio | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1.3 | |
| // @description desc | |
| // @author wint | |
| // @match https://www.amazon.co.jp/kindle-dbs/multibuy?basketId=* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=amazon.co.jp | |
| // @grant none | |
| // ==/UserScript== | |
| "use strict"; | |
| const parse = (str) => Number.parseInt(str.replaceAll(/\D+/g, "")); | |
| const getNum = (el) => parse(el.innerText); | |
| // main | |
| const e0 = document.getElementById("multibuyYouPaySection"); | |
| const price = Number.parseInt(e0.dataset.kindlePrice); | |
| const e1 = document.getElementById("total-points"); | |
| const points = getNum(e1); | |
| const percentage = price / (price + points); | |
| console.debug(price, points, percentage); | |
| //presenter: | |
| const formatter = new Intl.NumberFormat("ja", { style: "percent" }); | |
| const format = (num) => formatter.format(num); | |
| { | |
| const p = document.createElement("span"); | |
| p.innerText = `実質価格: ${format(percentage)} (${format(percentage - 1)})`; | |
| e0.after(p); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Kindle Percent Off | |
| // @namespace https://gist.github.com/Wintus/f1d49203371531ee0287f89948e3282b | |
| // @version 0.1.11 | |
| // @description Show the price off percentage | |
| // @author wint | |
| // @match https://www.amazon.co.jp/* | |
| // @icon https://www.google.com/s2/favicons?domain=amazon.co.jp | |
| // @grant none | |
| // @require https://unpkg.com/htm | |
| // ==/UserScript== | |
| "use strict"; | |
| const parse = (/** @type {string | undefined} */ str) => | |
| Number(str?.replaceAll(/\D/g, "")); | |
| const formatter = new Intl.NumberFormat("ja", { style: "percent" }); | |
| const fmtPlus = new Intl.NumberFormat("ja", { | |
| style: "percent", | |
| signDisplay: "always", | |
| }); | |
| const main = () => { | |
| const e0 = document.getElementById("kindle-price"); | |
| const kindlePrice = parse(e0?.innerText); | |
| const es = document.querySelectorAll( | |
| '#tmmSwatchesList [role="listitem"] [role="radio"] span.slot-price > span', | |
| ); | |
| const paperPrice = | |
| Array.from(es) | |
| .slice(1) | |
| .map((e) => parse(e.innerText)) | |
| .filter((n) => Number.isFinite(n) && n > 0) | |
| .toSorted()[0]; | |
| // guard | |
| if (!Number.isFinite(kindlePrice) || !Number.isFinite(paperPrice)) { | |
| console.warn("price not found", { kindlePrice, paperPrice }); | |
| return; | |
| } | |
| const percentage = kindlePrice / paperPrice; | |
| const diff = percentage - 1; | |
| // presenter: | |
| if (!diff) { | |
| console.log("no difference"); | |
| return; | |
| } | |
| const p = document.createElement("span"); | |
| p.innerText = `${formatter.format(percentage)} (${fmtPlus.format(diff)})`; | |
| const col = document.getElementById("kindle-price-column"); | |
| col?.append(p); | |
| }; | |
| main(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Kindle Point to Actual Price | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1.3 | |
| // @description desc | |
| // @author wint | |
| // @match https://www.amazon.co.jp/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=amazon.co.jp | |
| // @grant none | |
| // ==/UserScript== | |
| "use strict"; | |
| const parse = (str) => Number(str.replaceAll(/,/g, "")?.match(/\d+/)[0]); | |
| const getNum = (el) => parse(el.innerText); | |
| const formatter = new Intl.NumberFormat("ja", { style: "percent" }); | |
| const format = (num) => formatter.format(num); | |
| // main | |
| const e0 = document.getElementById("kindle-price"); | |
| const price = getNum(e0); | |
| const e1 = | |
| document.getElementById("aip-buybox-display-text") ?? | |
| document.querySelector( | |
| "#Ebooks-desktop-KINDLE_ALC-prices > tbody > tr.ebooks-aip-points-label > td .total-points-value-display-column > span.a-color-price", | |
| ); | |
| const points = getNum(e1); | |
| const percentage = price / (price + points); | |
| console.debug(price, points, percentage); | |
| //presenter: | |
| { | |
| const p = document.createElement("span"); | |
| p.innerText = `実質価格: ${format(percentage)} (${format(percentage - 1)})`; | |
| const el = document.getElementById("Ebooks-desktop-KINDLE_ALC-prices"); | |
| el.after(p); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // init | |
| const appSelector = "#js-app .WatchAppContainer-main"; | |
| const panelSelector = `${appSelector} > .MainContainer > .MainContainer-floatingPanel`; | |
| const mylistSelector = `${panelSelector} .AddVideoListPanelContainer-content`; | |
| const descInputSelector = `${mylistSelector} > .AddMylistModal > .AddMylistModal-descriptionGroup > input.AddMylistModal-descriptionInput`; | |
| const uploaderSelector = `${appSelector} .VideoOwnerInfo-links > .VideoOwnerInfo-pageLinks > a.VideoOwnerInfo-pageLink`; | |
| // main | |
| const panel = document.querySelector(panelSelector); | |
| panel.addEventListener("click", () => { | |
| const mylist = document.querySelector(mylistSelector); | |
| mylist.addEventListener("click", () => { | |
| const descInput = document.querySelector(descInputSelector); | |
| if (descInput.value.length > 0) { | |
| return; | |
| } | |
| const { title, href } = document.querySelector(uploaderSelector); | |
| descInput.value = `${title}: ${new URL(href).pathname.slice(1)}`; | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name No retweets | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description filter out retweets form the profile | |
| // @match https://twitter.com/* | |
| // @icon https://www.google.com/s2/favicons?domain=twitter.com | |
| // @grant none | |
| // @run-at context-menu | |
| // ==/UserScript== | |
| "use strict"; | |
| // input | |
| const username = location.href.split`/`[3]; | |
| // prepare | |
| const url = new URL("https://twitter.com/search"); | |
| const usp = url.searchParams; | |
| usp.set("q", `from:${username} exclude:retweets`); | |
| // go | |
| location.href = url.href; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name No UTM | |
| // @namespace https://gist.github.com/Wintus | |
| // @version 0.1.3 | |
| // @description remove UTM params | |
| // @author wint | |
| // @match * | |
| // @icon https://www.google.com/s2/favicons?domain=jp | |
| // @grant none | |
| // @run-at document-start | |
| // ==/UserScript== | |
| "use strict"; | |
| // init | |
| const reUTM = new RegExp("^utm_|fbclid"); | |
| // prep | |
| const url = new URL(location); | |
| const entries = [...url.searchParams.entries()]; | |
| const rejected = entries.some(([k]) => reUTM.test(k)); | |
| const filtered = entries.filter(([k]) => !reUTM.test(k)); | |
| // run | |
| if (rejected) { | |
| url.search = new URLSearchParams(filtered); | |
| history.pushState(null, "UTM removed", url); | |
| console.log("UTM removed"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name OneTrust Slayer | |
| // @version 0.1.0 | |
| // @description Disable cookies | |
| // @match * | |
| // @icon https://www.google.com/s2/favicons?domain=www.onetrust.com | |
| // ==/UserScript== | |
| "use strict"; | |
| async function main() { | |
| const openBtn = document.querySelector("#onetrust-pc-btn-handler"); | |
| openBtn.click(); | |
| const checkboxes = document.querySelectorAll( | |
| "#onetrust-consent-sdk section .ot-acc-hdr > .ot-tgl > input" | |
| ); | |
| for (const checkbox of checkboxes) { | |
| checkbox.checked = false; | |
| } | |
| const closeBtn = document.querySelector( | |
| "#onetrust-consent-sdk .ot-pc-footer > .ot-btn-container > button.save-preference-btn-handler.onetrust-close-btn-handler" | |
| ); | |
| closeBtn.click(); | |
| } | |
| main(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "userscripts", | |
| "version": "0.1.0", | |
| "lockfileVersion": 3, | |
| "requires": true, | |
| "packages": { | |
| "": { | |
| "name": "userscripts", | |
| "version": "0.1.0", | |
| "license": "AGPL", | |
| "devDependencies": { | |
| "eslint": "^8.45.0", | |
| "typescript": "^5.8.3" | |
| } | |
| }, | |
| "node_modules/@aashutoshrathi/word-wrap": { | |
| "version": "1.2.6", | |
| "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", | |
| "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">=0.10.0" | |
| } | |
| }, | |
| "node_modules/@eslint-community/eslint-utils": { | |
| "version": "4.4.0", | |
| "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", | |
| "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", | |
| "dev": true, | |
| "dependencies": { | |
| "eslint-visitor-keys": "^3.3.0" | |
| }, | |
| "engines": { | |
| "node": "^12.22.0 || ^14.17.0 || >=16.0.0" | |
| }, | |
| "peerDependencies": { | |
| "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" | |
| } | |
| }, | |
| "node_modules/@eslint-community/regexpp": { | |
| "version": "4.6.0", | |
| "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.0.tgz", | |
| "integrity": "sha512-uiPeRISaglZnaZk8vwrjQZ1CxogZeY/4IYft6gBOTqu1WhVXWmCmZMWxUv2Q/pxSvPdp1JPaO62kLOcOkMqWrw==", | |
| "dev": true, | |
| "engines": { | |
| "node": "^12.0.0 || ^14.0.0 || >=16.0.0" | |
| } | |
| }, | |
| "node_modules/@eslint/eslintrc": { | |
| "version": "2.1.0", | |
| "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.0.tgz", | |
| "integrity": "sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==", | |
| "dev": true, | |
| "dependencies": { | |
| "ajv": "^6.12.4", | |
| "debug": "^4.3.2", | |
| "espree": "^9.6.0", | |
| "globals": "^13.19.0", | |
| "ignore": "^5.2.0", | |
| "import-fresh": "^3.2.1", | |
| "js-yaml": "^4.1.0", | |
| "minimatch": "^3.1.2", | |
| "strip-json-comments": "^3.1.1" | |
| }, | |
| "engines": { | |
| "node": "^12.22.0 || ^14.17.0 || >=16.0.0" | |
| }, | |
| "funding": { | |
| "url": "https://opencollective.com/eslint" | |
| } | |
| }, | |
| "node_modules/@eslint/js": { | |
| "version": "8.44.0", | |
| "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz", | |
| "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==", | |
| "dev": true, | |
| "engines": { | |
| "node": "^12.22.0 || ^14.17.0 || >=16.0.0" | |
| } | |
| }, | |
| "node_modules/@humanwhocodes/config-array": { | |
| "version": "0.11.10", | |
| "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", | |
| "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", | |
| "dev": true, | |
| "dependencies": { | |
| "@humanwhocodes/object-schema": "^1.2.1", | |
| "debug": "^4.1.1", | |
| "minimatch": "^3.0.5" | |
| }, | |
| "engines": { | |
| "node": ">=10.10.0" | |
| } | |
| }, | |
| "node_modules/@humanwhocodes/module-importer": { | |
| "version": "1.0.1", | |
| "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", | |
| "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">=12.22" | |
| }, | |
| "funding": { | |
| "type": "github", | |
| "url": "https://github.com/sponsors/nzakas" | |
| } | |
| }, | |
| "node_modules/@humanwhocodes/object-schema": { | |
| "version": "1.2.1", | |
| "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", | |
| "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", | |
| "dev": true | |
| }, | |
| "node_modules/@nodelib/fs.scandir": { | |
| "version": "2.1.5", | |
| "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", | |
| "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", | |
| "dev": true, | |
| "dependencies": { | |
| "@nodelib/fs.stat": "2.0.5", | |
| "run-parallel": "^1.1.9" | |
| }, | |
| "engines": { | |
| "node": ">= 8" | |
| } | |
| }, | |
| "node_modules/@nodelib/fs.stat": { | |
| "version": "2.0.5", | |
| "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", | |
| "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">= 8" | |
| } | |
| }, | |
| "node_modules/@nodelib/fs.walk": { | |
| "version": "1.2.8", | |
| "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", | |
| "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", | |
| "dev": true, | |
| "dependencies": { | |
| "@nodelib/fs.scandir": "2.1.5", | |
| "fastq": "^1.6.0" | |
| }, | |
| "engines": { | |
| "node": ">= 8" | |
| } | |
| }, | |
| "node_modules/acorn": { | |
| "version": "8.10.0", | |
| "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", | |
| "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", | |
| "dev": true, | |
| "bin": { | |
| "acorn": "bin/acorn" | |
| }, | |
| "engines": { | |
| "node": ">=0.4.0" | |
| } | |
| }, | |
| "node_modules/acorn-jsx": { | |
| "version": "5.3.2", | |
| "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", | |
| "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", | |
| "dev": true, | |
| "peerDependencies": { | |
| "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" | |
| } | |
| }, | |
| "node_modules/ajv": { | |
| "version": "6.12.6", | |
| "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", | |
| "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", | |
| "dev": true, | |
| "dependencies": { | |
| "fast-deep-equal": "^3.1.1", | |
| "fast-json-stable-stringify": "^2.0.0", | |
| "json-schema-traverse": "^0.4.1", | |
| "uri-js": "^4.2.2" | |
| }, | |
| "funding": { | |
| "type": "github", | |
| "url": "https://github.com/sponsors/epoberezkin" | |
| } | |
| }, | |
| "node_modules/ansi-regex": { | |
| "version": "5.0.1", | |
| "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", | |
| "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">=8" | |
| } | |
| }, | |
| "node_modules/ansi-styles": { | |
| "version": "4.3.0", | |
| "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", | |
| "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", | |
| "dev": true, | |
| "dependencies": { | |
| "color-convert": "^2.0.1" | |
| }, | |
| "engines": { | |
| "node": ">=8" | |
| }, | |
| "funding": { | |
| "url": "https://github.com/chalk/ansi-styles?sponsor=1" | |
| } | |
| }, | |
| "node_modules/argparse": { | |
| "version": "2.0.1", | |
| "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", | |
| "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", | |
| "dev": true | |
| }, | |
| "node_modules/balanced-match": { | |
| "version": "1.0.2", | |
| "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", | |
| "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", | |
| "dev": true | |
| }, | |
| "node_modules/brace-expansion": { | |
| "version": "1.1.11", | |
| "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", | |
| "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", | |
| "dev": true, | |
| "dependencies": { | |
| "balanced-match": "^1.0.0", | |
| "concat-map": "0.0.1" | |
| } | |
| }, | |
| "node_modules/callsites": { | |
| "version": "3.1.0", | |
| "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", | |
| "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">=6" | |
| } | |
| }, | |
| "node_modules/chalk": { | |
| "version": "4.1.2", | |
| "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", | |
| "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", | |
| "dev": true, | |
| "dependencies": { | |
| "ansi-styles": "^4.1.0", | |
| "supports-color": "^7.1.0" | |
| }, | |
| "engines": { | |
| "node": ">=10" | |
| }, | |
| "funding": { | |
| "url": "https://github.com/chalk/chalk?sponsor=1" | |
| } | |
| }, | |
| "node_modules/color-convert": { | |
| "version": "2.0.1", | |
| "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", | |
| "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", | |
| "dev": true, | |
| "dependencies": { | |
| "color-name": "~1.1.4" | |
| }, | |
| "engines": { | |
| "node": ">=7.0.0" | |
| } | |
| }, | |
| "node_modules/color-name": { | |
| "version": "1.1.4", | |
| "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", | |
| "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", | |
| "dev": true | |
| }, | |
| "node_modules/concat-map": { | |
| "version": "0.0.1", | |
| "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", | |
| "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", | |
| "dev": true | |
| }, | |
| "node_modules/cross-spawn": { | |
| "version": "7.0.3", | |
| "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", | |
| "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", | |
| "dev": true, | |
| "dependencies": { | |
| "path-key": "^3.1.0", | |
| "shebang-command": "^2.0.0", | |
| "which": "^2.0.1" | |
| }, | |
| "engines": { | |
| "node": ">= 8" | |
| } | |
| }, | |
| "node_modules/debug": { | |
| "version": "4.3.4", | |
| "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", | |
| "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", | |
| "dev": true, | |
| "dependencies": { | |
| "ms": "2.1.2" | |
| }, | |
| "engines": { | |
| "node": ">=6.0" | |
| }, | |
| "peerDependenciesMeta": { | |
| "supports-color": { | |
| "optional": true | |
| } | |
| } | |
| }, | |
| "node_modules/deep-is": { | |
| "version": "0.1.4", | |
| "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", | |
| "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", | |
| "dev": true | |
| }, | |
| "node_modules/doctrine": { | |
| "version": "3.0.0", | |
| "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", | |
| "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", | |
| "dev": true, | |
| "dependencies": { | |
| "esutils": "^2.0.2" | |
| }, | |
| "engines": { | |
| "node": ">=6.0.0" | |
| } | |
| }, | |
| "node_modules/escape-string-regexp": { | |
| "version": "4.0.0", | |
| "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", | |
| "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">=10" | |
| }, | |
| "funding": { | |
| "url": "https://github.com/sponsors/sindresorhus" | |
| } | |
| }, | |
| "node_modules/eslint": { | |
| "version": "8.45.0", | |
| "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.45.0.tgz", | |
| "integrity": "sha512-pd8KSxiQpdYRfYa9Wufvdoct3ZPQQuVuU5O6scNgMuOMYuxvH0IGaYK0wUFjo4UYYQQCUndlXiMbnxopwvvTiw==", | |
| "dev": true, | |
| "dependencies": { | |
| "@eslint-community/eslint-utils": "^4.2.0", | |
| "@eslint-community/regexpp": "^4.4.0", | |
| "@eslint/eslintrc": "^2.1.0", | |
| "@eslint/js": "8.44.0", | |
| "@humanwhocodes/config-array": "^0.11.10", | |
| "@humanwhocodes/module-importer": "^1.0.1", | |
| "@nodelib/fs.walk": "^1.2.8", | |
| "ajv": "^6.10.0", | |
| "chalk": "^4.0.0", | |
| "cross-spawn": "^7.0.2", | |
| "debug": "^4.3.2", | |
| "doctrine": "^3.0.0", | |
| "escape-string-regexp": "^4.0.0", | |
| "eslint-scope": "^7.2.0", | |
| "eslint-visitor-keys": "^3.4.1", | |
| "espree": "^9.6.0", | |
| "esquery": "^1.4.2", | |
| "esutils": "^2.0.2", | |
| "fast-deep-equal": "^3.1.3", | |
| "file-entry-cache": "^6.0.1", | |
| "find-up": "^5.0.0", | |
| "glob-parent": "^6.0.2", | |
| "globals": "^13.19.0", | |
| "graphemer": "^1.4.0", | |
| "ignore": "^5.2.0", | |
| "imurmurhash": "^0.1.4", | |
| "is-glob": "^4.0.0", | |
| "is-path-inside": "^3.0.3", | |
| "js-yaml": "^4.1.0", | |
| "json-stable-stringify-without-jsonify": "^1.0.1", | |
| "levn": "^0.4.1", | |
| "lodash.merge": "^4.6.2", | |
| "minimatch": "^3.1.2", | |
| "natural-compare": "^1.4.0", | |
| "optionator": "^0.9.3", | |
| "strip-ansi": "^6.0.1", | |
| "text-table": "^0.2.0" | |
| }, | |
| "bin": { | |
| "eslint": "bin/eslint.js" | |
| }, | |
| "engines": { | |
| "node": "^12.22.0 || ^14.17.0 || >=16.0.0" | |
| }, | |
| "funding": { | |
| "url": "https://opencollective.com/eslint" | |
| } | |
| }, | |
| "node_modules/eslint-scope": { | |
| "version": "7.2.1", | |
| "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.1.tgz", | |
| "integrity": "sha512-CvefSOsDdaYYvxChovdrPo/ZGt8d5lrJWleAc1diXRKhHGiTYEI26cvo8Kle/wGnsizoCJjK73FMg1/IkIwiNA==", | |
| "dev": true, | |
| "dependencies": { | |
| "esrecurse": "^4.3.0", | |
| "estraverse": "^5.2.0" | |
| }, | |
| "engines": { | |
| "node": "^12.22.0 || ^14.17.0 || >=16.0.0" | |
| }, | |
| "funding": { | |
| "url": "https://opencollective.com/eslint" | |
| } | |
| }, | |
| "node_modules/eslint-visitor-keys": { | |
| "version": "3.4.1", | |
| "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", | |
| "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", | |
| "dev": true, | |
| "engines": { | |
| "node": "^12.22.0 || ^14.17.0 || >=16.0.0" | |
| }, | |
| "funding": { | |
| "url": "https://opencollective.com/eslint" | |
| } | |
| }, | |
| "node_modules/espree": { | |
| "version": "9.6.1", | |
| "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", | |
| "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", | |
| "dev": true, | |
| "dependencies": { | |
| "acorn": "^8.9.0", | |
| "acorn-jsx": "^5.3.2", | |
| "eslint-visitor-keys": "^3.4.1" | |
| }, | |
| "engines": { | |
| "node": "^12.22.0 || ^14.17.0 || >=16.0.0" | |
| }, | |
| "funding": { | |
| "url": "https://opencollective.com/eslint" | |
| } | |
| }, | |
| "node_modules/esquery": { | |
| "version": "1.5.0", | |
| "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", | |
| "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", | |
| "dev": true, | |
| "dependencies": { | |
| "estraverse": "^5.1.0" | |
| }, | |
| "engines": { | |
| "node": ">=0.10" | |
| } | |
| }, | |
| "node_modules/esrecurse": { | |
| "version": "4.3.0", | |
| "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", | |
| "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", | |
| "dev": true, | |
| "dependencies": { | |
| "estraverse": "^5.2.0" | |
| }, | |
| "engines": { | |
| "node": ">=4.0" | |
| } | |
| }, | |
| "node_modules/estraverse": { | |
| "version": "5.3.0", | |
| "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", | |
| "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">=4.0" | |
| } | |
| }, | |
| "node_modules/esutils": { | |
| "version": "2.0.3", | |
| "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", | |
| "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">=0.10.0" | |
| } | |
| }, | |
| "node_modules/fast-deep-equal": { | |
| "version": "3.1.3", | |
| "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", | |
| "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", | |
| "dev": true | |
| }, | |
| "node_modules/fast-json-stable-stringify": { | |
| "version": "2.1.0", | |
| "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", | |
| "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", | |
| "dev": true | |
| }, | |
| "node_modules/fast-levenshtein": { | |
| "version": "2.0.6", | |
| "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", | |
| "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", | |
| "dev": true | |
| }, | |
| "node_modules/fastq": { | |
| "version": "1.15.0", | |
| "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", | |
| "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", | |
| "dev": true, | |
| "dependencies": { | |
| "reusify": "^1.0.4" | |
| } | |
| }, | |
| "node_modules/file-entry-cache": { | |
| "version": "6.0.1", | |
| "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", | |
| "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", | |
| "dev": true, | |
| "dependencies": { | |
| "flat-cache": "^3.0.4" | |
| }, | |
| "engines": { | |
| "node": "^10.12.0 || >=12.0.0" | |
| } | |
| }, | |
| "node_modules/find-up": { | |
| "version": "5.0.0", | |
| "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", | |
| "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", | |
| "dev": true, | |
| "dependencies": { | |
| "locate-path": "^6.0.0", | |
| "path-exists": "^4.0.0" | |
| }, | |
| "engines": { | |
| "node": ">=10" | |
| }, | |
| "funding": { | |
| "url": "https://github.com/sponsors/sindresorhus" | |
| } | |
| }, | |
| "node_modules/flat-cache": { | |
| "version": "3.0.4", | |
| "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", | |
| "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", | |
| "dev": true, | |
| "dependencies": { | |
| "flatted": "^3.1.0", | |
| "rimraf": "^3.0.2" | |
| }, | |
| "engines": { | |
| "node": "^10.12.0 || >=12.0.0" | |
| } | |
| }, | |
| "node_modules/flatted": { | |
| "version": "3.2.7", | |
| "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", | |
| "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", | |
| "dev": true | |
| }, | |
| "node_modules/fs.realpath": { | |
| "version": "1.0.0", | |
| "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", | |
| "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", | |
| "dev": true | |
| }, | |
| "node_modules/glob": { | |
| "version": "7.2.3", | |
| "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", | |
| "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", | |
| "dev": true, | |
| "dependencies": { | |
| "fs.realpath": "^1.0.0", | |
| "inflight": "^1.0.4", | |
| "inherits": "2", | |
| "minimatch": "^3.1.1", | |
| "once": "^1.3.0", | |
| "path-is-absolute": "^1.0.0" | |
| }, | |
| "engines": { | |
| "node": "*" | |
| }, | |
| "funding": { | |
| "url": "https://github.com/sponsors/isaacs" | |
| } | |
| }, | |
| "node_modules/glob-parent": { | |
| "version": "6.0.2", | |
| "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", | |
| "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", | |
| "dev": true, | |
| "dependencies": { | |
| "is-glob": "^4.0.3" | |
| }, | |
| "engines": { | |
| "node": ">=10.13.0" | |
| } | |
| }, | |
| "node_modules/globals": { | |
| "version": "13.20.0", | |
| "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", | |
| "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", | |
| "dev": true, | |
| "dependencies": { | |
| "type-fest": "^0.20.2" | |
| }, | |
| "engines": { | |
| "node": ">=8" | |
| }, | |
| "funding": { | |
| "url": "https://github.com/sponsors/sindresorhus" | |
| } | |
| }, | |
| "node_modules/graphemer": { | |
| "version": "1.4.0", | |
| "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", | |
| "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", | |
| "dev": true | |
| }, | |
| "node_modules/has-flag": { | |
| "version": "4.0.0", | |
| "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", | |
| "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">=8" | |
| } | |
| }, | |
| "node_modules/ignore": { | |
| "version": "5.2.4", | |
| "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", | |
| "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">= 4" | |
| } | |
| }, | |
| "node_modules/import-fresh": { | |
| "version": "3.3.0", | |
| "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", | |
| "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", | |
| "dev": true, | |
| "dependencies": { | |
| "parent-module": "^1.0.0", | |
| "resolve-from": "^4.0.0" | |
| }, | |
| "engines": { | |
| "node": ">=6" | |
| }, | |
| "funding": { | |
| "url": "https://github.com/sponsors/sindresorhus" | |
| } | |
| }, | |
| "node_modules/imurmurhash": { | |
| "version": "0.1.4", | |
| "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", | |
| "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">=0.8.19" | |
| } | |
| }, | |
| "node_modules/inflight": { | |
| "version": "1.0.6", | |
| "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", | |
| "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", | |
| "dev": true, | |
| "dependencies": { | |
| "once": "^1.3.0", | |
| "wrappy": "1" | |
| } | |
| }, | |
| "node_modules/inherits": { | |
| "version": "2.0.4", | |
| "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", | |
| "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", | |
| "dev": true | |
| }, | |
| "node_modules/is-extglob": { | |
| "version": "2.1.1", | |
| "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", | |
| "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">=0.10.0" | |
| } | |
| }, | |
| "node_modules/is-glob": { | |
| "version": "4.0.3", | |
| "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", | |
| "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", | |
| "dev": true, | |
| "dependencies": { | |
| "is-extglob": "^2.1.1" | |
| }, | |
| "engines": { | |
| "node": ">=0.10.0" | |
| } | |
| }, | |
| "node_modules/is-path-inside": { | |
| "version": "3.0.3", | |
| "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", | |
| "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">=8" | |
| } | |
| }, | |
| "node_modules/isexe": { | |
| "version": "2.0.0", | |
| "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", | |
| "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", | |
| "dev": true | |
| }, | |
| "node_modules/js-yaml": { | |
| "version": "4.1.0", | |
| "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", | |
| "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", | |
| "dev": true, | |
| "dependencies": { | |
| "argparse": "^2.0.1" | |
| }, | |
| "bin": { | |
| "js-yaml": "bin/js-yaml.js" | |
| } | |
| }, | |
| "node_modules/json-schema-traverse": { | |
| "version": "0.4.1", | |
| "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", | |
| "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", | |
| "dev": true | |
| }, | |
| "node_modules/json-stable-stringify-without-jsonify": { | |
| "version": "1.0.1", | |
| "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", | |
| "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", | |
| "dev": true | |
| }, | |
| "node_modules/levn": { | |
| "version": "0.4.1", | |
| "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", | |
| "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", | |
| "dev": true, | |
| "dependencies": { | |
| "prelude-ls": "^1.2.1", | |
| "type-check": "~0.4.0" | |
| }, | |
| "engines": { | |
| "node": ">= 0.8.0" | |
| } | |
| }, | |
| "node_modules/locate-path": { | |
| "version": "6.0.0", | |
| "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", | |
| "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", | |
| "dev": true, | |
| "dependencies": { | |
| "p-locate": "^5.0.0" | |
| }, | |
| "engines": { | |
| "node": ">=10" | |
| }, | |
| "funding": { | |
| "url": "https://github.com/sponsors/sindresorhus" | |
| } | |
| }, | |
| "node_modules/lodash.merge": { | |
| "version": "4.6.2", | |
| "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", | |
| "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", | |
| "dev": true | |
| }, | |
| "node_modules/minimatch": { | |
| "version": "3.1.2", | |
| "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", | |
| "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", | |
| "dev": true, | |
| "dependencies": { | |
| "brace-expansion": "^1.1.7" | |
| }, | |
| "engines": { | |
| "node": "*" | |
| } | |
| }, | |
| "node_modules/ms": { | |
| "version": "2.1.2", | |
| "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", | |
| "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", | |
| "dev": true | |
| }, | |
| "node_modules/natural-compare": { | |
| "version": "1.4.0", | |
| "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", | |
| "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", | |
| "dev": true | |
| }, | |
| "node_modules/once": { | |
| "version": "1.4.0", | |
| "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", | |
| "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", | |
| "dev": true, | |
| "dependencies": { | |
| "wrappy": "1" | |
| } | |
| }, | |
| "node_modules/optionator": { | |
| "version": "0.9.3", | |
| "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", | |
| "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", | |
| "dev": true, | |
| "dependencies": { | |
| "@aashutoshrathi/word-wrap": "^1.2.3", | |
| "deep-is": "^0.1.3", | |
| "fast-levenshtein": "^2.0.6", | |
| "levn": "^0.4.1", | |
| "prelude-ls": "^1.2.1", | |
| "type-check": "^0.4.0" | |
| }, | |
| "engines": { | |
| "node": ">= 0.8.0" | |
| } | |
| }, | |
| "node_modules/p-limit": { | |
| "version": "3.1.0", | |
| "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", | |
| "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", | |
| "dev": true, | |
| "dependencies": { | |
| "yocto-queue": "^0.1.0" | |
| }, | |
| "engines": { | |
| "node": ">=10" | |
| }, | |
| "funding": { | |
| "url": "https://github.com/sponsors/sindresorhus" | |
| } | |
| }, | |
| "node_modules/p-locate": { | |
| "version": "5.0.0", | |
| "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", | |
| "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", | |
| "dev": true, | |
| "dependencies": { | |
| "p-limit": "^3.0.2" | |
| }, | |
| "engines": { | |
| "node": ">=10" | |
| }, | |
| "funding": { | |
| "url": "https://github.com/sponsors/sindresorhus" | |
| } | |
| }, | |
| "node_modules/parent-module": { | |
| "version": "1.0.1", | |
| "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", | |
| "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", | |
| "dev": true, | |
| "dependencies": { | |
| "callsites": "^3.0.0" | |
| }, | |
| "engines": { | |
| "node": ">=6" | |
| } | |
| }, | |
| "node_modules/path-exists": { | |
| "version": "4.0.0", | |
| "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", | |
| "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">=8" | |
| } | |
| }, | |
| "node_modules/path-is-absolute": { | |
| "version": "1.0.1", | |
| "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", | |
| "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">=0.10.0" | |
| } | |
| }, | |
| "node_modules/path-key": { | |
| "version": "3.1.1", | |
| "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", | |
| "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">=8" | |
| } | |
| }, | |
| "node_modules/prelude-ls": { | |
| "version": "1.2.1", | |
| "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", | |
| "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">= 0.8.0" | |
| } | |
| }, | |
| "node_modules/punycode": { | |
| "version": "2.3.0", | |
| "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", | |
| "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">=6" | |
| } | |
| }, | |
| "node_modules/queue-microtask": { | |
| "version": "1.2.3", | |
| "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", | |
| "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", | |
| "dev": true, | |
| "funding": [ | |
| { | |
| "type": "github", | |
| "url": "https://github.com/sponsors/feross" | |
| }, | |
| { | |
| "type": "patreon", | |
| "url": "https://www.patreon.com/feross" | |
| }, | |
| { | |
| "type": "consulting", | |
| "url": "https://feross.org/support" | |
| } | |
| ] | |
| }, | |
| "node_modules/resolve-from": { | |
| "version": "4.0.0", | |
| "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", | |
| "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">=4" | |
| } | |
| }, | |
| "node_modules/reusify": { | |
| "version": "1.0.4", | |
| "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", | |
| "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", | |
| "dev": true, | |
| "engines": { | |
| "iojs": ">=1.0.0", | |
| "node": ">=0.10.0" | |
| } | |
| }, | |
| "node_modules/rimraf": { | |
| "version": "3.0.2", | |
| "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", | |
| "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", | |
| "dev": true, | |
| "dependencies": { | |
| "glob": "^7.1.3" | |
| }, | |
| "bin": { | |
| "rimraf": "bin.js" | |
| }, | |
| "funding": { | |
| "url": "https://github.com/sponsors/isaacs" | |
| } | |
| }, | |
| "node_modules/run-parallel": { | |
| "version": "1.2.0", | |
| "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", | |
| "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", | |
| "dev": true, | |
| "funding": [ | |
| { | |
| "type": "github", | |
| "url": "https://github.com/sponsors/feross" | |
| }, | |
| { | |
| "type": "patreon", | |
| "url": "https://www.patreon.com/feross" | |
| }, | |
| { | |
| "type": "consulting", | |
| "url": "https://feross.org/support" | |
| } | |
| ], | |
| "dependencies": { | |
| "queue-microtask": "^1.2.2" | |
| } | |
| }, | |
| "node_modules/shebang-command": { | |
| "version": "2.0.0", | |
| "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", | |
| "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", | |
| "dev": true, | |
| "dependencies": { | |
| "shebang-regex": "^3.0.0" | |
| }, | |
| "engines": { | |
| "node": ">=8" | |
| } | |
| }, | |
| "node_modules/shebang-regex": { | |
| "version": "3.0.0", | |
| "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", | |
| "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">=8" | |
| } | |
| }, | |
| "node_modules/strip-ansi": { | |
| "version": "6.0.1", | |
| "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", | |
| "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", | |
| "dev": true, | |
| "dependencies": { | |
| "ansi-regex": "^5.0.1" | |
| }, | |
| "engines": { | |
| "node": ">=8" | |
| } | |
| }, | |
| "node_modules/strip-json-comments": { | |
| "version": "3.1.1", | |
| "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", | |
| "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">=8" | |
| }, | |
| "funding": { | |
| "url": "https://github.com/sponsors/sindresorhus" | |
| } | |
| }, | |
| "node_modules/supports-color": { | |
| "version": "7.2.0", | |
| "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", | |
| "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", | |
| "dev": true, | |
| "dependencies": { | |
| "has-flag": "^4.0.0" | |
| }, | |
| "engines": { | |
| "node": ">=8" | |
| } | |
| }, | |
| "node_modules/text-table": { | |
| "version": "0.2.0", | |
| "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", | |
| "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", | |
| "dev": true | |
| }, | |
| "node_modules/type-check": { | |
| "version": "0.4.0", | |
| "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", | |
| "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", | |
| "dev": true, | |
| "dependencies": { | |
| "prelude-ls": "^1.2.1" | |
| }, | |
| "engines": { | |
| "node": ">= 0.8.0" | |
| } | |
| }, | |
| "node_modules/type-fest": { | |
| "version": "0.20.2", | |
| "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", | |
| "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">=10" | |
| }, | |
| "funding": { | |
| "url": "https://github.com/sponsors/sindresorhus" | |
| } | |
| }, | |
| "node_modules/typescript": { | |
| "version": "5.8.3", | |
| "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", | |
| "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", | |
| "dev": true, | |
| "bin": { | |
| "tsc": "bin/tsc", | |
| "tsserver": "bin/tsserver" | |
| }, | |
| "engines": { | |
| "node": ">=14.17" | |
| } | |
| }, | |
| "node_modules/uri-js": { | |
| "version": "4.4.1", | |
| "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", | |
| "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", | |
| "dev": true, | |
| "dependencies": { | |
| "punycode": "^2.1.0" | |
| } | |
| }, | |
| "node_modules/which": { | |
| "version": "2.0.2", | |
| "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", | |
| "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", | |
| "dev": true, | |
| "dependencies": { | |
| "isexe": "^2.0.0" | |
| }, | |
| "bin": { | |
| "node-which": "bin/node-which" | |
| }, | |
| "engines": { | |
| "node": ">= 8" | |
| } | |
| }, | |
| "node_modules/wrappy": { | |
| "version": "1.0.2", | |
| "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", | |
| "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", | |
| "dev": true | |
| }, | |
| "node_modules/yocto-queue": { | |
| "version": "0.1.0", | |
| "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", | |
| "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", | |
| "dev": true, | |
| "engines": { | |
| "node": ">=10" | |
| }, | |
| "funding": { | |
| "url": "https://github.com/sponsors/sindresorhus" | |
| } | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "userscripts", | |
| "version": "0.1.0", | |
| "description": "", | |
| "type": "module", | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "keywords": [], | |
| "author": "wint", | |
| "license": "AGPL", | |
| "devDependencies": { | |
| "eslint": "^8.45.0", | |
| "typescript": "^5.8.3" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Reduce Page Width | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.3.1 | |
| // @description Set page width as 10–16cm | |
| // @author wint | |
| // @match http*:// | |
| // @grant none | |
| // @run-at context-menu | |
| // ==/UserScript== | |
| "use strict"; | |
| const m = 10; | |
| const n = [12, 6, 4, 3, 2, 1, 0]; | |
| const k = "body-max-width-index"; | |
| const d = sessionStorage; | |
| const i = d.getItem(k) % n.length; | |
| const w = m + n[i]; | |
| console.debug(`page width = ${w}cm, i = ${i}.`); | |
| const s = document.createElement("style"); | |
| s.innerText = ` | |
| body { | |
| max-inline-size: ${w}cm; | |
| margin-inline: auto; | |
| line-height: 1.6; | |
| } | |
| `; | |
| document.head.append(s); // TODO: update/set/replace | |
| d.setItem(k, i + 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const makeBody = (isbn) => | |
| Object.entries({ | |
| 検索: "btnKodawari", | |
| クリア: "btnClear", | |
| mode: "kodawari", | |
| isbn, | |
| submitLabel: "検索", | |
| }) | |
| .map(([key, value]) => `${key}=${value}`) | |
| .join("&"); | |
| // TODO: top-level await | |
| // IIAFE | |
| (async () => { | |
| const res = await fetch("https://www.e-hon.ne.jp/bec/SA/Forward", { | |
| method: "POST", | |
| body: makeBody("978-4-7885-1759-2"), | |
| headers: { "Content-Type": "application/x-www-form-urlencoded" }, | |
| mode: 'no-cors', | |
| }); | |
| console.assert(res.redirected); | |
| console.log(res.url); | |
| })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name SEShop → Amazon | |
| // @version 0.1.0 | |
| // @description Add link to Move from SEShop to Amazon | |
| // @include https://www.seshop.com//* | |
| // @icon https://www.google.com/s2/favicons?domain=www.seshop.com | |
| // ==/UserScript== | |
| "use strict"; | |
| // main | |
| // extract ISBN | |
| const details = document.querySelectorAll( | |
| "body#top > .container.cx_container_contents > ol + section > h1 + div dl > dt + dd" | |
| ); | |
| const detail = Array.from(details).find(({ previousElementSibling: el }) => | |
| el.innerText.match("ISBN") | |
| ); | |
| const isbn13 = detail.innerText.replaceAll(/\D/g, ""); | |
| const url = `https://www.amazon.co.jp/s?i=stripbooks&rh=p_66:${isbn13}`; | |
| // presenter | |
| const a = document.createElement("a"); | |
| a.href = url; | |
| a.innerText = "Search Amazon"; | |
| const p = document.createElement("p"); | |
| p.appendChild(a); | |
| detail.closest("div").appendChild(p); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "compilerOptions": { | |
| /* Visit https://aka.ms/tsconfig to read more about this file */ | |
| /* Projects */ | |
| // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ | |
| // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ | |
| // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ | |
| // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ | |
| // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ | |
| // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ | |
| /* Language and Environment */ | |
| "target": "ES2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ | |
| "lib": ["ES2022", "DOM"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ | |
| // "jsx": "preserve", /* Specify what JSX code is generated. */ | |
| // "libReplacement": true, /* Enable lib replacement. */ | |
| // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ | |
| // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ | |
| // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ | |
| // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ | |
| // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ | |
| // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ | |
| // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ | |
| // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ | |
| // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ | |
| /* Modules */ | |
| "module": "ES2022", /* Specify what module code is generated. */ | |
| // "rootDir": "./", /* Specify the root folder within your source files. */ | |
| // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ | |
| // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ | |
| // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ | |
| // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ | |
| // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ | |
| // "types": [], /* Specify type package names to be included without being referenced in a source file. */ | |
| // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ | |
| // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ | |
| // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ | |
| // "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */ | |
| // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ | |
| // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ | |
| // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ | |
| // "noUncheckedSideEffectImports": true, /* Check side effect imports. */ | |
| // "resolveJsonModule": true, /* Enable importing .json files. */ | |
| // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ | |
| // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */ | |
| /* JavaScript Support */ | |
| "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ | |
| // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ | |
| // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ | |
| /* Emit */ | |
| // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ | |
| // "declarationMap": true, /* Create sourcemaps for d.ts files. */ | |
| // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ | |
| // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ | |
| // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ | |
| "noEmit": true, /* Disable emitting files from a compilation. */ | |
| // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ | |
| // "outDir": "./", /* Specify an output folder for all emitted files. */ | |
| // "removeComments": true, /* Disable emitting comments. */ | |
| // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ | |
| // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ | |
| // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ | |
| // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ | |
| // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ | |
| // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ | |
| // "newLine": "crlf", /* Set the newline character for emitting files. */ | |
| // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ | |
| // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ | |
| // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ | |
| // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ | |
| // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ | |
| /* Interop Constraints */ | |
| // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ | |
| "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ | |
| // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */ | |
| "erasableSyntaxOnly": true, /* Do not allow runtime constructs that are not part of ECMAScript. */ | |
| // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ | |
| "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ | |
| // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ | |
| "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ | |
| /* Type Checking */ | |
| "strict": true, /* Enable all strict type-checking options. */ | |
| // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ | |
| // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ | |
| // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ | |
| // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ | |
| // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ | |
| // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */ | |
| // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ | |
| // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ | |
| // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ | |
| // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ | |
| // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ | |
| // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ | |
| // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ | |
| // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ | |
| // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ | |
| // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ | |
| // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ | |
| // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ | |
| // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ | |
| /* Completeness */ | |
| "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ | |
| "skipLibCheck": true /* Skip type checking all .d.ts files. */ | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Remove params | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1.2 | |
| // @description desc | |
| // @author wint | |
| // @match https://twitter.com/*/status/*?* | |
| // @match https://twitter.com/*?* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com | |
| // @grant none | |
| // ==/UserScript== | |
| "use strict"; | |
| const { href } = window.location; | |
| const url = new URL(href); | |
| url.searchParams.delete("s"); | |
| url.searchParams.delete("t"); | |
| if (href !== url.href) { | |
| window.location.assign(url.href); | |
| console.log("param removed:", href, url); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name YouTube Ads Skipper | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.0.1 | |
| // @description Skip YouTube Ads | |
| // @author wint | |
| // @match https://www.youtube.com/watch?* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=www.youtube.com | |
| // @grant none | |
| // ==/UserScript== | |
| "use strict"; | |
| const handle = (el) => { | |
| // guard | |
| if (!(el instanceof Element)) { | |
| console.error("not an HTMLElement", el); | |
| return; | |
| } | |
| el.focus(); | |
| console.log("focused"); | |
| // not clickable somehow | |
| // el.click(); | |
| // console.log("clicked"); | |
| }; | |
| const btnObserver = new MutationObserver((changes, observer) => { | |
| console.log("skip button changed"); | |
| for (const { target: skipBtn } of changes) { | |
| handle(skipBtn); | |
| } | |
| // the button will disappear after ads skipped | |
| observer.disconnect(); | |
| }); | |
| const selector = "#movie_player > .video-ads"; | |
| const observer = new MutationObserver(() => { | |
| console.log("ads area changed"); | |
| const skipBtn = document.querySelector(`${selector} [id*="skip-button"]`); | |
| // guard | |
| if (!skipBtn) { | |
| console.log("skip button not found"); | |
| return; | |
| } | |
| console.debug("found", skipBtn); | |
| btnObserver.observe(skipBtn, { | |
| attributes: true, | |
| /* no attributeFilter */ | |
| }); | |
| // remove display:none and force attr change | |
| skipBtn.style = null; | |
| skipBtn.ariaHidden = null; | |
| console.debug("force display change", skipBtn); | |
| }); | |
| // main | |
| const adsArea = document.querySelector(selector); | |
| observer.observe(adsArea, { childList: true }); | |
| console.log("ads area observer started"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name 条項 | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.2.0 | |
| // @description 条文すべてに第1項を追加する。 | |
| // @author wint | |
| // @match https://laws.e-gov.go.jp/law/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=e-gov.go.jp | |
| // @grant none | |
| // ==/UserScript== | |
| "use strict"; | |
| const selector = "#MainProvision > .Article > ._div_ArticleTitle"; | |
| const span = document.createElement("span"); | |
| span.style = "font-weight:bold;"; | |
| span.innerText = "1"; | |
| const q = (e) => | |
| queueMicrotask(() => { | |
| const title = e.firstElementChild; | |
| title.className = "_div_ArticleTitle"; | |
| e.parentElement.insertBefore(title, e); // move span up | |
| e.className = "_div_ParagraphSentence"; | |
| e.removeChild(e.firstChild); // remove newline text | |
| e.prepend(span.cloneNode(true)); // add 1st no | |
| }); | |
| const observer = new MutationObserver(() => { | |
| console.log("law area is loaded"); | |
| const ts = document.querySelectorAll(selector); | |
| console.debug(ts); | |
| for (const e of ts) { | |
| q(e); | |
| } | |
| console.log("updated"); | |
| }); | |
| // FIXME: SPA | |
| const lawArea = document.getElementById("app"); | |
| observer.observe(lawArea, { childList: true }); |
Amazon
TODO
URL
- product:
/dp/:asin/ - search:
/s?k=:keywords&rh=:category - category:
/b?node=:node - Amazon URL: replace
/exec/obidos/ASIN/→/dp/
→ no body will use this anymore
ref
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
UserScript
Dev
local import
cf. file URL.
DevOps
Use my prefered editor and dynamically import in to the browser: