Github Easy-Logout

Automatically skips the annoying logout dialog when signing out on github.com

  1. // ==UserScript==
  2. // @name Github Easy-Logout
  3. // @namespace Violentmonkey Scripts
  4. // @match https://github.com/logout
  5. // @grant none
  6. // @license GPL-2.0-or-later
  7. // @version 1.0
  8. // @author passuby
  9. // @description Automatically skips the annoying logout dialog when signing out on github.com
  10. // ==/UserScript==
  11.  
  12. if(window.location.toString() === 'https://github.com/logout') {
  13. document.querySelectorAll('input').forEach(el => {
  14. let parentElement = el.parentElement;
  15.  
  16. if(parentElement.tagName === 'FORM' &&
  17. parentElement.action !== undefined &&
  18. parentElement.action.endsWith('/logout')) {
  19.  
  20. el.click();
  21. }
  22. });
  23. }