I've written a little bit of JS code to click on the Accept the Risk and Continue button in FF however, Greasemonkey won't run it. The code works fine in the console. I'd appreciate any help in this regard.
if (window.location.href.substring(0,16) == "https://10.10.10") {
var myElement = document.getElementById('exceptionDialogButton');
if(myElement){
document.getElementById('exceptionDialogButton').click();
}
}