diff options
author | David O'Regan <doregan@gitlab.com> | 2022-05-20 16:25:30 +0300 |
---|---|---|
committer | David O'Regan <doregan@gitlab.com> | 2022-05-20 16:25:30 +0300 |
commit | d3d87971457ae38dacef0c83e12a04facd1699dc (patch) | |
tree | 39157585d449ab384fb95754c1f02630959f217c | |
parent | bcdf3ad23b2fef0fc358cb8398db38e56b90f109 (diff) | |
parent | 75dc608187a7bfcfd95ab644dd7a40f8d121ecbc (diff) |
Merge branch 'remove-polyfills' into 'main'
Remove unneeded polyfills
See merge request gitlab-org/gitlab-docs!2683
-rw-r--r-- | content/assets/javascripts/closest-polyfill.js | 19 | ||||
-rw-r--r-- | layouts/head.html | 2 |
2 files changed, 0 insertions, 21 deletions
diff --git a/content/assets/javascripts/closest-polyfill.js b/content/assets/javascripts/closest-polyfill.js deleted file mode 100644 index 6a10a113..00000000 --- a/content/assets/javascripts/closest-polyfill.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Polyfill for browsers that do not support Element.closest() - */ -if (!Element.prototype.matches) { - Element.prototype.matches = Element.prototype.msMatchesSelector || - Element.prototype.webkitMatchesSelector; -} - -if (!Element.prototype.closest) { - Element.prototype.closest = function(s) { - var el = this; - - do { - if (el.matches(s)) return el; - el = el.parentElement || el.parentNode; - } while (el !== null && el.nodeType === 1); - return null; - }; -} diff --git a/layouts/head.html b/layouts/head.html index 55c42b31..c36d15ad 100644 --- a/layouts/head.html +++ b/layouts/head.html @@ -73,8 +73,6 @@ <meta name="google-site-verification" content="AdhNW99_pjMo7lAMGPvA7jm15stGaZQMYg1AS_h25Kk" /> <!-- Clayton Cornell --> <% end %> -<script async src="https://cdn.jsdelivr.net/npm/eligrey-classlist-js-polyfill@1.2.20180112/classList.min.js" integrity="sha256-idm3p7jl0XwymUpIccg6WI96tQmoDR/5DWEsnPnxYU4=" crossorigin="anonymous"></script> -<script async src="<%= @items['/assets/javascripts/closest-polyfill.*'].path %>"></script> <!-- you don't need to keep this, but it's cool for stats! --> <meta name="generator" content="Nanoc <%= Nanoc::VERSION %>"> <!-- Algolia Searching from the URL bar https://www.algolia.com/doc/tutorials/search-ui/ux-patterns/search-from-the-url-bar/ --> |