Skip to content

Commit

Permalink
Add startsWith function for IE, which doesn't support it (microsoft#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
bongiovimatthew-microsoft authored Jan 4, 2018
1 parent 77cb289 commit f3a2ffb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions centeredUi/paginatedOnload.js
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,14 @@ function SetIllustrationImage(imageUri) {
document.getElementsByTagName("head")[0].appendChild(css);
}

// IE doesn't support "startsWith", adding definition
if (!String.prototype.startsWith) {
String.prototype.startsWith = function(searchString, position){
position = position || 0;
return this.substr(position, searchString.length) === searchString;
};
}

// NOTE: If you wish to support the ADFS illustration (background image), you must use the following:
// PSH> Set-AdfsWebTheme -TargetName <activeTheme> -AdditionalFileResource @{uri='/adfs/portal/images/illustration_mine.jpg';path='.\illustration_mine.jpg'}
// SetIllustrationImage('/adfs/portal/images/illustration_mine.jpg');

0 comments on commit f3a2ffb

Please sign in to comment.