How to turn a button on a webpage into a Custom Button?

General discussion about Custom Buttons, including feature requests.

How to turn a button on a webpage into a Custom Button?

Postby Oranges » Sun Dec 17, 2017 2:27 pm

There's a website I use where you set some options and click a button. The button does something in Javascript, based on the options selected, and then you get some information back.

Is there a general procedure that I can follow in order to "capture" whatever the button does, and make a Custom Button from it? This, I think, would allow me to click the button with the options pre-set. Therefore it could save me quite a bit of time.

I've kept this vague deliberately because if someone just makes the button for me I won't know how to repeat the procedure in the future.

Thanks
Oranges
 
Posts: 38
Joined: Thu Jan 09, 2014 9:44 pm

Re: How to turn a button on a webpage into a Custom Button?

Postby morat » Sun Dec 17, 2017 3:39 pm

In general, it would be easier to simulate a button click, then to strip out all the javascript and recreate the button.

If the multiprocess windows option is disabled, then you can use the content object.

Example
viewtopic.php?f=6&t=3703

document.querySelector
http://developer.mozilla.org/en-US/docs ... rySelector

CSS Selectors
http://developer.mozilla.org/en-US/docs ... #Selectors
morat
 
Posts: 959
Joined: Wed Dec 28, 2011 2:38 pm


Return to General Discussion

cron