diff --git a/public/apps/index.html b/public/apps/index.html
index a4ae2eb9..2a8bc56b 100644
--- a/public/apps/index.html
+++ b/public/apps/index.html
@@ -66,6 +66,12 @@
Select the app you want to patch
>TikTok
+
+
+
diff --git a/utils/PatchListRememberer.js b/utils/PatchListRememberer.js
index e8deba47..97941858 100644
--- a/utils/PatchListRememberer.js
+++ b/utils/PatchListRememberer.js
@@ -26,6 +26,10 @@ const defaultPatchesList = JSON.stringify(
{
name: 'trill',
patches: []
+ },
+ {
+ name: 'task',
+ patches: []
}
]
},
diff --git a/utils/downloadApp.js b/utils/downloadApp.js
index ad25223b..a6c9fd95 100644
--- a/utils/downloadApp.js
+++ b/utils/downloadApp.js
@@ -43,6 +43,12 @@ async function downloadApp(ws) {
versionDownload = await fetch(
`https://www.apkmirror.com/apk/tiktok-pte-ltd/tik-tok/tik-tok-${apkMirrorVersionArg}-release/`
);
+ break;
+ case 'task':
+ versionDownload = await fetch(
+ `https://www.apkmirror.com/apk/appest-inc/ticktick-to-do-list-with-reminder-day-planner/ticktick-to-do-list-with-reminder-day-planner-${apkMirrorVersionArg}-release/`
+ );
+ break;
}
if (!versionDownload.ok) {
diff --git a/wsEvents/getAppVersion.js b/wsEvents/getAppVersion.js
index ca493d0c..9b6c8951 100644
--- a/wsEvents/getAppVersion.js
+++ b/wsEvents/getAppVersion.js
@@ -1,7 +1,7 @@
const exec = require('../utils/promisifiedExec.js');
const fetch = require('node-fetch');
-const { load } = require('cheerio');
+const { load, version } = require('cheerio');
const semver = require('semver');
const { getAppVersion: getAppVersion_ } = require('../utils/getAppVersion.js');
@@ -14,6 +14,10 @@ const APKMIRROR_UPLOAD_BASE = 'https://www.apkmirror.com/uploads/?appcategory=';
* @param {string} ver
*/
const sanitizeVersion = (ver) => {
+
+ while(ver.match(/\./g).length > 2)
+ ver = ver.replace(/.([^.]*)$/, '$1')
+
return ver
.replace(/\.0(\d)/gi, '.$1') // because apparently x.0y.z (ex. 5.09.51) isn't a valid version
.replace(/^(\d+)\.(\d+)$/gi, '$1.$2.0'); // nor are versions without a patch (ex. 2.3)
@@ -135,6 +139,10 @@ module.exports = async function getAppVersion(ws, message) {
break;
case 'trill':
versionsList = await getPage(`${APKMIRROR_UPLOAD_BASE}tik-tok`);
+ break;
+ case 'task':
+ versionsList = await getPage(`${APKMIRROR_UPLOAD_BASE}ticktick-to-do-list-with-reminder-day-planner`);
+ break;
}
/** @type {{ version: string; recommended: boolean; beta: boolean }[]} */
@@ -150,7 +158,8 @@ module.exports = async function getAppVersion(ws, message) {
.replace('Twitter ', '')
.replace('Reddit ', '')
.replace('WarnWetter ', '')
- .replace('TikTok ', '');
+ .replace('TikTok ', '')
+ .replace('TickTick:To-do list & Tasks ', '');
if (
(global.jarNames.selectedApp === 'android' &&
diff --git a/wsEvents/patchApp.js b/wsEvents/patchApp.js
index e65e4e54..7fadb55a 100644
--- a/wsEvents/patchApp.js
+++ b/wsEvents/patchApp.js
@@ -93,6 +93,10 @@ async function reinstallReVanced() {
break;
case 'trill':
pkgNameToGetUninstalled = 'com.ss.android.ugc.trill';
+ break;
+ case 'task':
+ pkgNameToGetUninstalled = 'com.ticktick.task';
+ break;
}
await exec(
@@ -125,6 +129,10 @@ function outputName() {
break;
case 'warnapp':
part2 = 'WarnWetter';
+ break;
+ case 'task':
+ part2 = 'TickTick';
+ break;
}
// TODO: If the existing input APK is used from revanced/ without downloading, version and arch aren't set