Browse Source

change download targets

master
wchen342 2 years ago
parent
commit
3d3af0e261
Signed by: wchen342 GPG Key ID: 720B70365E800508
  1. 2
      _config.yml
  2. 4
      _includes/download.html
  3. 24
      _includes/download_script.html

2
_config.yml

@ -20,4 +20,4 @@ feed:
path: "/feed.xml"
logo: /android-icon-192x192.png
image: /android-icon-192x192.png
latest_release: 84.0.4147.125
latest_release: 85.0.4183.83

4
_includes/download.html

@ -7,8 +7,8 @@ Current {{ include.app_name }} stable version: <strong>{{ site.latest_release }}
|Architecture |Android version |
|:--- |:--- |
|<label for="{{ app_target }}_arch_arm"><input onclick="radioClick('{{ app_target }}', this)" value="arm" type="radio" name="{{ app_target }}_arch" id="{{ app_target }}_arch_arm" checked />ARM</label> |<label for="{{ app_target }}_sdk_21"><input onclick="radioClick('{{ app_target }}', this)" type="radio" name="{{ app_target }}_sdk" id="{{ app_target }}_sdk_21" value="21" {% if app_target == 'systemwebview' %}disabled="disabled"{% endif %} {% if app_target == 'extension' %}checked{% endif %} />Lollipop 5.0 and above (SDK21)</label> |
|<label for="{{ app_target }}_arch_arm64"><input onclick="radioClick('{{ app_target }}', this)" value="arm64" type="radio" name="{{ app_target }}_arch" id="{{ app_target }}_arch_arm64" {% if app_target == 'extension' %}disabled="disabled"{% endif %} />ARM64</label> |<label for="{{ app_target }}_sdk_24"><input onclick="radioClick('{{ app_target }}', this)" type="radio" name="{{ app_target }}_sdk" id="{{ app_target }}_sdk_24" value="24" {% if app_target == 'systemwebview' or app_target == 'extension' %}disabled="disabled"{% endif %} {% if app_target != 'extension' %}checked{% endif %} />Nougat and above (SDK24)</label> |
|<label for="{{ app_target }}_arch_arm"><input onclick="radioClick('{{ app_target }}', this)" value="arm" type="radio" name="{{ app_target }}_arch" id="{{ app_target }}_arch_arm" checked />ARM</label> |<label for="{{ app_target }}_sdk_21"><input onclick="radioClick('{{ app_target }}', this)" type="radio" name="{{ app_target }}_sdk" id="{{ app_target }}_sdk_21" value="21" {% if app_target == 'systemwebview' %}disabled="disabled"{% endif %} checked />Lollipop 5.0 and above (SDK21)</label> |
|<label for="{{ app_target }}_arch_arm64"><input onclick="radioClick('{{ app_target }}', this)" value="arm64" type="radio" name="{{ app_target }}_arch" id="{{ app_target }}_arch_arm64" {% if app_target == 'extension' %}disabled="disabled"{% endif %} />ARM64</label> |<label for="{{ app_target }}_sdk_29"><input onclick="radioClick('{{ app_target }}', this)" type="radio" name="{{ app_target }}_sdk" id="{{ app_target }}_sdk_29" value="29" {% if app_target == 'systemwebview' or app_target == 'extension' %}disabled="disabled"{% endif %} />Android Q and above (SDK29)</label> |
|<label for="{{ app_target }}_arch_x86"><input onclick="radioClick('{{ app_target }}', this)" value="x86" type="radio" name="{{ app_target }}_arch" id="{{ app_target }}_arch_x86" {% if app_target == 'extension' %}disabled="disabled"{% endif %} />X86</label> | |
<br/>

24
_includes/download_script.html

@ -53,9 +53,9 @@ function selectDefaultSDK() {
var sdk = androidVersionToSDK(getAndroidVersion());
if (!sdk)
return false;
if (sdk < 24)
if (sdk < 29)
return 'sdk_21';
return 'sdk_24';
return 'sdk_29';
}
function androidVersionToSDK(av) {
@ -89,8 +89,13 @@ function androidVersionToSDK(av) {
case 8:
return 26+minor;
case 9:
default:
return 28;
case 10:
return 29;
case 11:
return 30;
default:
return 21;
}
// will never get here
@ -115,7 +120,7 @@ function radioClick(appTarget, obj) {
}
function doDownload(appName, appTarget, apkPrefix) {
var arch = '', target = '';
var arch = '', target = '', target_2 = '';
var objs = document.getElementsByName(appTarget + '_arch');
for (var i = 0; i < objs.length; i++) {
@ -132,10 +137,11 @@ function doDownload(appName, appTarget, apkPrefix) {
if (objs[i].checked) {
switch (objs[i].value) {
case '21':
target = 'ChromePublic';
target = 'ChromeModernPublic';
break;
case '24':
target = 'MonochromePublic';
case '29':
target = 'TrichromeChrome';
target_2 = 'TrichromeLibrary';
break;
default:
console.error("unknown SDK:", objs[i].value);
@ -150,7 +156,11 @@ function doDownload(appName, appTarget, apkPrefix) {
return;
}
window.location.href = 'https://uc.droidware.info/release/' + appName + '/' + target + '/' + apkPrefix + target + '_' + arch + '.apk';
if (target_2 != '') {
window.open('https://uc.droidware.info/release/' + appName + '/' + target + '/' + apkPrefix + target_2 + '_' + arch + '.apk');
}
}
</script>

Loading…
Cancel
Save