Skip to content

Instantly share code, notes, and snippets.

@PooSham
Forked from anonymous/QBis_auto_login.user.js
Last active July 5, 2017 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PooSham/6147535735f4358a2b00630dab69c9db to your computer and use it in GitHub Desktop.
Save PooSham/6147535735f4358a2b00630dab69c9db to your computer and use it in GitHub Desktop.
QBis auto login
// ==UserScript==
// @name Qbis auto login
// @namespace Qbis
// @include https://login.qbis.se/Login/login*
// @version 1
// @grant GM_getValue
// @grant GM_setValue
// @description Automatic login for the swedish(?) QBis business system (since firefox doesn't automatically fill in company name). \
// It takes you directly to the Timesheet
// ==/UserScript==
var company = GM_getValue('Company');
if (!company)
{
company = prompt('Please enter a company name', 'CompanyName');
GM_setValue('Company', company);
}
document.getElementById('txtCompany').value = company;
setTimeout(function () {
document.getElementById('btnLogin').click();
setTimeout(function () {
location.href = '/Time/Timesheet';
}, 500);
}, 500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment