silly @silly

People who know how to code:

Make something so if someone visits the page in ie it redirects them to the Firefox/chrome download page

Jun 15, 2022, 5:14 PM
14
View all

comments

Highlighted comment
if (window.document.documentMode) {
  window.location.href = `https://www.google.com/chrome/downloads/`
}

firefox

if (window.document.documentMode) {
  window.location.href = `https://www.mozilla.org/en-US/firefox/` 
}

I might be dumb but this code doesn’t mention IE

it doesn’t need to — window.document.documentMode returns undefined in all browsers except ie 11

I actually found it on stack overflow :P