Gmail Outdated Notification Disabler

Disables the "your browser is no longer supported" notification from gmail

  1. // ==UserScript==
  2. // @name Gmail Outdated Notification Disabler
  3. // @namespace http://your.homepage/
  4. // @version 0.04
  5. // @description Disables the "your browser is no longer supported" notification from gmail
  6. // @author Domination9987
  7. // @match https://mail.google.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. var dismissBtn; //Button that is pressed if exists
  12. var timeOut = 0; //Initially zero
  13. var timeOutLimit = 10000; //How long the loop will run before ending, in ms
  14. var interval = 100; //How often the checking is performed, in ms
  15. var checkExists = setInterval(checkIfExists, interval); //Constant call to check if the element exists
  16.  
  17. function checkIfExists(){
  18. dismissBtn = document.getElementById("link_ds");
  19. if (dismissBtn !== null){
  20. dismissBtn.click();
  21. clearInterval(checkExists);
  22. }
  23. if (timeOut >= timeOutLimit){
  24. clearInterval(checkExists);
  25. }
  26. timeOut += interval;
  27. }