diff --git a/.gitignore b/.gitignore
index d633be4..5c896ea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,13 +1,2 @@
*.pyc
-app/gradle/wrapper/*
-app/gradlew
-app/gradlew.bat
-app/gradle.properties
-app/build/*
-app/app/build/*
-app/app/release/*
-app/.idea/*
-app/.gradle/*
-app/gradle/*
-chrome/*.png
sources.json
diff --git a/app/app/build.gradle b/app/app/build.gradle
deleted file mode 100644
index 3e1564b..0000000
--- a/app/app/build.gradle
+++ /dev/null
@@ -1,31 +0,0 @@
-plugins {
- id 'com.android.application'
-}
-
-android {
- compileSdkVersion 29
- buildToolsVersion "30.0.3"
-
- defaultConfig {
- applicationId "it.purser.stream"
- minSdkVersion 25
- targetSdkVersion 29
- versionCode 109
- versionName "109.0"
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
-}
-
-dependencies {
- testImplementation 'junit:junit:4.+'
-}
diff --git a/app/app/proguard-rules.pro b/app/app/proguard-rules.pro
deleted file mode 100644
index 481bb43..0000000
--- a/app/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/app/app/src/main/AndroidManifest.xml b/app/app/src/main/AndroidManifest.xml
deleted file mode 100644
index d43e9db..0000000
--- a/app/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/app/src/main/ic_launcher-playstore.png b/app/app/src/main/ic_launcher-playstore.png
deleted file mode 100644
index a61a702..0000000
Binary files a/app/app/src/main/ic_launcher-playstore.png and /dev/null differ
diff --git a/app/app/src/main/java/it/purser/stream/ShareActivity.java b/app/app/src/main/java/it/purser/stream/ShareActivity.java
deleted file mode 100644
index 966e0c4..0000000
--- a/app/app/src/main/java/it/purser/stream/ShareActivity.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package it.purser.stream;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Bundle;
-import java.util.TreeMap;
-import java.util.Locale;
-
-public class ShareActivity extends Activity {
- private class Upstream {
- private Uri uri = null;
- private String provider = null;
- private Upstream(Uri uri, String provider) {
- this.uri = uri;
- this.provider = provider;
- }
- }
- private Upstream getSharedLink() {
- TreeMap domains = new TreeMap<>();
- domains.put("youtu.be", "youtube");
- domains.put("youtube.com", "youtube");
- domains.put("www.youtube.com", "youtube");
- domains.put("tv.nrk.no", "nrk");
- domains.put("nx12210.your-storageshare.de", "nextcloud");
-
- Intent intent = getIntent();
- Bundle bundle = intent.getExtras();
- for(String key: bundle.keySet()) {
- try {
- String txt = (String) bundle.get(key);
- Uri uri = Uri.parse(txt);
- String host = uri.getHost().toLowerCase(Locale.ROOT);
- if(domains.containsKey(host)) {
- if(host.contains("youtube.com")) {
- Uri.Builder builder = new Uri.Builder();
- builder.authority(host);
- builder.scheme("https");
- String path = uri.getQueryParameter("v");
- if(path != null) {
- builder.path(path);
- return new Upstream(builder.build(), domains.get(host));
- }
- }
- return new Upstream(uri, domains.get(host));
- }
- } catch(Exception e) {}
- }
- return null;
- }
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- Upstream upstream = getSharedLink();
- if(upstream != null) {
- Uri.Builder builder = new Uri.Builder();
- builder.authority("stream.purser.it");
- builder.scheme("https");
- builder.path(upstream.uri.getPath());
- builder.appendQueryParameter("provider", upstream.provider);
- Intent launch = new Intent(Intent.ACTION_VIEW, builder.build());
- launch.setPackage("com.android.chrome");
- launch.putExtra("android.support.customtabs.extra.SESSION", "Proxy Stream");
- launch.putExtra("android.support.customtabs.extra.TOOLBAR_COLOR", 0xff0000);
- startActivity(launch);
- }
- finish();
- }
-}
diff --git a/app/app/src/main/res/drawable/ic_launcher.xml b/app/app/src/main/res/drawable/ic_launcher.xml
deleted file mode 100644
index cb8b054..0000000
--- a/app/app/src/main/res/drawable/ic_launcher.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
diff --git a/app/app/src/main/res/values-night/themes.xml b/app/app/src/main/res/values-night/themes.xml
deleted file mode 100644
index 3d57a7d..0000000
--- a/app/app/src/main/res/values-night/themes.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/app/src/main/res/values/colors.xml b/app/app/src/main/res/values/colors.xml
deleted file mode 100644
index f8c6127..0000000
--- a/app/app/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- #FFBB86FC
- #FF6200EE
- #FF3700B3
- #FF03DAC5
- #FF018786
- #FF000000
- #FFFFFFFF
-
\ No newline at end of file
diff --git a/app/app/src/main/res/values/strings.xml b/app/app/src/main/res/values/strings.xml
deleted file mode 100644
index 7e39d08..0000000
--- a/app/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Proxy Stream
-
\ No newline at end of file
diff --git a/app/app/src/main/res/values/themes.xml b/app/app/src/main/res/values/themes.xml
deleted file mode 100644
index 20f226a..0000000
--- a/app/app/src/main/res/values/themes.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/app/src/test/java/it/purser/stream/ExampleUnitTest.java b/app/app/src/test/java/it/purser/stream/ExampleUnitTest.java
deleted file mode 100644
index 3643316..0000000
--- a/app/app/src/test/java/it/purser/stream/ExampleUnitTest.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package it.purser.stream;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * @see Testing documentation
- */
-public class ExampleUnitTest {
- @Test
- public void addition_isCorrect() {
- assertEquals(4, 2 + 2);
- }
-}
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
deleted file mode 100644
index 4d24be2..0000000
--- a/app/build.gradle
+++ /dev/null
@@ -1,24 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-buildscript {
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath "com.android.tools.build:gradle:4.1.1"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- google()
- jcenter()
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
\ No newline at end of file
diff --git a/app/local.properties b/app/local.properties
deleted file mode 100644
index 41ba62c..0000000
--- a/app/local.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-## This file is automatically generated by Android Studio.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file should *NOT* be checked into Version Control Systems,
-# as it contains information specific to your local configuration.
-#
-# Location of the SDK. This is only used by Gradle.
-# For customization when using a Version Control System, please read the
-# header note.
-sdk.dir=/home/roypur/Android/Sdk
\ No newline at end of file
diff --git a/app/settings.gradle b/app/settings.gradle
deleted file mode 100644
index bb693c6..0000000
--- a/app/settings.gradle
+++ /dev/null
@@ -1,2 +0,0 @@
-include ':app'
-rootProject.name = "Proxy Stream"
\ No newline at end of file
diff --git a/chrome-icons.sh b/chrome-icons.sh
deleted file mode 100755
index f1e5084..0000000
--- a/chrome-icons.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-dir=$(dirname $(realpath $0))
-
-inkscape --export-area-page --export-width=16 --export-height=16 "${dir}/frontend/favicon.svg" --export-filename="${dir}/chrome/icon-16.png"
-inkscape --export-area-page --export-width=19 --export-height=19 "${dir}/frontend/favicon.svg" --export-filename="${dir}/chrome/icon-19.png"
-inkscape --export-area-page --export-width=38 --export-height=38 "${dir}/frontend/favicon.svg" --export-filename="${dir}/chrome/icon-38.png"
-inkscape --export-area-page --export-width=48 --export-height=48 "${dir}/frontend/favicon.svg" --export-filename="${dir}/chrome/icon-48.png"
-inkscape --export-area-page --export-width=128 --export-height=128 "${dir}/frontend/favicon.svg" --export-filename="${dir}/chrome/icon-128.png"
-
diff --git a/chrome/manifest.json b/chrome/manifest.json
deleted file mode 100644
index 1c8ea0c..0000000
--- a/chrome/manifest.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "name": "Proxy Stream",
- "icons": {
- "16": "icon-16.png",
- "19": "icon-19.png",
- "38": "icon-38.png",
- "48": "icon-48.png",
- "128": "icon-128.png"
- },
- "version": "116.0",
- "manifest_version": 3,
- "permissions": ["tabs"],
- "action": {
- "default_title": "Proxy Stream",
- "default_popup": "popup.html"
- }
-}
diff --git a/chrome/popup.html b/chrome/popup.html
deleted file mode 100644
index 6210f3e..0000000
--- a/chrome/popup.html
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
- Proxy Stream
-
-
-
-
-
diff --git a/chrome/script.js b/chrome/script.js
deleted file mode 100644
index 369355a..0000000
--- a/chrome/script.js
+++ /dev/null
@@ -1,33 +0,0 @@
-let providers = new Map();
-providers.set("www.youtube.com", "youtube");
-providers.set("youtube.com", "youtube");
-providers.set("youtu.be", "youtube");
-providers.set("tv.nrk.no", "nrk");
-providers.set("nx12210.your-storageshare.de", "nextcloud");
-
-document.addEventListener("DOMContentLoaded", () => {
- let [button] = document.getElementsByTagName("button");
- button.addEventListener("click", (ev) => {
- chrome.tabs.query({currentWindow: true, active: true}, (tabs) => {
- let oldurl = new URL(tabs[0].url);
- let newurl = new URL("https://stream.purser.it");
- let search = new URLSearchParams();
- let hostname = oldurl.hostname.toLowerCase();
- if(providers.has(hostname)) {
- if(hostname.includes("youtube.com")) {
- let newpath = oldurl.searchParams.get("v");
- if((newpath instanceof String) || ((typeof newpath) === "string")) {
- newurl.pathname = "/" + newpath;
- }
- } else {
- newurl.pathname = oldurl.pathname;
- }
- search.append("provider", providers.get(hostname));
- }
- newurl.search = search.toString();
- let tab = {};
- tab.url = newurl.href;
- chrome.tabs.create(tab);
- });
- });
-});