My router is stupid, and needs to be rebooted a lot.
I've simplified the process down to
http: as a shortcut on my desktop.
Once open, there is a JS button with the onClick command RebootDevice()
If I first load the restart page, then type RebootDevice(), it reboots.

Can I add something to the URL that automatically sends the JS command RebootDevice()

browse the source of the router page containing the reboot button
the source of javascript function will contain the actual url used to reboot the router
something like ' "/sys/restart2.xgi?submit REBOOT"; ' (dlink)
giving a value for your desktop button

<!-- one of many possible values --> REBOOT

tooo late to edit last post

in the javascript that performs the reboot
the url is broken into harder to recognize pieces
something similar to

var str = "/sys/restart2.xgi?";
str += exeStr("submit REBOOT");