Last active
January 11, 2021 16:15
-
-
Save splintor/6a2b8b4bc81210fc33483a423fc90bbf to your computer and use it in GitHub Desktop.
TeamCity auto-login
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 TeamCity Auto-login | |
| // @version 0.1 | |
| // @description Click the "Login via oAuth" button when TeamCity is not connected | |
| // @author Shmulik Flint | |
| // @match http://*tc.dev.wixpress.com/login.html | |
| // @downloadURL https://gist.github.com/splintor/6a2b8b4bc81210fc33483a423fc90bbf/raw | |
| // @updateURL https://gist.github.com/splintor/6a2b8b4bc81210fc33483a423fc90bbf/raw | |
| // @icon http://tc.dev.wixpress.com/favicon.ico | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| function clickLoginButton() { | |
| const loginButton = document.querySelector('form[method="GET"] .loginButton'); | |
| loginButton ? loginButton.click() : setTimeout(clickLoginButton, 1000); | |
| } | |
| clickLoginButton(); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment