Fix issue #8 - Support for amp share
This commit is contained in:
parent
49302e0387
commit
ea4442e014
|
@ -282,8 +282,8 @@ public class TransformActivity extends Activity {
|
||||||
forwardToBrowser(intent);
|
forwardToBrowser(intent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//AMP URLs (containing /amp/s like Google AMP links)
|
//AMP URLs (containing /amp/s/ like Google AMP links)
|
||||||
else if (url.contains("/amp/s")) {
|
else if (url.contains("/amp/s/")) {
|
||||||
Intent delegate = new Intent(Intent.ACTION_VIEW);
|
Intent delegate = new Intent(Intent.ACTION_VIEW);
|
||||||
Matcher matcher = ampExtract.matcher(url);
|
Matcher matcher = ampExtract.matcher(url);
|
||||||
String transformedURL = null;
|
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
|
} else if (Arrays.asList(youtube_domains).contains(host)) { //Youtube URL
|
||||||
boolean invidious_enabled = sharedpreferences.getBoolean(SET_INVIDIOUS_ENABLED, true);
|
boolean invidious_enabled = sharedpreferences.getBoolean(SET_INVIDIOUS_ENABLED, true);
|
||||||
if (invidious_enabled) {
|
if (invidious_enabled) {
|
||||||
|
|
Loading…
Reference in New Issue