Greasy Fork is available in English.

Обсуждения » Хотелки

Paste the text into the form and click on the button "submit"

How to make it so that when you go to a website page: http://noname.com/sendmessage.php
the text (*Hello) was automatically inserted into the message window, and after that the button was pressed: "submit"
----

Window Code and Button Code: https://pastebin.com/J4bMBi3c
----

Full WebPage code: https://pastebin.com/P2vmveSP

I would be grateful for the sample script.

// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://noname.com/sendmessage.php*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @run-at document-end
// @grant none
// ==/UserScript==

(function() {
'use strict';

document.querySelector('textarea').value = 'Hello'; //Add the text to the text box

document.querySelector('input.button').click(); //Click on the submit button

})();

a forum mod provides help to spam another forum lul

@Konf

Hahahahah, lol. If seen from that point of view yes... But when I coded it, I was just thinking that I was helping someone else.

Ответить

Войдите, чтобы ответить.