diff --git a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$1.class b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$1.class index 7dc159a..ee43970 100644 Binary files a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$1.class and b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$1.class differ diff --git a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$2.class b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$2.class index a7c901e..8ffb159 100644 Binary files a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$2.class and b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$2.class differ diff --git a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$1.class b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$1.class index a7d1e48..d0a6191 100644 Binary files a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$1.class and b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$1.class differ diff --git a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$2.class b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$2.class index e7e5923..5558112 100644 Binary files a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$2.class and b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$2.class differ diff --git a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$3.class b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$3.class index 9894ab8..eca2661 100644 Binary files a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$3.class and b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$3.class differ diff --git a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$4.class b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$4.class index c999be1..80adb24 100644 Binary files a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$4.class and b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$4.class differ diff --git a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$5.class b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$5.class index a320ac1..b6f0342 100644 Binary files a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$5.class and b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$5.class differ diff --git a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$6.class b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$6.class new file mode 100644 index 0000000..f5459c2 Binary files /dev/null and b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$6.class differ diff --git a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$7.class b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$7.class new file mode 100644 index 0000000..eda5f6d Binary files /dev/null and b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3$7.class differ diff --git a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3.class b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3.class index 40b41a4..f6cc073 100644 Binary files a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3.class and b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$3.class differ diff --git a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$4.class b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$4.class index e66287d..e8186ee 100644 Binary files a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$4.class and b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$4.class differ diff --git a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$5.class b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$5.class index b1dfcc0..dfcde97 100644 Binary files a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$5.class and b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$5.class differ diff --git a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$MyDownloadListener.class b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$MyDownloadListener.class index 8b36c81..3c276ae 100644 Binary files a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$MyDownloadListener.class and b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity$MyDownloadListener.class differ diff --git a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity.class b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity.class index 1886190..b879679 100644 Binary files a/Panther/app/build/classes/com/stringmanolo/panther/MainActivity.class and b/Panther/app/build/classes/com/stringmanolo/panther/MainActivity.class differ diff --git a/Panther/app/build/dexedClasses/classes.dex b/Panther/app/build/dexedClasses/classes.dex index 3e22f69..a8f4203 100644 Binary files a/Panther/app/build/dexedClasses/classes.dex and b/Panther/app/build/dexedClasses/classes.dex differ diff --git a/Panther/app/build/output/app-debug.apk b/Panther/app/build/output/app-debug.apk index 71f8b9f..13f8cb2 100644 Binary files a/Panther/app/build/output/app-debug.apk and b/Panther/app/build/output/app-debug.apk differ diff --git a/Panther/app/build/output/app-unsigned-debug.apk b/Panther/app/build/output/app-unsigned-debug.apk index 585e2c8..8ac5c05 100644 Binary files a/Panther/app/build/output/app-unsigned-debug.apk and b/Panther/app/build/output/app-unsigned-debug.apk differ diff --git a/Panther/app/build/resources.ap_ b/Panther/app/build/resources.ap_ index a770804..79c17f2 100644 Binary files a/Panther/app/build/resources.ap_ and b/Panther/app/build/resources.ap_ differ diff --git a/Panther/app/src/main/java/com/stringmanolo/panther/MainActivity.java b/Panther/app/src/main/java/com/stringmanolo/panther/MainActivity.java index 2cfaf10..9277c28 100644 --- a/Panther/app/src/main/java/com/stringmanolo/panther/MainActivity.java +++ b/Panther/app/src/main/java/com/stringmanolo/panther/MainActivity.java @@ -39,6 +39,7 @@ import android.os.Environment; import android.webkit.DownloadListener; import android.webkit.URLUtil; +import android.webkit.PermissionRequest; public class MainActivity extends Activity { Intent intentArchivos = null; @@ -68,6 +69,7 @@ public class MainActivity extends Activity { /* String SSE = "https://google.com/search?q="; */ String SSE = "https://html.duckduckgo.com/html/?q="; int progress = 0; + boolean jsEnabled = true; @Override public void onCreate(Bundle savedInstanceState) { @@ -123,6 +125,17 @@ public void onItemClick(AdapterView < ? > adapterView, View view, int position, executeButton.setVisibility(View.VISIBLE); } } + + if (value.equals("Javascript")) { + if (jsEnabled) { + jsEnabled = false; + Toast.makeText(getApplicationContext(), "Javascript is now disabled", Toast.LENGTH_SHORT).show(); + } else { + jsEnabled = true; + Toast.makeText(getApplicationContext(), "Javascript is now enabled", Toast.LENGTH_SHORT).show(); + } + Panther.getSettings().setJavaScriptEnabled(jsEnabled); + } if (value.equals("Exit")) { Panther.clearCache(true); @@ -173,13 +186,40 @@ public void onItemClick(AdapterView < ? > adapterView, View view, int position, Panther.setWebViewClient(new WebViewClient() { + @Override + public void onPageFinished(WebView view, String url) { + super.onPageFinished(view, url); + } + @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { return false; } }); - Panther.setWebChromeClient(new WebChromeClient() { + Panther.setWebChromeClient(new WebChromeClient() { + @Override + public void onPermissionRequest(final PermissionRequest request) { + final String[] requestedPermissions = request.getResources(); + + new AlertDialog.Builder(MainActivity.this) + .setTitle("Permission Request") + .setMessage("The website is requesting permission to access device resources.") + .setPositiveButton("Allow", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + request.grant(requestedPermissions); + } + }) + .setNegativeButton("Deny", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + request.deny(); + } + }) + .show(); + } + @Override public boolean onConsoleMessage(ConsoleMessage consoleMessage) { String message = consoleMessage.message() + " -- From line " + diff --git a/Panther/app/src/main/res/values/strings.xml b/Panther/app/src/main/res/values/strings.xml index a7b957d..bae16d0 100644 --- a/Panther/app/src/main/res/values/strings.xml +++ b/Panther/app/src/main/res/values/strings.xml @@ -8,6 +8,7 @@ Console + Javascript Search Engine Source Code