There are 4 previous versions of this script.
/*//////////////////////////////////////////////////////////////////////////
// ==UserScript===
// @name InHolland SignIn
// @author Jerone UserScript Productions
// @namespace http://userscripts.org/users/31497
// @homepage http://userscripts.org/scripts/show/15445
// @description Automatic sign in at InHolland.
// @description InHolland SignIn v1.7.1 Beta
// @copyright 2007 - 2008 Jerone
// @version v1.7.1 Beta
// @versiontext Fixed small bug in framework check.
// @browser FF3
// @include http://*.inholland.nl/*
// @include https://*.inholland.nl/*
// ==/UserScript==
////////////////////////////////////////////////////////////////////////////
// ToC:
// - Copyrights
// - History
// - Todo
// - Note
// - Framework Check
// - User Settings
// - User Script
// - Statistics
////////////////////////////////////////////////////////////////////////////
THIS SCRIPT IS PROVIDED BY THE AUTHOR `AS IS' AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SCRIPT, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
////////////////////////////////////////////////////////////////////////////
// History:
// [+] = added; [-] = removed; [/] = fixed; [*] = updated;
// - 03-12-2007 15:00 [v1.0 Alpha]:
// [+] initial release;
// - 21-01-2008 23:00 [v1.1 Beta]:
// [*] cleaned up code;
// [+] added prive login;
// [+] added US_functions;
// - 04-05-2008 23:00 [v1.2]:
// [+] added framework check;
// [+] added US_language;
// [+] added US_update;
// - 27-05-2008 23:00 [v1.3 Beta]:
// [+] added Blackboard;
// [+] added Weblogin login
// [+] added auto submit;
// [+] added timed login for normal login;
// - 28-05-2008 20:00 [v1.4 Beta]:
// [+] added StudentenPortal login;
// - 30-05-2008 19:00 [v1.5 Beta]:
// [/] fixed framework check;
// - 03-09-2008 16:00 [v1.6 Beta]:
// [*] updated latest US_framework;
// [+] added cancel button;
// [*] cleaned up code;
// - 02-11-2008 23:00 [v1.7 Beta]:
// [/] fixed Blackboard inlog problem;
// [/] fixed WebLogin inlog problem;
// [+] added timed login for BlackBoard login;
// [+] added timed login for WebLogin login;
// [+] added timed login for StudentenPortal login;
// [*] cleaned up code;
// - 21-11-2008 21:15 [v1.7.1 Beta];
// [/] fixed small bug in framework check;
////////////////////////////////////////////////////////////////////////////
// Todo:
// - settings window (US_options);
////////////////////////////////////////////////////////////////////////////
// Note:
// - This script does NOT work without my other scripts:
// - US_functions => http://userscripts.org/scripts/show/16142
// - US_language => http://userscripts.org/scripts/show/16143
// - US_options => http://userscripts.org/scripts/show/31458
// - US_update => http://userscripts.org/scripts/show/16144
/*//////////////////////////////////////////////////////////////////////////
//*** FRAMEWORK CHECK ***//
// Nothing to change here!!!
(function(){
var name = "InHolland SignIn"; // current script name;
var US_functionsV = "1.9.9"; // minimum US_functions version;
var US_languageV = "1.4.4"; // minimum US_language version;
var US_optionsV = "1.9"; // minimum US_options version;
var US_updateV = "1.7"; // minimum US_update version;
var m1="The following script doesn't exist, is disabled or something went wrong:\n ",m2=name+" only works with a newer version of the following script:\n ",m3="\n\nClick 'OK' to go to the homepage of that script to download the newest version:\n ",l1="http://userscripts.org/scripts/show/16142",l2="http://userscripts.org/scripts/show/16143",l3="http://userscripts.org/scripts/show/31458",l4="http://userscripts.org/scripts/show/16144",USf="US_functions",USl="US_language",USo="US_options",USu="US_update",u="undefined",f=false,t=true,o=null,w=window;if(!(w.US_frameworkOK)){function a(b,c,d){var e=confirm(((d==1)?m1:m2)+b+m3+c);if(e)GM_openInTab(c);if(d==1){w.US_functions=function(){};w.US_language=function(){};w.US_language.localise=function(){};w.US_language.all=function(){};w.US_language.current=function(){};w.US_options=function(){};w.US_update=function(){};w.US_update.all=function(){};w.US_update.names=function(){};}return;}
function g(h,i){var j=k=f,r=/([\d]+)/i;if(r.test(i)==f)return t;i.match(r);is=RegExp.$1.split(".");h.match(r);hs=RegExp.$1.split(".");for(var x=0;x<Math.max(is.length,hs.length);x++){var hx=hs[x],ix=is[x];if(hx==u||hx==""||hx==o)hx=0;if(ix==u||ix==""||ix==o)ix=0;if(ix<hx&&!k)j=t;if(ix>hx)k=t;}return j;}var fd=ld=od=ud=f;if(typeof US_functionsV!=u){if(!(w.US_functionsOK))a(USf,l1,1);else if(g(US_functionsV,US_functionsOK))a(USf,l1);fd=t;}if(typeof US_languageV!=u){if(!(w.US_languageOK))a(USl,l2,1);else if(g(US_languageV,US_languageOK))a(USl,l2);ld=t;}if(typeof US_optionsV!=u){if(!(w.US_optionsOK))a(USo,l3,1);else if(g(US_optionsV,US_optionsOK))a(USo,l3);od=t;}if(typeof US_updateV!=u){if(!(w.US_updateOK))a(USu,l4,1);else if(g(US_updateV,US_updateOK))a(USu,l4);ud=t;}if(fd&&ld&&od&&ud){w.US_frameworkOK=t;console.log('US_framework correct imported!');}else w.US_frameworkOK=f;}})();
var language=new US_language({langMod:"browser"});
new US_update({check4Update:true,updateTime:1*60*60*1000,language:"browser",title:"InHolland SignIn",thisVersion:'v1.7.1 Beta',versionUrl:15445,updateUrl:15445});
//*** USER SETTINGS ***//
const accountName=[ // [Array [name,password]];
['account0', 'www0'], // name [String] name of your account;
['account1', 'www1'], // password [String] password of your account;
['account2', 'www2'],
['account3', 'www3'],
['account4', 'www4']];
const accountNumber = 0; // [Number] reflects the accountName above;
const loginPrive = true; // [Boolean] login as private computer (default: false = public);
const autoSubmit = false; // [Boolean] automatic login;
const submitTimer = 2000; // [Integer] milliseconds to auto submit;
const loadingImage = "data:image/g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AARS8Mn5WqOYqq3ydM5TjMUzDNiiLmJ5nhQiI9SLxjQGTwThTQLBo9f7BYOH5MF4fCR/kiAlEMgAABgqlXK9TrUPBuPRxX4fiXSCbPYY3gYo5e2JAAA7";
//*** USER SCRIPT ***//
var INHSI={
init: function(){
// Normal
if($gi("rdoPrvt") && loginPrive){
$gi("rdoPrvt").checked = "checked";
unsafeWindow.clkSec(); // onclick;
}
if($gi("username")){
$gi("username").value = accountName[accountNumber][0];
}
if($gi("password")){
$gi("password").value = accountName[accountNumber][1];
}
if(autoSubmit && $gi("logonForm") && $gi("username") && $gi("password") && $getElementsByClassName(document,"wrng","td")[0] && $getElementsByClassName(document,"wrng","td")[0].innerHTML==""){
var loginTimer = setTimeout(function(){
$gi("logonForm").submit(); // submit.
},submitTimer);
var loading = $ce("IMG");
$sa(loading,"src",loadingImage);
$sa(loading,"id","loadingImage");
$sa(loading,"style","margin:-4px 0 -4px -4px; border:0 none;");
var cancel = $ce("BUTTON");
$sa(cancel,"id","cancelBtn");
$sa(cancel,"class","btn");
$sa(cancel,"style","color:#3f52b8; background-color:#f6f8ff; border:0px; padding:2px 6px; margin:0px 6px; font-size:95%; text-align:center;");
$ac(cancel,loading);
$ac(cancel,$ct(" "+language.localise(['common','cancel'])));
$ib($gi("SubmitCreds"),cancel);
$addEvent(cancel,"click",function(){clearTimeout(loginTimer); $re($gi("cancelBtn")); return false;});
$addEvent(cancel,"mouseout",function(){this.className='btn';});
$addEvent(cancel,"mouseover",function(){this.className='btnOnMseOvr';});
$addEvent(cancel,"mousedown",function(){this.className='btnOnMseDwn';});
}
// WebLogin
if($gi("user")){
$gi("user").value = accountName[accountNumber][0];
}
if($gi("password")){
$gi("password").value = accountName[accountNumber][1];
}
if(autoSubmit && $xs("//form[@name='CitrixForm']") && $gi("user") && $gi("password")){
var loginTimer = setTimeout(function(){
$xs("//form[@name='CitrixForm']").submit(); // submit.
},submitTimer);
var loading = $ce("IMG");
$sa(loading,"src",loadingImage);
$sa(loading,"id","loadingImage");
$sa(loading,"style","margin:-4px 0 -4px -4px; border:0 none;");
var cancel = $ce("BUTTON");
$sa(cancel,"id","cancelBtn");
$sa(cancel,"class","btn");
$sa(cancel,"style","color:#3f52b8; background-color:#f6f8ff; border:0px; padding:2px 6px; margin:0px 6px; font-size:95%; text-align:center;");
$ac(cancel,loading);
$ac(cancel,$ct(" "+language.localise(['common','cancel'])));
$ib($xs("//input[@name='login']"),cancel);
$addEvent(cancel,"click",function(){clearTimeout(loginTimer); $re($gi("cancelBtn")); return false;});
}
// BlackBoard
if($xs("//input[@name='user_id']")){
$xs("//input[@name='user_id']").value = accountName[accountNumber][0];
}
if($xs("//input[@name='password']")){
$xs("//input[@name='password']").value = accountName[accountNumber][1];
}
if(autoSubmit && unsafeWindow.document.login && $xs("//input[@name='user_id']") && $xs("//input[@name='password']") && !$xs("/html/body/table/tbody/tr[2]/td[2]/form/table/tbody/tr/td/table/tbody/tr[3]")){
var loginTimer = setTimeout(function(){
unsafeWindow.validate_form(unsafeWindow.document.login); // onsubmit;
unsafeWindow.document.login.submit(); // submit;
},submitTimer);
var loading = $ce("IMG");
$sa(loading,"src",loadingImage);
$sa(loading,"id","loadingImage");
$sa(loading,"style","margin:-4px 0 -4px -4px; border:0 none;");
var cancel = $ce("A");
$sa(cancel,"id","cancelBtn");
$sa(cancel,"href","#");
$sa(cancel,"style","padding-right:4px;");
$ac(cancel,loading);
$ac(cancel,$ct(" "+language.localise(['common','cancel'])));
$ib($xs("//input[@name='Login']"),cancel);
$addEvent(cancel,"click",function(){clearTimeout(loginTimer); $re($gi("cancelBtn")); return false;});
}
// StudentenPortal
if($gi("userid")){
$gi("userid").value = accountName[accountNumber][0];
}
if($gi("pwd")){
$gi("pwd").value = accountName[accountNumber][1];
}
if(autoSubmit && $gi("pwd") && $gi("userid")){
var loginTimer = setTimeout(function(){
unsafeWindow.submitAction(unsafeWindow.document.login); // submit;
},submitTimer);
var cancelNode = $xs("//input[@name='Submit'][@class='psloginbutton']").parentNode.parentNode.childNodes[1];
$sa(cancelNode,"align","right");
var loading = $ce("IMG");
$sa(loading,"src",loadingImage);
$sa(loading,"id","loadingImage");
$sa(loading,"style","margin:-4px 0 -4px -4px; border:0 none;");
var cancel = $ce("A");
$sa(cancel,"id","cancelBtn");
$sa(cancel,"href","#");
$sa(cancel,"style","padding-right:4px;");
$ac(cancel,loading);
$ac(cancel,$ct(" "+language.localise(['common','cancel'])));
$ac(cancelNode,cancel);
$addEvent(cancel,"click",function(){clearTimeout(loginTimer); $re($gi("cancelBtn")); return false;});
} } };
INHSI.init(); // execute;
//*** STATISTICS ***//
// Words: 926;
// Characters (no spaces): 11.271;
// Characters (with spaces): 12.514;
// Lines: 250;