I am pretty new to both javascript and greasemonkey, so please be patient with me. I am trying to create a small script to automatcally click the indicated link in the screenshot below / on the webpage https://www.nordnet.no/login-next?redirect_to=%2Foverview when said webpage loads.
From reading this answer, I thought the following greasemonkey script should do the trick, but I think I must have made an error somewhere, as it doesn't seem to do anything.
// ==UserScript==
// @name Expand login fields Nordnet
// @namespace www.example.org
// @description Lets me see the login fields for username and password
// @version 1
// @grant none
// @include https://www.nordnet.no/login*
// ==/UserScript==
document.getElementById("otp-view").dispatchEvent(new MouseEvent('click'));
I'd include the website's html in this question, but unfortunately that would break the character limit.