Gmail Outdated Notification Disabler

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

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Gmail Outdated Notification Disabler
// @namespace    http://your.homepage/
// @version      0.04
// @description  Disables the "your browser is no longer supported" notification from gmail
// @author       Domination9987
// @match        https://mail.google.com/*
// @grant        none
// ==/UserScript==

var dismissBtn;                                                           //Button that is pressed if exists
var timeOut = 0;                                                          //Initially zero
var timeOutLimit = 10000;                                                 //How long the loop will run before ending, in ms
var interval = 100;                                                       //How often the checking is performed, in ms
var checkExists = setInterval(checkIfExists, interval);                   //Constant call to check if the element exists

function checkIfExists(){
    dismissBtn = document.getElementById("link_ds");
    if (dismissBtn !== null){
        dismissBtn.click();
        clearInterval(checkExists);
    }
    if (timeOut >= timeOutLimit){
        clearInterval(checkExists);
    }
    timeOut += interval;
}