Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
afragen committed Apr 21, 2021
2 parents ba56f80 + 6a0c503 commit 1d45bb2
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions js/gu-install-vanilla.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,31 @@

(function () {

//polyfill for NodeList.forEach browsers that supports ES5
if (window.NodeList && !NodeList.prototype.forEach) {
NodeList.prototype.forEach = function (callback, thisArg) {
thisArg = thisArg || window;
for (var i = 0; i < this.length; i++) {
callback.call(thisArg, this[i], i, this);
}
};
}

//polyfill for Element.matches and Element.closest in IE
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;
if (!document.documentElement.contains(el)) return null;
do {
if (el.matches(s)) return el;
el = el.parentElement || el.parentNode;
} while (el !== null && el.nodeType == 1);
return null;
};

// Hide non-default (Bitbucket & GitLab) settings on page load.
let nonDefault = ['bitbucket', 'gitlab', 'gitea', 'zipfile', 'gist'];

Expand Down

0 comments on commit 1d45bb2

Please sign in to comment.