File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -410,6 +410,10 @@ function setAutolock() {
410410 document . cookie = `passphrase="${ getCachedPassphrase ( ) } ${ getCookieExpiry ( ) } "` ;
411411 autolockTimeout = setTimeout ( ( ) => {
412412 cachedPassphrase = "" ;
413+ const id = contentTab . id ;
414+ if ( id ) {
415+ chrome . tabs . sendMessage ( id , { action : "stopCapture" } ) ;
416+ }
413417 } , Number ( localStorage . autolock ) * 60000 ) ;
414418 }
415419}
Original file line number Diff line number Diff line change @@ -23,6 +23,17 @@ if (!document.getElementById("__ga_grayLayout__")) {
2323 case "pastecode" :
2424 pasteCode ( message . code ) ;
2525 break ;
26+ case "stopCapture" :
27+ const captureBox = document . getElementById ( "__ga_captureBox__" ) ;
28+ if ( captureBox ) {
29+ captureBox . style . display = "none" ;
30+ }
31+
32+ const grayLayout = document . getElementById ( "__ga_grayLayout__" ) ;
33+ if ( grayLayout ) {
34+ grayLayout . style . display = "none" ;
35+ }
36+ break ;
2637 default :
2738 // invalid command, ignore it
2839 break ;
You can’t perform that action at this time.
0 commit comments