3
2
In our staff lounge I have installed a PC with a large TV to display our company notices. The notices are published on an external SharePoint page at head office and displayed in the lounge with Firefox (v33.0.3). I've set the PC to boot every morning and start Firefox but the SharePoint page requires authentication so I have to manually login:
I also use ReloadEvery to reload the page every 5 minutes to show any new content but the session only lasts for about 30 minutes and requires logging in again.
I would like to automate this so every time Firefox encounters this page it automatically fills the Logon ID and Password and submits them.
Answers to similar questions have suggested the AutoFill Forms add-on but it neither fills nor submits the username/password when that pages loads. I still have to click the Autofill button and then click submit. The feature list also says it can submit forms automatically but I can find nowhere to enable this.
If I right click and choose "Display form details" I see this:
Page source code:
<!DOCTYPE html>
<!-- template name: html.form.login.template.html -->
<html lang="en" dir="ltr">
<head>
<script type="text/javascript">
function postOk()
{
document.forms[0]['pf.ok'].value = 'Login';
document.forms[0].submit();
}
function postOnReturn(e)
{
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
else return true;
if (keycode == 13)
{
document.forms[0].submit();
return false;
}
else
return true;
}
function setFocus()
{
var platform = navigator.platform;
if(platform != null && platform.indexOf("iPhone") == -1)
{
document.getElementById('username').focus();
}
}
</script>
<base href="https://our.company.web.address.com/"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="minimum-scale=0.1, maximum-scale=2.0, user- scalable=1"/>
<title>Our Company Name</title>
<link rel="stylesheet" media="all" type="text/css" href="assets/css/screen.1.css"/>
<link rel="shortcut icon" href="assets/images/favicon.ico" />
</head>
<body onload="setFocus()">
<div class="ping-container">
<div class="ping-header">
<div class="ping-header-bg">
<div class="COMPANY-name"><a href="http://our.company.web.address.com/"><img src="assets/images/agencyname.png" alt="Our motto"></a></div>
</div>
</div><!-- .ping-header -->
<div class="ping-body-container" >
<div id="content-left">
</div>
<div class="ping-body">
<div style="display:none">html.form.login.template.info.4 $escape.escape($spEntityId)</div>
<form method="POST" action="/idp/7krkY/resumeSAML20/idp/SSO.ping" autocomplete="off">
<div style="padding: 0px 5px 14px; font-size: 110%">
</div>
<div style="margin-bottom: 12px; font-size: 84%; font-weight: bold;"><span>Logon ID</span>
<input id="username" type="text" size="36" name="pf.username" value="" autocorrect="off" autocapitalize="off" onKeyPress="return postOnReturn(event)" /><!----> </div>
<div style="font-size: 84%; font-weight: bold;"><span>Password</span>
<input id="password" type="password" size="36" name="pf.pass" onKeyPress="return postOnReturn(event)" autocomplete="off"/></div>
<div class="ping-buttons">
<input type="button" name="pf.ok" onclick="postOk();" value="Login"/>
</div><!-- .ping-buttons -->
</form>
</div><!-- .ping-body -->
<div id="logonHelp">
<h4>
Our Company Name
</h4>
<p>
The section of the website you are trying to access requires a
Logon ID and password.
</p>
<p>
If you have forgotten your Logon ID and/or password please
contact {redacted phone number}
</p>
</div>
</div><!-- .ping-body-container -->
<div class="ping-footer-container">
<div class="ping-footer">
<p><a href="http://our.company.web.address.com/home/copyr.html">Copyright</a>
| <a href="http://our.company.web.address.com/home/copyr.html#disclaimer">Disclaimer</a>
| <a href="http://our.company.web.address.com/home/privacy.html">Privacy</a>
| <a href="http://our.company.web.address.com/about/access/keys.html" accesskey="0">Access keys</a>
| <a href="http://our.company.web.address.com/other_languages/index.html"><img src="assets/images/icon-
flags.gif" alt="">Other languages</a></p>
<p></p>
<p></p>
</div><!-- .ping-footer -->
</div><!-- .ping-footer-container -->
</div><!-- .ping-container -->
</body>
</html>
I have no access to the SharePoint system.
How can I make Firefox automatically fill this username/password form and submit it?
If you are familiar with JS, I would recommend making a userscript to do this. – DragoonHP – 2014-12-04T04:28:02.780