File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -342,9 +342,23 @@ func (*OAuthHandler) writeSuccessPage(writer http.ResponseWriter, teamName strin
342342 <a href="https://github.com/codeGROOVE-dev/slacker/blob/main/docs/SETUP.md#configuring-your-repositories"
343343 target="_blank"
344344 rel="noopener noreferrer">Configure your repositories</a></p>
345- <p class="footer">Then close this window and return to Slack .</p>
345+ <p class="footer">This window will close automatically in <span id="countdown">3</span> seconds .</p>
346346 </div>
347347 </main>
348+ <script>
349+ (function() {
350+ var seconds = 3;
351+ var countdown = document.getElementById('countdown');
352+ var timer = setInterval(function() {
353+ seconds--;
354+ if (countdown) countdown.textContent = seconds;
355+ if (seconds <= 0) {
356+ clearInterval(timer);
357+ window.close();
358+ }
359+ }, 1000);
360+ })();
361+ </script>
348362</body>
349363</html>
350364` , teamName ); err != nil {
You can’t perform that action at this time.
0 commit comments