Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Netchex Online Login - trigger event to auto login.
// ==UserScript==
// @name netchexonline
// @namespace artistan
// @version 0.1
// @description skip username page
// @author You
// @match https://netchexonline.net/n/Login/
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
// @require https://git.io/waitForKeyElements.js
// @grant all
// ==/UserScript==
waitForKeyElements("#username", function(elem) {
jQuery("#username").val('jimbob.');
triggerEvent("input", "#username");
jQuery("#btnLogin").click();
});
// jQuery events not working for angular, need direct DOM manipulation
function triggerEvent(e, s){
"use strict";
var event = document.createEvent('HTMLEvents');
event.initEvent(e, true, true);
document.querySelector(s).dispatchEvent(event);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.