File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
docs/src/usage/main-components Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ It is intended to be used with the following TamperMonkey script in order to do
3434// @version 0.1
3535// @description Go to the platform automatically
3636// @author You
37+ // @run-at document-start
3738// @match https://*.synack.com/*
3839// @require file:///home/<homedir>/.config/synack/login.js
3940// @grant none
Original file line number Diff line number Diff line change @@ -89,17 +89,16 @@ def set_api_token_invalid(self):
8989 return False
9090
9191 def set_login_script (self ):
92- script = "let forceLogin = () => {" + \
92+ script = "(function() {sessionStorage.setItem('shared-session-com.synack.accessToken'" + \
93+ ",'" + \
94+ self ._state .api_token + \
95+ "');})();" + \
96+ "let forceLogin = () => {" + \
9397 "const loc = window.location;" + \
9498 "if(loc.href.startsWith('https://login." + self ._state .synack_domain + "/')) {" + \
9599 "loc.replace('https://platform." + self ._state .synack_domain + "');" + \
96100 "}};" + \
97101 "(function() {" + \
98- "sessionStorage.setItem('shared-session-" + \
99- '.' .join (reversed (self ._state .synack_domain .split ('.' ))) + ".accessToken'" + \
100- ",'" + \
101- self ._state .api_token + \
102- "');" + \
103102 "setTimeout(forceLogin,60000);" + \
104103 "let btn = document.createElement('button');" + \
105104 "btn.addEventListener('click',forceLogin);" + \
You can’t perform that action at this time.
0 commit comments