Improve detection
This commit is contained in:
parent
2225d2f539
commit
a6146c4de7
|
@ -34,8 +34,10 @@
|
|||
<!-- t.co -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="t.co"
|
||||
android:pathPattern=".*"
|
||||
|
@ -55,8 +57,10 @@
|
|||
<!-- nyti.ms -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="nyti.ms"
|
||||
android:pathPattern=".*"
|
||||
|
@ -76,8 +80,10 @@
|
|||
<!-- bit.ly -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="bit.ly"
|
||||
android:pathPattern=".*"
|
||||
|
@ -332,8 +338,10 @@
|
|||
<!-- twitter.com -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="twitter.com"
|
||||
android:pathPattern=".*"
|
||||
|
@ -489,8 +497,10 @@
|
|||
<!-- nitter.net -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="nitter.net"
|
||||
android:pathPattern=".*"
|
||||
|
@ -503,8 +513,10 @@
|
|||
<!-- nitter.snopyta.org -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="nitter.snopyta.org"
|
||||
android:pathPattern=".*"
|
||||
|
@ -517,8 +529,10 @@
|
|||
<!-- nitter.42l.fr -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="nitter.42l.fr"
|
||||
android:pathPattern=".*"
|
||||
|
@ -531,8 +545,10 @@
|
|||
<!-- nitter.nixnet.services -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="nitter.nixnet.services"
|
||||
android:pathPattern=".*"
|
||||
|
@ -545,8 +561,10 @@
|
|||
<!-- nitter.13ad.de -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="nitter.13ad.de"
|
||||
android:pathPattern=".*"
|
||||
|
@ -559,8 +577,10 @@
|
|||
<!-- tw.openalgeria.org -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="tw.openalgeria.org"
|
||||
android:pathPattern=".*"
|
||||
|
@ -573,8 +593,10 @@
|
|||
<!-- nitter.pussthecat.org -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="nitter.pussthecat.org"
|
||||
android:pathPattern=".*"
|
||||
|
@ -589,8 +611,10 @@
|
|||
<!-- invidio.us -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="invidio.us"
|
||||
android:pathPattern=".*"
|
||||
|
@ -603,8 +627,10 @@
|
|||
<!-- invidious.snopyta.org -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="invidious.snopyta.org"
|
||||
android:pathPattern=".*"
|
||||
|
@ -617,8 +643,10 @@
|
|||
<!-- invidiou.sh -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="invidiou.sh"
|
||||
android:pathPattern=".*"
|
||||
|
@ -631,8 +659,10 @@
|
|||
<!-- invidious.toot.koeln -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="invidious.toot.koeln"
|
||||
android:pathPattern=".*"
|
||||
|
@ -645,8 +675,10 @@
|
|||
<!-- invidious.ggc-project.de -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="invidious.ggc-project.de"
|
||||
android:pathPattern=".*"
|
||||
|
@ -661,8 +693,10 @@
|
|||
<!-- bibliogram.art -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="bibliogram.art"
|
||||
android:pathPattern=".*"
|
||||
|
@ -675,8 +709,10 @@
|
|||
<!-- bibliogram.snopyta.org -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="bibliogram.snopyta.org"
|
||||
android:pathPattern=".*"
|
||||
|
@ -689,8 +725,10 @@
|
|||
<!-- bibliogram.dsrev.ru -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="bibliogram.dsrev.ru"
|
||||
android:pathPattern=".*"
|
||||
|
@ -703,8 +741,10 @@
|
|||
<!-- bibliogram.pussthecat.org -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="bibliogram.pussthecat.org"
|
||||
android:pathPattern=".*"
|
||||
|
|
|
@ -454,7 +454,7 @@ public class MainActivity extends AppCompatActivity {
|
|||
for (String domain : domains) {
|
||||
AppInfo appInfo = new AppInfo();
|
||||
appInfo.setDomain(domain);
|
||||
appInfo.setApplicationInfo(getDefaultApp("https://" + domain));
|
||||
appInfo.setApplicationInfo(getDefaultApp("https://" + domain + "/"));
|
||||
appInfos.add(appInfo);
|
||||
}
|
||||
|
||||
|
@ -586,7 +586,7 @@ public class MainActivity extends AppCompatActivity {
|
|||
for (String domain : domains) {
|
||||
AppInfo appInfo = new AppInfo();
|
||||
appInfo.setDomain(domain);
|
||||
appInfo.setApplicationInfo(getDefaultApp("https://" + domain));
|
||||
appInfo.setApplicationInfo(getDefaultApp("https://" + domain + "/"));
|
||||
appInfos.add(appInfo);
|
||||
}
|
||||
appInfoAdapter = new AppInfoAdapter(appInfos);
|
||||
|
|
|
@ -305,7 +305,7 @@ public class TransformActivity extends Activity {
|
|||
if (invidious_enabled) {
|
||||
String invidiousHost = sharedpreferences.getString(MainActivity.SET_INVIDIOUS_HOST, MainActivity.DEFAULT_INVIDIOUS_HOST).toLowerCase();
|
||||
String transformedURL = url;
|
||||
if( host != null && host.compareTo(invidiousHost) != 0 ){
|
||||
if (host != null && host.compareTo(invidiousHost) != 0) {
|
||||
transformedURL = url.replace(host, invidiousHost);
|
||||
}
|
||||
intent.setData(Uri.parse(transformedURL));
|
||||
|
@ -320,7 +320,7 @@ public class TransformActivity extends Activity {
|
|||
if (nitter_enabled) {
|
||||
String nitterHost = sharedpreferences.getString(MainActivity.SET_NITTER_HOST, MainActivity.DEFAULT_NITTER_HOST).toLowerCase();
|
||||
String transformedURL = url;
|
||||
if( host != null && host.compareTo(nitterHost) != 0 ){
|
||||
if (host != null && host.compareTo(nitterHost) != 0) {
|
||||
transformedURL = url.replace(host, nitterHost);
|
||||
}
|
||||
intent.setData(Uri.parse(transformedURL));
|
||||
|
@ -335,7 +335,7 @@ public class TransformActivity extends Activity {
|
|||
if (bibliogram_enabled) {
|
||||
String bibliogramHost = sharedpreferences.getString(MainActivity.SET_BIBLIOGRAM_HOST, MainActivity.DEFAULT_BIBLIOGRAM_HOST).toLowerCase();
|
||||
String transformedURL = url;
|
||||
if( host != null && host.compareTo(bibliogramHost) != 0 ){
|
||||
if (host != null && host.compareTo(bibliogramHost) != 0) {
|
||||
transformedURL = url.replace(host, bibliogramHost);
|
||||
}
|
||||
intent.setData(Uri.parse(transformedURL));
|
||||
|
@ -369,7 +369,7 @@ public class TransformActivity extends Activity {
|
|||
Intent intent = new Intent();
|
||||
intent.setAction(Intent.ACTION_VIEW);
|
||||
String type = i.getType();
|
||||
if( type == null) {
|
||||
if (type == null) {
|
||||
type = "text/html";
|
||||
}
|
||||
intent.setDataAndType(i.getData(), type);
|
||||
|
|
|
@ -78,9 +78,9 @@
|
|||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
@ -89,9 +89,9 @@
|
|||
style="@style/Widget.AppCompat.Button.Colored"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_info_outline"
|
||||
android:contentDescription="@string/instance_info"
|
||||
/>
|
||||
android:src="@drawable/ic_info_outline" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/latency_test"
|
||||
style="@style/Widget.AppCompat.Button.Colored"
|
||||
|
|
|
@ -675,9 +675,9 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:minHeight="1800dp"
|
||||
android:overScrollMode="never"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/buttons_container" />
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/info_instances"
|
||||
android:autoLink="web"
|
||||
android:textSize="16sp"
|
||||
android:padding="10dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:autoLink="web"
|
||||
android:padding="10dp"
|
||||
android:textSize="16sp" />
|
Loading…
Reference in New Issue