Skip to content

Commit

Permalink
Add String.prototype.includes() implementation for Internet Explorer.…
Browse files Browse the repository at this point in the history
… This fixes page not loading on IE9+.
  • Loading branch information
Matriks404 committed Jan 28, 2024
1 parent aa80316 commit cf87525
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@
<!-- Load polyfills for IE11 and below -->
<script>
if (/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) {
String.prototype.includes = function(match) {
return this.indexOf(match) !== -1;
}

document.write('<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-promise/4.1.1/es6-promise.auto.min.js"><\/script>');
document.write('<script src="https://cdnjs.cloudflare.com/ajax/libs/fetch/2.0.4/fetch.js"><\/script>');

}
</script>
</head>
Expand Down

0 comments on commit cf87525

Please sign in to comment.