Add paste

Add paste to national lottery website sign in page

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 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        Add paste
// @namespace   national-lottery.co.uk
// @description Add paste to national lottery website sign in page
// @include     https://www.national-lottery.co.uk/sign-in
// @version     1
// @grant       none
// ==/UserScript==

var $login_input = $('#form_password');

if ($login_input.length) {
  $login_input.hide();
  
  var $new_input = $('<input>');
  
  $new_input.attr({
    type: 'password',
    id: 'my_form_password',
    name: '',
    class: 'text',
    style: 'border: 1px solid blue'
  }).appendTo($login_input.parent());
  
  //for pasting event
  $new_input.on('keyup input', function(e) { 
    $login_input.val($(this).val());  
  });
  
}