tech / LibFacilities

// ==UserScript==
// @name         LibFacilities
// @version      0.3.00
// @description  Automating the Booking PC
// @homepageURL     https://openuserjs.org/scripts/tech/LibFacilities
// @updateURL   https://openuserjs.org/install/tech/LibFacilities.user.js
// @author       tech
// @license         MIT
// @noframes
// @include        https://libcalendar.ntu.edu.sg/*
// @include        https://libauth.com/static/*
// @exclude         https://libcalendar.ntu.edu.sg/admin/*
// @require     https://code.jquery.com/jquery-3.2.1.min.js
// ==/UserScript==

 $(document).ready(function () {
           if (window.location.href.indexOf('spaces') > 0) {
                console.log("Space timeout");
				setTimeout(function(){ window.location.href = "https://libcalendar.ntu.edu.sg/spaces/logout?session="; }, 100000);
            }
     else if (window.location.href.indexOf('libauth') > -1) {
         console.log("Logout of Libcal");
				setTimeout(function(){ window.location.href = "https://libcalendar.ntu.edu.sg"; }, 3000);
            }
    });