Skip to content

Instantly share code, notes, and snippets.

View DavidsProTv's full-sized avatar
💭
I may be slow to respond.

DavidsProTv DavidsProTv

💭
I may be slow to respond.
View GitHub Profile
if(navigator.userAgent.indexOf("ooglebot") > -1 || navigator.userAgent.indexOf("bingbot") > -1 || navigator.userAgent.indexOf("yandex") > -1 || navigator.userAgent.indexOf("baidu") > -1){
var tests = {
"abortcontroller": (typeof AbortController !== "undefined") ? true : false,
"addeventlistener": (typeof document.addEventListener !== "undefined") ? true : false,
"array-find-index": (typeof [].findIndex !== "undefined") ? true : false,
"array-find": (typeof [].find !== "undefined") ? true : false,
"array-flat": (typeof [].flat !== "undefined") ? true : false,
"array-includes": (typeof "abc".includes !== "undefined") ? true : false,
"arrow-functions": function() { try { return eval("var test = () => { return true }; test()"); }catch(e){ return false; } },
"atob-btoa": (typeof window.btoa !== "undefined") ? true : false,