Skip to content

Commit

Permalink
Merge pull request #3 from monaca/dev_MN-3775
Browse files Browse the repository at this point in the history
fix: Changed windows device conditions
  • Loading branch information
as-hirose authored Jan 16, 2023
2 parents 801b23c + ff16e0d commit d1cfbbc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "monaca-cordova-loader",
"version": "1.0.4",
"version": "1.0.5",
"description": "Load cordova.js for Monaca apps.",
"main": "cordova-loader.js",
"monaca" : {
Expand Down
6 changes: 5 additions & 1 deletion cordova-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@
}
document.write("<script src=\"" + cordovaJsUrl+ "cordova.js" + "\"></script>");
}
} else if ( (navigator.userAgent.match(/MSIE\s10.0/) && navigator.userAgent.match(/Windows\sNT\s6.2/)) || navigator.userAgent.match(/MSAppHost/)) {
} else if (
(navigator.userAgent.match(/MSIE\s10.0/) && navigator.userAgent.match(/Windows\sNT\s6.2/))
|| navigator.userAgent.match(/MSAppHost/)
|| (navigator.userAgent.match(/Windows/) && location.protocol.match(/^https?:/) === null)
) {
var elm = document.createElement('script');
elm.setAttribute("src", "cordova.js");
document.getElementsByTagName("head")[0].appendChild(elm);
Expand Down

0 comments on commit d1cfbbc

Please sign in to comment.