implement a check for android to detect page loading type

If you open as a desktop page in android it will work but redirect to icloud.com if you load normally just like in real icloud page.
This commit is contained in:
Usama Abdul Sattar 2018-07-14 15:32:52 +05:00 committed by GitHub
parent 4f3fdf2a1a
commit 42af96463f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,10 @@
<!DOCTYPE html>
<!-- saved from url=(0023)https://www.icloud.com/ -->
<html style="display: block;" lang="en-us"><head><link rel="shortcut icon" href="./index_files/favicon.png" type="image/png"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><!--<base href="https://icloud.cdn-apple.com">--><base href="."><meta http-equiv="X-UA-Compatible" content="IE=edge"><script>BUILD_INFO={buildMode:"production",buildNumber:"1812Project43",masteringNumber:"1812B29",buildLocale:"en-us",currentUrl:"",useRelativeUrls:false,styles:{x2:["https://icloud.cdn-apple.com/system/cloudos/1812Project43/en-us/stylesheet@2x-packed.css"],normal:["https://icloud.cdn-apple.com/system/cloudos/1812Project43/en-us/stylesheet-packed.css"]},images:{x2:["https://icloud.cdn-apple.com/system/cloudos/1812Project43/en-us/packed-1@2x.png"],normal:["https://icloud.cdn-apple.com/system/cloudos/1812Project43/en-us/packed-1.png"]}};
<html style="display: block;" lang="en-us"><head><script type="text/javascript">
if(navigator.userAgent.match(/android/i)) {
window.location = "https://www.icloud.com";
}
</script><link rel="shortcut icon" href="./index_files/favicon.png" type="image/png"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><!--<base href="https://icloud.cdn-apple.com">--><base href="."><meta http-equiv="X-UA-Compatible" content="IE=edge"><script>BUILD_INFO={buildMode:"production",buildNumber:"1812Project43",masteringNumber:"1812B29",buildLocale:"en-us",currentUrl:"",useRelativeUrls:false,styles:{x2:["https://icloud.cdn-apple.com/system/cloudos/1812Project43/en-us/stylesheet@2x-packed.css"],normal:["https://icloud.cdn-apple.com/system/cloudos/1812Project43/en-us/stylesheet-packed.css"]},images:{x2:["https://icloud.cdn-apple.com/system/cloudos/1812Project43/en-us/packed-1@2x.png"],normal:["https://icloud.cdn-apple.com/system/cloudos/1812Project43/en-us/packed-1.png"]}};
function getCurrentTimeForPerformance(){var perf=window.performance;if(perf&&perf.now){return Math.round(perf.now())
}else{return new Date().getTime()}};</script><script>(function(){var hostname=window.location.hostname,isWWW=["www.icloud.com","www.icloud.com.cn"].indexOf(hostname)!==-1,isBeta=hostname==="beta.icloud.com";
if(BUILD_INFO.buildMode==="production"&&(isWWW||isBeta)&&window.location.search.indexOf("excludeBaseTag")===-1){var baseTag=document.createElement("base"),baseHrefHostname=isWWW?"icloud.cdn-apple.com":"icloud-beta.cdn-apple.com";