@UserTrue Thank you for your advice. Yes, at first I tried the built in mongodb with it's module. It made me quite fast switch over to MySQL and the appropriate node.js module ;)
@yourfriendkarol
This code contains an event handler. It should be added to the page before it is downloaded (preferably). Use "Browser -> execute every time the page loads". From "Tools -> execute the code" access to the root object "windows" is not. From this error there is - no "windows.document"