Add support for WebView 70+
This commit is contained in:
parent
4de74a3b6c
commit
e0bb234102
12 changed files with 30944 additions and 27280 deletions
|
@ -2,26 +2,6 @@
|
|||
|
||||
window._MEMO_PATHS = {}
|
||||
|
||||
/**
|
||||
* String.prototype.replaceAll() polyfill
|
||||
* https://gomakethings.com/how-to-replace-a-section-of-a-string-with-another-one-with-vanilla-js/
|
||||
* @author Chris Ferdinandi
|
||||
* @license MIT
|
||||
*/
|
||||
if (!String.prototype.replaceAll) {
|
||||
String.prototype.replaceAll = function(str, newStr){
|
||||
|
||||
// If a regex pattern
|
||||
if (Object.prototype.toString.call(str).toLowerCase() === '[object regexp]') {
|
||||
return this.replace(str, newStr);
|
||||
}
|
||||
|
||||
// If a string
|
||||
return this.replace(new RegExp(str, 'g'), newStr);
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
function replaceSpecialSymbols(s) {
|
||||
const memoized = _MEMO_PATHS[s];
|
||||
if (memoized != undefined) {
|
||||
|
@ -439,7 +419,7 @@ require.libs.fs = {
|
|||
}
|
||||
throw e;
|
||||
}
|
||||
return xhr.status === 200 || xhr.status === 0;
|
||||
return xhr.status === 200 || xhr.responseText !== "";
|
||||
},
|
||||
|
||||
unlinkSync: function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue