Fix issue #8 - Support for amp share

This commit is contained in:
Thomas 2020-04-04 12:10:59 +02:00
parent 49302e0387
commit ea4442e014
1 changed files with 7 additions and 2 deletions

View File

@ -282,8 +282,8 @@ public class TransformActivity extends Activity {
forwardToBrowser(intent);
}
}
//AMP URLs (containing /amp/s like Google AMP links)
else if (url.contains("/amp/s")) {
//AMP URLs (containing /amp/s/ like Google AMP links)
else if (url.contains("/amp/s/")) {
Intent delegate = new Intent(Intent.ACTION_VIEW);
Matcher matcher = ampExtract.matcher(url);
String transformedURL = null;
@ -634,6 +634,11 @@ public class TransformActivity extends Activity {
}
}
}
} else if (url.contains("/amp/s/")) {
Matcher matcher = ampExtract.matcher(url);
while (matcher.find()) {
newUrl = "https://" + matcher.group(1);
}
} else if (Arrays.asList(youtube_domains).contains(host)) { //Youtube URL
boolean invidious_enabled = sharedpreferences.getBoolean(SET_INVIDIOUS_ENABLED, true);
if (invidious_enabled) {