File tree Expand file tree Collapse file tree
src/userscripts/github-auto-sso Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,11 +2,22 @@ import { defineUserScript } from "bundlemonkey";
22
33export default defineUserScript ( {
44 name : "GitHub - Auto SSO" ,
5- version : "1.1.1 " ,
5+ version : "1.2.0 " ,
66 description : "Attempt SSO if the banner exists on every pageload" ,
77 match : [ "https://github.com/*" ] ,
88 icon : "https://www.google.com/s2/favicons?domain=github.com" ,
99 main : ( ) => {
10+ const globalSSOBannerSection = document . querySelector (
11+ "[data-testid='global-sso-banner']" ,
12+ ) ;
13+ const ssoBannerActionAnchor = globalSSOBannerSection ?. querySelector (
14+ "[class*='-Banner-BannerActionsContainer-'] a" ,
15+ ) ;
16+ if ( ssoBannerActionAnchor instanceof HTMLElement ) {
17+ ssoBannerActionAnchor . click ( ) ;
18+ return ;
19+ }
20+
1021 const ssoFormSubmitButton = document . querySelector (
1122 ".business-sso-panel form button[type='submit']" ,
1223 ) ;
You can’t perform that action at this time.
0 commit comments