NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name fill creds
// @namespace http://tampermonkey.net/
// @version 0.1
// @license MIT
// @description shows how to use babel compiler
// @author You
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.18.2/babel.js
// @match http://localhost:3000/*
// @match https://unitedtraders.work/*
// @match https://unitedtraders.com/*
// @match https://widgets.unitedtraders.work/*
// @match https://utcom-site-kazatca.k8s.unitedtraders.work/*
// ==/UserScript==
/* jshint ignore:start */
var inline_src = ( < > < ![CDATA[
/* jshint ignore:end */
/* jshint esnext: false */
/* jshint esversion: 6 */
var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'https://unpkg.com/react-trigger-change/dist/react-trigger-change.js?version=16.0.0-alpha.6'; document.head.appendChild(script);
var nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value").set;
const buttonSelector = '#fill';
const $ = selector => document.querySelector(selector);
const set = (id, value) => {
const el = $('[id="' + id + '"]');
if (!el) return;
//el.value = value;
var event = new Event('input', {
bubbles: true
});
nativeInputValueSetter.call(el, value);
el.dispatchEvent(event);
reactTriggerChange(el);
};
const css = (el, style) => Object.keys(style).forEach(key => el.style[key] = style[key]);
const fillData = () =>
fetch('https://randomuser.me/api/?nat=US')
.then(resp => resp.json())
.then(resp => resp.results[0])
.then(person => {
set('firstName', person.name.first);
set('firstname', person.name.first);
set('lastName', person.name.last);
set('lastname', person.name.last);
set('email', person.name.first + '.' + person.name.last + '@example.com');
set('phone', '+7(999)' + (Math.floor(Math.random() * 9e6) + 1e6));
set('password', person.name.first + 'Z123');
set('firstName-forms.ipo', 'kazatca');
set('investAmount-forms.ipo', '100');
set('email-forms.ipo', 'kazatca@example.com');
set('phone-forms.ipo', '+79999999999');
});
let button = $(buttonSelector);
if (!button) {
button = document.createElement('button');
button.innerHTML = 'fill form';
css(button, {
position: 'fixed',
top: 0,
right: 0,
zIndex: 10000,
display: 'none'
});
button.addEventListener('click', fillData);
document.body.append(button);
}
setInterval(() => {
button.style.display = $('input[id=phone]') ? 'block' : 'none';
}, 500);
/* jshint ignore:start */
]] > < />).toString();
var c = Babel.transform(inline_src, {
presets: ["es2015", "es2016"]
}); eval(c.code);
/* jshint ignore:end */