Skip to content

Instantly share code, notes, and snippets.

@azu
Created June 7, 2021 04:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azu/51d594eb1c6b9eae9498ed05ab69f3ac to your computer and use it in GitHub Desktop.
Save azu/51d594eb1c6b9eae9498ed05ab69f3ac to your computer and use it in GitHub Desktop.
法人番号にクリップボードをペーストできないので、できるようにするGreasemonkey: https://www2.nenkin.go.jp/do/search_section
// ==UserScript==
// @name nenkin: クリップボードから法人番号
// @namespace Violentmonkey Scripts
// @match https://www2.nenkin.go.jp/do/search_section*
// @grant none
// @version 1.0
// @author azu
// @description クリップボードから法人番号を入れる
// ==/UserScript==
const button = document.createElement("button");
const txtHoujinNo = document.getElementById("txtHoujinNo");
txtHoujinNo.addEventListener('paste', (event) => {
event.preventDefault();
const pastedData = event.clipboardData.getData('Text');
txtHoujinNo.value = pastedData
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment