Greasy Fork is available in English.

gmx.net: Direkt zum Posteingang

Klickt den "E-Mail"-Button nach Login.

  1. // ==UserScript==
  2. // @name gmx.net: Direkt zum Posteingang
  3. // @namespace johnny_english
  4. // @version 2.4.2
  5. // @description Klickt den "E-Mail"-Button nach Login.
  6. // @author Johnny English, Graphen
  7. // @include /^https?://(bap\.)?navigator\.gmx\.(net|ch|at)/.*$/
  8. // @icon https://img.ui-portal.de/gmx/favicon.ico
  9. // @grant none
  10. // @noframes
  11. // @run-at document-start
  12. // ==/UserScript==
  13.  
  14. // MIT-licence:
  15. // Copyright (c) 2017 Johnny English
  16.  
  17.  
  18. // parallel AJAX disallows plain match after "document-end" (equivalent
  19. // document.onreadystatechange ... document.readyState === 'complete')
  20. new MutationObserver(
  21. // Array, MutationObserver
  22. function( mutations, new_observer ) {
  23. var thisMO = this;
  24.  
  25. // there are 4+ iframes, each with its MO
  26. var tmr = window.setTimeout( function(){
  27. thisMO.disconnect();
  28. }, 2000 );
  29.  
  30. // searching through mutations wasn't reliable for some reason
  31. var j, x = document.getElementsByTagName( "atl-menu-item" );
  32. for( j = 0; j < x.length; ++j ){
  33. if( x[j].hasAttribute( "data-item-name" ) &&
  34. x[j].getAttribute( "data-item-name" ) == "mail" ){
  35. // stop and dispose the particular timer for this MO
  36. window.clearTimeout( tmr );
  37. // click on Posteingang
  38. x[j].click();
  39. // stop and dispose this particular MO
  40. thisMO.disconnect();
  41. break;
  42. }
  43. }
  44. }
  45. ).observe( document, {
  46. childList: true,
  47. subtree: true
  48. } );