Skip to content

Instantly share code, notes, and snippets.

@girvan
Created October 25, 2019 08:09
Show Gist options
  • Select an option

  • Save girvan/2ba0ae6f19e7cca8fe96a53258b0d9a6 to your computer and use it in GitHub Desktop.

Select an option

Save girvan/2ba0ae6f19e7cca8fe96a53258b0d9a6 to your computer and use it in GitHub Desktop.

Revisions

  1. girvan revised this gist Oct 25, 2019. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions detect-browser.js
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,4 @@
    <script>
    (function(ua){
    var m = ua.match(/(msie|firefox|edge)/);
    if(m) document.documentElement.className += m[1];
    })(navigator.userAgent.toLowerCase())
    </script>
  2. girvan created this gist Oct 25, 2019.
    6 changes: 6 additions & 0 deletions detect-browser.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    <script>
    (function(ua){
    var m = ua.match(/(msie|firefox|edge)/);
    if(m) document.documentElement.className += m[1];
    })(navigator.userAgent.toLowerCase())
    </script>