lvguan

旅馆自动输入

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

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

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

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

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

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==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()
})();