lvguan

旅馆自动输入

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name         lvguan
// @version      1.4
// @description  旅馆自动输入
// @author       examplecode
// @match        https://119.84.149.51:17300/portal
// @run-at       document-start
// @require      https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js
// @license       xxx
// @namespace    https://greasyfork.org/users/889747
// ==/UserScript==
function keyboardInput(dom, value) {
  let evt = document.createEvent('HTMLEvents')
  evt.initEvent('input', true, true)
  dom.value = value
  dom.dispatchEvent(evt)
}
function set() {
    if ($(".loginBlock input[type=text]").length > 0) {

keyboardInput($(".loginBlock input[type=text]")[0], '5002350154220001')
  keyboardInput($("input[type=password]")[0], 'aisino@111')

        } else {
             setTimeout(function() {
                 set()
                   }, 1000)
        }
}
(function() {
    set()
})();