Created
October 15, 2025 12:23
-
-
Save Greenscreener/a576f073ba09cab9be1e38597aba2575 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name SIS force auth | |
| // @namespace http://grsc.cz/ | |
| // @version 2024-08-28 | |
| // @description SIS force auth from cookie | |
| // @author Greenscreener | |
| // @match https://is.cuni.cz/studium/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=cuni.cz | |
| // @grant none | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| const id = new URLSearchParams(window.location.search).get("id") | |
| const matches = document.cookie.match(/sis_url_auth_because_this_is_stoopid=([a-f0-9]{32})/) | |
| if (id !== null && id.match(/^[a-f0-9]{32}$/g)) { | |
| document.cookie = "sis_url_auth_because_this_is_stoopid=" + id + ";path=/" | |
| } else if (matches) { | |
| const search = (new URLSearchParams(window.location.search)) | |
| search.set("id",matches[1]) | |
| search.set("tid","") | |
| window.location.search = search | |
| console.log("redirecting") | |
| } | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment