Amazon mock login

Used to simulate login to amazon welcome to use

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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 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.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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.

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

// ==UserScript==
// @name        Amazon mock login
// @name:zh-CN  懒人专用,亚马自动登录,长期更新,放心使用。
// @namespace   https://github.com/jubull/Tampermonkey
// @version     0.0.1
// @description Used to simulate login to amazon welcome to use
// @description:zh-CN 用于模拟登录亚马逊欢迎使用
// @author      LiuYun
// @include     https://sellercentral.amazon.com*
// @match       https://sellercentral.amazon.com
// @require     https://code.jquery.com/jquery-2.2.4.min.js
// @run-at      document-end
// ==/UserScript==
(function ($) {
    'use strict';
    function inputValue(dom, val) {
    var evt = new InputEvent('input', {
       'inputType'    : 'insertText',
          'data'         : val,
          'dataTransfer' : null,
          'isComposing'  : false
       });
       $(dom).val(val).get(0).dispatchEvent(evt);
    }
    inputValue('#ap_email', 'XXXXXXXXXXX');
    inputValue('#ap_password', 'XXXXXXXXXXX');
    var clickEvent = document.createEvent('MouseEvents');
    clickEvent.initEvent('click', true, true);
    document.getElementById('signInSubmit').dispatchEvent(clickEvent);
})(jQuery);