蓝凑云自动填写提取码

蓝凑云自动填写链接里的提取码

// ==UserScript==
// @name         蓝凑云自动填写提取码
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  蓝凑云自动填写链接里的提取码
// @author       zyb
// @match        https://lanzoui.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=sass.hk
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
	'use strict';

	// Your code here...
	let passwardArr=['psd','pwd','passward'];
	let inputDom = document.querySelectorAll("#pwd")[0];
	let submitDom = document.querySelectorAll("#sub")[0];

	passwardArr.forEach(passward=>{

		let hash = location.hash && location.hash.split("&").filter(item=>{
			return item.includes(passward)
		})[0]?.split(passward+"=")[1];

		let url = location.search && location.search.split("&").filter(item=>{
			return item.includes(passward)
		})[0]?.split(passward+"=")[1];
		inputDom.value = hash || url;
		inputDom.value && submitDom.click();
	})
})();