MCPcopy Create free account
hub / github.com/XIU2/UserScript / enterPassword

Function enterPassword

Lanzou-Enhanced.user.js:210–222  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

208
209 // 自动输入密码(仅支持访问 带密码的分享链接 时,比如上面 [带密码的分享链接自动输密码] 功能重定向后的链接)
210 function enterPassword() {
211 if (location.search.indexOf('?pwd=') > -1 || location.search.indexOf('?passwd=') > -1 || location.search.indexOf('?password=') > -1) {
212 let password = location.search.split('=')
213 if (password.length > 0) {
214 document.getElementById('pwd').value = password[password.length - 1]
215 if (document.getElementById('sub')) {
216 document.getElementById('sub').click();
217 } else {
218 document.querySelector('.passwddiv-btn[onclick]').click();
219 }
220 }
221 }
222 }
223
224
225 // 刷新不返回根目录(F5)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected