Boothで対応アバターなんかを検索するときに商品IDで検索することが面倒だったので、それをするボタンを追加するUserScriptです
Tampermonkeyなどを導入してRawをクリーック!かんたん!
Boothで対応アバターなんかを検索するときに商品IDで検索することが面倒だったので、それをするボタンを追加するUserScriptです
Tampermonkeyなどを導入してRawをクリーック!かんたん!
// ==UserScript== | |
// @name Booth Item Search | |
// @namespace https://uneu.net/ | |
// @version 1.0.1 | |
// @description Boothの商品ページからIDで検索できるやつ | |
// @author yank.nvim | |
// @match https://booth.pm/*/items/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var container = document.getElementById("js-item-share-buttons").parentNode; | |
var searchButton = document.createElement("button"); | |
searchButton.className = "id-search-button"; | |
searchButton.innerHTML = "Search by ID" | |
searchButton.addEventListener("click", () => { | |
var url = new URL(location.href); | |
var lang = url.pathname.split('/')[1]; | |
var id = url.pathname.split('/')[3]; | |
var searchUrl = new URL(`https://booth.pm/${lang}/search/${id}`); | |
window.open(searchUrl); | |
}); | |
container.appendChild(searchButton); | |
})(); |