mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
startsWith Polyfill
Fixes hidding of custom individual settings when not in use on user manager page.
This commit is contained in:
parent
f5ba05cbee
commit
b07f8f3fe4
@ -20,3 +20,18 @@ if (!String.prototype.includes) {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/***
|
||||
**
|
||||
** Polyfill for older browsers that don't yet have the newer string "startsWith()" method implemented.
|
||||
** Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith#Polyfill
|
||||
** Documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith
|
||||
**
|
||||
***/
|
||||
|
||||
if (!String.prototype.startsWith) {
|
||||
String.prototype.startsWith = function(searchString, position){
|
||||
position = position || 0;
|
||||
return this.substr(position, searchString.length) === searchString;
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user