diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index b5814f14..ea4e5d03 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -1,8 +1,5 @@
-
-
-
@@ -116,8 +113,5 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index e19432c3..c8264a7c 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -30,5 +30,6 @@
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
index 273698d9..04aa4f93 100644
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -15,7 +15,6 @@
-
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 840385a9..6f881795 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -26,9 +26,10 @@
+
-
+
@@ -52,17 +53,23 @@
+
-
+
+
-
+
+
+
+
+
diff --git a/app/build.gradle b/app/build.gradle
index 7cae0664..9f5dba00 100755
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -110,8 +110,8 @@ dependencies {
/* Ads Manager */
implementation 'com.android.support:support-annotations:29.0.0'
- implementation 'com.facebook.android:audience-network-sdk:6.5.1'
- implementation 'com.mopub.mediation:facebookaudiencenetwork:5.9.0.1'
+ implementation 'com.facebook.android:audience-network-sdk:6.6.0'
+ implementation 'com.mopub.mediation:facebookaudiencenetwork:6.6.0.0'
implementation('com.mopub:mopub-sdk:5.17.0@aar') {
transitive = true
}
diff --git a/app/src/main/assets/adblock/background.js b/app/src/main/assets/adblock/background.js
new file mode 100644
index 00000000..7cff0a72
--- /dev/null
+++ b/app/src/main/assets/adblock/background.js
@@ -0,0 +1,16 @@
+function logURL(requestDetails) {
+ let redirectUrl = "https://google.com";
+ return {redirectUrl};
+}
+
+browser.webRequest.onBeforeRequest.addListener(
+ function(info) {
+ var denyRequest = true;
+ return {cancel: denyRequest}
+ },
+
+{
+ urls: [""],
+ types: ["ping"],
+},
+["blocking"]);
\ No newline at end of file
diff --git a/app/src/main/assets/adblock/intercept.js b/app/src/main/assets/adblock/intercept.js
new file mode 100644
index 00000000..9c3728b3
--- /dev/null
+++ b/app/src/main/assets/adblock/intercept.js
@@ -0,0 +1 @@
+document.body.style.border = "5px solid red";
diff --git a/app/src/main/assets/adblock/manifest.json b/app/src/main/assets/adblock/manifest.json
new file mode 100644
index 00000000..6117f057
--- /dev/null
+++ b/app/src/main/assets/adblock/manifest.json
@@ -0,0 +1,31 @@
+{
+"description": "something something dark side",
+"manifest_version": 2,
+"name": "Interceptz",
+"version": "1.0",
+"icons": {
+ "48": "icons/border-48.png"
+},
+
+"applications": {
+ "gecko": {
+ "id": "borderify@mozilla.org",
+ "strict_min_version": "45.0"
+ }
+},
+
+"permissions": [
+ "webRequest"
+],
+
+"background": {
+ "scripts": ["background.js"]
+ },
+
+"content_scripts": [
+ {
+ "matches": ["*://*.mozilla.org/*"],
+ "js": ["intercept.js"]
+ }
+]
+}
\ No newline at end of file
diff --git a/app/src/main/assets/parser/content.js b/app/src/main/assets/parser/content.js
index 3805fead..cff7c066 100644
--- a/app/src/main/assets/parser/content.js
+++ b/app/src/main/assets/parser/content.js
@@ -17,4 +17,65 @@ browser.runtime.onMessage.addListener((data, sender) => {
if (data.action === 'evalJavascript') {
return Promise.resolve(document.documentElement.innerHTML);
}
-});
\ No newline at end of file
+
+ /* Ad-B-Gone: Bookmarklet that removes obnoxious ads from pages */
+ var selectors = [
+ /* By ID: */
+ '#sidebar-wrap', '#advert', '#xrail', '#middle-article-advert-container',
+ '#sponsored-recommendations', '#around-the-web', '#sponsored-recommendations',
+ '#taboola-content', '#taboola-below-taboola-native-thumbnails', '#inarticle_wrapper_div',
+ '#rc-row-container', '#ads', '#at-share-dock', '#at4-share', '#at4-follow', '#right-ads-rail',
+ 'div#ad-interstitial', 'div#advert-article', 'div#ac-lre-player-ph',
+ /* By Class: */
+ '.ad', '.avert', '.avert__wrapper', '.middle-banner-ad', '.advertisement',
+ '.GoogleActiveViewClass', '.advert', '.cns-ads-stage', '.teads-inread', '.ad-banner',
+ '.ad-anchored', '.js_shelf_ads', '.ad-slot', '.antenna', '.xrail-content',
+ '.advertisement__leaderboard', '.ad-leaderboard', '.trc_rbox_outer', '.ks-recommended',
+ '.article-da', 'div.sponsored-stories-component', 'div.addthis-smartlayers',
+ 'div.article-adsponsor', 'div.signin-prompt', 'div.article-bumper', 'div.video-placeholder',
+ 'div.top-ad-container', 'div.header-ad', 'div.ad-unit', 'div.demo-block', 'div.OUTBRAIN',
+ 'div.ob-widget', 'div.nwsrm-wrapper', 'div.announcementBar', 'div.partner-resources-block',
+ 'div.arrow-down', 'div.m-ad', 'div.story-interrupt', 'div.taboola-recommended',
+ 'div.ad-cluster-container', 'div.ctx-sidebar', 'div.incognito-modal', '.OUTBRAIN', '.subscribe-button',
+ '.ads9', '.leaderboards', '.GoogleActiveViewElement', '.mpu-container', '.ad-300x600', '.tf-ad-block',
+ '.sidebar-ads-holder-top', '.ads-one', '.FullPageModal__scroller',
+ '.content-ads-holder', '.widget-area', '.social-buttons', '.ac-player-ph',
+ /* Other: */
+ 'script', 'iframe', 'video', 'aside#sponsored-recommendations', 'aside[role="banner"]', 'aside',
+ 'amp-ad', 'span[id^=ad_is_]', 'div[class*="indianapolis-optin"]', 'div[id^=google_ads_iframe]',
+ 'div[data-google-query-id]', 'section[data-response]', 'ins.adsbygoogle', 'div[data-google-query-id]',
+ 'div[data-test-id="fullPageSignupModal"]', 'div[data-test-id="giftWrap"]' ];
+ for(let i in selectors) {
+ let nodesList = document.querySelectorAll(selectors[i]);
+ for(let i = 0; i < nodesList.length; i++) {
+ let el = nodesList[i];
+ if(el && el.parentNode)
+ el.parentNode.removeChild(el);
+ }
+ }
+ document.cookie="VISITOR_INFO1_LIVE=oKckVSqvaGw; path=/; domain=.youtube.com";
+
+});
+
+function randomColor() {
+ return "#" + Math.floor(Math.random()*16777215).toString(16);
+}
+
+var pattern = "*bbc*";
+
+var image = `
+
+`;
+
+function listener(details) {
+ let redirectUrl = "https://google.com";
+ return {redirectUrl};
+}
+
+browser.webRequest.onBeforeRequest.addListener(
+ listener,
+ {urls: [pattern], types: ["image"]},
+ ["blocking"]
+);
\ No newline at end of file
diff --git a/app/src/main/assets/parser/manifest.json b/app/src/main/assets/parser/manifest.json
index e681747b..30194d5d 100644
--- a/app/src/main/assets/parser/manifest.json
+++ b/app/src/main/assets/parser/manifest.json
@@ -28,7 +28,9 @@
"permissions": [
"nativeMessaging",
"geckoViewAddons",
+ "webRequest",
"tabs",
+ "webRequestBlocking",
""
]
}
\ No newline at end of file
diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/externalCommandManager/externalShortcutController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/externalCommandManager/externalShortcutController.java
index f25e440d..5baa2374 100644
--- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/externalCommandManager/externalShortcutController.java
+++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/externalCommandManager/externalShortcutController.java
@@ -7,6 +7,7 @@ import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
import com.darkweb.genesissearchengine.constants.constants;
+import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.dataManager.dataController;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.example.myapplication.R;
@@ -27,7 +28,7 @@ public class externalShortcutController extends AppCompatActivity {
if(getIntent() != null){
String mShortcutCommands = getIntent().getStringExtra(EXTERNAL_SHORTCUT_COMMAND);
-
+ status.sSettingIsAppStarted = false;
if(mShortcutCommands!=null){
mIntent.putExtra(EXTERNAL_SHORTCUT_COMMAND, mShortcutCommands);
switch (mShortcutCommands) {
diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/externalCommandManager/externalURLNavigationContoller.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/externalCommandManager/externalURLNavigationContoller.java
index 3df75908..541d7089 100644
--- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/externalCommandManager/externalURLNavigationContoller.java
+++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/externalCommandManager/externalURLNavigationContoller.java
@@ -23,16 +23,6 @@ public class externalURLNavigationContoller extends AppCompatActivity {
mData = Uri.parse(constants.CONST_BACKEND_GENESIS_URL);
}
- if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1 && getReferrer().getHost().equals(CONST_PACKAGE_NAME) || !helperMethod.getHost(mData.toString()).contains(".onion")){
- helperMethod.openURLInCustomBrowser(mData.toString(), this);
- finish();
- return;
- }
- else if(!helperMethod.getHost(mData.toString()).contains(".onion")){
- helperMethod.openURLInCustomBrowser(mData.toString(), this);
- finish();
- return;
- }
if(activityContextManager.getInstance().getHomeController()==null){
Intent mIntent = new Intent(this, homeController.class);
mIntent.putExtra(EXTERNAL_SHORTCUT_COMMAND_NAVIGATE, mData.toString());
diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoClients.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoClients.java
index 81e1bdac..090a7390 100644
--- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoClients.java
+++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoClients.java
@@ -210,7 +210,21 @@ public class geckoClients
Log.i("MessageDelegate", "Extension installed: " + extension);
extension.setMessageDelegate(mMessagingDelegate, "browser");
},
- e -> Log.e("MessageDelegate", "Error registering WebExtension", e)
+ e -> {
+ Log.e("MessageDelegate", "Error registering WebExtension", e);
+ }
+ );
+
+ mRuntime.getWebExtensionController()
+ .ensureBuiltIn("resource://android/assets/adblock/", "messaging@example.com")
+ .accept(
+ extension -> {
+ Log.i("MessageDelegate", "Extension installed: " + extension);
+ extension.setMessageDelegate(mMessagingDelegate, "browser");
+ },
+ e -> {
+ Log.e("MessageDelegate", "Error registering WebExtension", e);
+ }
);
}
diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoSession.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoSession.java
index 7faccc6b..e193f9bb 100644
--- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoSession.java
+++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoSession.java
@@ -385,7 +385,7 @@ geckoSession extends GeckoSession implements GeckoSession.MediaDelegate,GeckoSes
}else {
if(progress==100){
event.invokeObserver(Arrays.asList(mSessionID,mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.ON_INVOKE_PARSER);
- if(!mCurrentURL.contains("genesis") && helperMethod.getHost(mCurrentURL).contains(".onion")){
+ if(!mCurrentURL.contains("genesis") && !wasPreviousErrorPage()){
checkApplicationRate();
}
if(!mIsProgressBarChanging){
@@ -395,6 +395,7 @@ geckoSession extends GeckoSession implements GeckoSession.MediaDelegate,GeckoSes
});
event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle, m_current_url_id, mTheme), enums.etype.M_UPDATE_PIXEL_BACKGROUND);
}
+ mPreviousErrorPage = false;
}else {
mIsProgressBarChanging = false;
mContext.get().runOnUiThread(() -> event.invokeObserver(Arrays.asList(mProgress,mSessionID), enums.etype.progress_update));
@@ -546,7 +547,6 @@ geckoSession extends GeckoSession implements GeckoSession.MediaDelegate,GeckoSes
}
public GeckoResult onLoadRequest(@NonNull GeckoSession var2, @NonNull GeckoSession.NavigationDelegate.LoadRequest var1) {
- mPreviousErrorPage = false;
if(var1.uri.endsWith("genesisconfigurenewidentity.com/")){
initURL(mPrevURL);
@@ -834,7 +834,7 @@ geckoSession extends GeckoSession implements GeckoSession.MediaDelegate,GeckoSes
}
if(var4.type!=0 && var4.srcUri!=null){
if(var4.linkUri!=null){
- event.invokeObserver(Arrays.asList(var4.linkUri,mSessionID,var4.srcUri,title, mTheme, var4.altText, mContext.get()), M_LONG_PRESS_WITH_LINK);
+ event.invokeObserver(Arrays.asList(var4.linkUri,mSessionID,var4.srcUri,title, mTheme, var4.altText, this, mContext.get()), M_LONG_PRESS_WITH_LINK);
}
else {
try{
@@ -843,7 +843,7 @@ geckoSession extends GeckoSession implements GeckoSession.MediaDelegate,GeckoSes
{
mTitle = helperMethod.getDomainName(mCurrentURL) + "\n" + var4.srcUri;
}
- event.invokeObserver(Arrays.asList(var4.srcUri,mSessionID,mTitle, mTheme, mContext.get()), enums.etype.on_long_press);
+ event.invokeObserver(Arrays.asList(var4.srcUri,mSessionID,mTitle, mTheme, this, mContext.get()), enums.etype.on_long_press);
}catch (Exception ex){
ex.printStackTrace();
Log.i("","");
@@ -851,7 +851,7 @@ geckoSession extends GeckoSession implements GeckoSession.MediaDelegate,GeckoSes
}
}
else if(var4.linkUri!=null){
- event.invokeObserver(Arrays.asList(var4.linkUri,mSessionID,title, mTheme, mContext.get()), M_LONG_PRESS_URL);
+ event.invokeObserver(Arrays.asList(var4.linkUri,mSessionID,title, mTheme, this, mContext.get()), M_LONG_PRESS_URL);
}
}
diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeController.java
index c5815a7a..f090183c 100644
--- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeController.java
+++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeController.java
@@ -253,7 +253,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
onStartApplication(null);
}
}
- if(mShortcutCommandNavigate!=null){
+ else if(mShortcutCommandNavigate!=null){
status.sExternalWebsite = mShortcutCommandNavigate;
onStartApplication(null);
}
@@ -374,6 +374,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mHomeViewController.updateBannerAdvertStatus(false, (boolean)pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
}
}
+ mHomeViewController.onFullScreen(true);
+ mHomeViewController.onUpdateStatusBarTheme(null, true);
}
public void onUpdateBannerAdvert(){
@@ -781,6 +783,10 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}
}
+ public void onUndo(View view){
+ activityContextManager.getInstance().getTabController().onRestoreTab(null);
+ }
+
public void onDestroyExernal(){
pluginController.getInstance().onOrbotInvoke(Collections.singletonList(status.mThemeApplying), pluginEnums.eOrbotManager.M_DESTROY);
}
@@ -1189,6 +1195,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mHomeViewController.progressBarReset();
initTabCountForced();
mNewSession.loadUri(url);
+ pluginController.getInstance().onMessageManagerInvoke(Arrays.asList(mNewSession, homeController.this), M_LOAD_NEW_TAB);
+
mAppBar.setTag(R.id.expandableBar,true);
}
@@ -1672,7 +1680,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
pluginController.getInstance().onOrbotInvoke(Arrays.asList(status.sBridgeCustomBridge, status.sBridgeGatewayManual, status.sBridgeCustomType, status.sBridgeStatus, status.sShowImages, status.sClearOnExit, (String)dataController.getInstance().invokeBridges(dataEnums.eBridgeWebsiteCommands.M_FETCH, null)), pluginEnums.eOrbotManager.M_START_ORBOT);
onInvokeProxyLoading();
}, 1000);
- mHomeViewController.disableCoordinatorSwipe();
}
public void onDownloadFile(){
@@ -2100,7 +2107,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}
else if(e_type.equals(enums.etype.M_NEW_LINK_IN_NEW_TAB))
{
- pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(homeController.this), M_LOAD_NEW_TAB);
postNewLinkTabAnimationInBackground(dataToStr(data.get(0)));
}
else if(e_type.equals(M_NEW_LINK_IN_NEW_TAB_LOAD))
@@ -2176,6 +2182,12 @@ public class homeController extends AppCompatActivity implements ComponentCallba
initWidget();
}
else if(e_type.equals(enums.etype.M_WELCOME_MESSAGE)){
+
+ new Handler().postDelayed(() ->
+ {
+ dataController.getInstance().invokeCrawler(dataEnums.eCrawlerCommands.M_INIT, data);
+ }, 1000);
+
if(status.sSettingIsWelcomeEnabled){
final Handler handler = new Handler();
Runnable runnable = () -> {
diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeViewController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeViewController.java
index a2f9d00b..91225524 100644
--- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeViewController.java
+++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeViewController.java
@@ -235,6 +235,7 @@ class homeViewController
ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) mSearchEngineBar.getLayoutParams();
if(isLandscape){
layoutParams.setMargins(0, helperMethod.pxFromDp(60), 0, 0);
+ mGeckoView.setPadding(0,0,0,0);
}else {
Object mAdvertLoaded = mEvent.invokeObserver(null, enums.etype.M_ADVERT_LOADED);
if(mAdvertLoaded!=null && (boolean)mAdvertLoaded){
@@ -243,11 +244,12 @@ class homeViewController
int y = location[1];
mBannerAds.setMinimumHeight(mBannerAds.getHeight());
- layoutParams.setMargins(0, mBannerAds.getHeight() + mTopBar.getHeight(), 0, 0);
+ layoutParams.setMargins(0, mBannerAds.getHeight() + mTopBar.getHeight(), 0, (mBannerAds.getHeight() + mTopBar.getHeight())*-1);
initTopBarPadding();
}else {
layoutParams.setMargins(0, helperMethod.pxFromDp(60), 0, 0);
+ mGeckoView.setPadding(0,0,0,0);
}
}
mSearchEngineBar.setLayoutParams(layoutParams);
@@ -260,9 +262,6 @@ class homeViewController
return;
}
if(!status.sFullScreenBrowsing){
-
-
-
}else {
int paddingDp = 0;
if(isFullScreen){
@@ -695,12 +694,14 @@ class homeViewController
mSplashScreen.setVisibility(View.GONE);
mSplashScreen.setVisibility(View.GONE);
mBlocker.setEnabled(false);
+ disableCoordinatorSwipe();
}
private boolean mIsAnimating = false;
public void splashScreenDisable(){
mTopBar.setAlpha(1);
mGeckoView.setVisibility(View.VISIBLE);
+ disableCoordinatorSwipe();
if(mSplashScreen.getAlpha()==1){
if(!mIsAnimating){
@@ -1205,6 +1206,7 @@ class homeViewController
public void onUpdateSearchEngineBar(boolean pStatus, int delay)
{
if(pStatus){
+ initSearchEngineView();
if(mSearchEngineBar.getAlpha() == 0 || mSearchEngineBar.getVisibility() == View.GONE && mSplashScreen.getAlpha()<=0){
onUpdateStatusBarTheme(null, false);
mSearchEngineBar.animate().cancel();
@@ -1353,18 +1355,17 @@ class homeViewController
}
public void onNewTabAnimation(List