Amazon mock login

Used to simulate login to amazon welcome to use

اعتبارا من 16-03-2020. شاهد أحدث إصدار.

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        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);