// ==UserScript== // @name Tools-身份證產生器-自動產生身份證並複製 // @namespace http://tampermonkey.net/ // @version 0.6 // @description test // @author Hander // @match https://people.debian.org/~paulliu/ROCid.html // @icon https://www.google.com/s2/favicons?domain=debian.org // @grant none // @license MIT // @downloadURL none // ==/UserScript== (function() { 'use strict'; // Generate output2(city,sex,mid,idoutput1,idoutput2); // Check output3(idoutput1,idoutput2,city,sex,mid); // 選取產生的身份證字號 idoutput1.a.select(); // document.execCommand("copy"); // var textarea = document.createElement('textarea'); // textarea.textContent = idoutput1.a.value; // document.body.appendChild(textarea); // var selection = document.getSelection(); // var range = document.createRange(); // range.selectNode(textarea); // selection.removeAllRanges(); // selection.addRange(range); // console.log('copy success', document.execCommand('copy')); // selection.removeAllRanges(); // document.body.removeChild(textarea); })();