mirror of https://github.com/LeOS-GSI/LeOS-Genesis
parent
cf716b5f08
commit
e2619cdc71
File diff suppressed because one or more lines are too long
|
@ -149,5 +149,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<br><br>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -149,5 +149,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<br><br>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -36,16 +36,16 @@ color:#cccccc !important;
|
|||
}
|
||||
|
||||
.hi_card_link{
|
||||
color: #6699cc;
|
||||
color: #8cb3d9;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.hi_issue--color{
|
||||
color: #336699;
|
||||
color: #538cc6;
|
||||
}
|
||||
|
||||
.hi_arrow--color{
|
||||
color: #4080bf;
|
||||
color: #538cc6;
|
||||
}
|
||||
|
||||
.hi_card--margin-top{
|
||||
|
|
|
@ -76,22 +76,6 @@
|
|||
<br>
|
||||
<br>
|
||||
|
||||
<!--footer-->
|
||||
<!-- <div class="footer-bar-container">
|
||||
<div class="fb_shared-footer-bar gs-disable-highlight" >
|
||||
|
||||
<div class="fb_footer-bar__content_top fb_footer-bar__text-bottom fb_footer-bar__border_bottom" >
|
||||
<a href="https://whatismycountry.com/" class="fb_footer-bar__catagories fb_footer-bar__catagories--padding" >Location</a>
|
||||
</div>
|
||||
|
||||
<div class="fb_footer-bar__content_bottom fb_footer-bar__text-bottom" >
|
||||
<a href="https://boogle.store/privacy" class="fb_footer-bar__catagories fb_footer-bar__catagories--padding" >Privacy & Policy</a>
|
||||
<a href="https://boogle.store/reportus" class="fb_footer-bar__catagories fb_footer-bar__catagories--padding" >Report</a>
|
||||
<a href="https://boogle.store/create" class="fb_footer-bar__catagories fb_footer-bar__catagories--padding" >Sitemap</a>
|
||||
</div>
|
||||
</div>
|
||||
<div> -->
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -38,7 +38,7 @@ class homepage {
|
|||
document.getElementById(this.mLastLinkID).style.backgroundColor = "#1c1b21";
|
||||
}
|
||||
|
||||
document.getElementById(pData[0]).style.backgroundColor = "#0c0b0e";
|
||||
document.getElementById(pData[0]).style.backgroundColor = "#18171c";
|
||||
window.open(pData[1],"_self");
|
||||
this.mLastLinkID = pData[0];
|
||||
}
|
||||
|
@ -71,9 +71,9 @@ function onTriggerScriptHandler(pCommand,pData) {
|
|||
$(window).on('load', function() {
|
||||
/* For Local Testing */
|
||||
|
||||
// var mResponseJson = '[{ "mIcon":"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"},{ "mIcon":"https://wikileaks.org/static/img/wl-logo.png", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"},{ "mIcon":"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"},{ "mIcon":"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"},{ "mIcon":"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"},{ "mIcon":"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"}]';
|
||||
// setTimeout(mHomepageLoader.onLoadReferenceWebsites, 500);
|
||||
// setTimeout(mHomepageLoader.onLoadReferenceWebsiteContent, 1000, mResponseJson);
|
||||
var mResponseJson = '[{ "mIcon":"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"},{ "mIcon":"https://wikileaks.org/static/img/wl-logo.png", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"},{ "mIcon":"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"},{ "mIcon":"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"},{ "mIcon":"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"},{ "mIcon":"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"}]';
|
||||
setTimeout(mHomepageLoader.onLoadReferenceWebsites, 500);
|
||||
setTimeout(mHomepageLoader.onLoadReferenceWebsiteContent, 1000, mResponseJson);
|
||||
|
||||
onTriggerScriptHandler(Commands.onLoadReferenceWebsites, null)
|
||||
});
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
@media only screen and (max-width: 943px) {
|
||||
.lh_light_header__catagory_bold_mobile {
|
||||
font-weight: bold;
|
||||
color: #cccccc !important;
|
||||
color: #f0f0f0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
|||
color:#000000;
|
||||
text-align: right;
|
||||
padding-top: 0px;
|
||||
border-bottom-color:#000000 !important;
|
||||
border-bottom-color:#121212 !important;
|
||||
padding-top: 11px;
|
||||
padding-bottom: 15px;
|
||||
border-style: solid;border-right-width: 0;
|
||||
|
@ -47,7 +47,7 @@
|
|||
|
||||
.lh_light_header__bold{
|
||||
font-weight: bold;
|
||||
color: #1967d2 !important;
|
||||
color: #5f9aec !important;
|
||||
}
|
||||
|
||||
.lh_light_header__catagory-spacing-right{
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
.line-style {
|
||||
border: 0;
|
||||
height: 1px;
|
||||
background-image: -webkit-linear-gradient(left, #212121, #000000, #212121);
|
||||
background-image: -moz-linear-gradient(left, #212121, #000000, #212121);
|
||||
background-image: -ms-linear-gradient(left, #212121, #000000, #212121);
|
||||
background-image: -o-linear-gradient(left, #212121, #000000, #212121);
|
||||
background-image: -webkit-linear-gradient(left, #212121, #0d0d0d, #212121);
|
||||
background-image: -moz-linear-gradient(left, #212121, #0d0d0d, #212121);
|
||||
background-image: -ms-linear-gradient(left, #212121, #0d0d0d, #212121);
|
||||
background-image: -o-linear-gradient(left, #212121, #0d0d0d, #212121);
|
||||
width:40% !important;
|
||||
max-width:500px !important;
|
||||
}
|
||||
|
@ -108,7 +108,7 @@
|
|||
border-radius: 6px;
|
||||
outline: none;
|
||||
|
||||
border: 1px solid #28262c;
|
||||
border: 1px solid #19181b;
|
||||
box-shadow: 0 3px 3px 0 #0f0e11;
|
||||
width:91% !important;
|
||||
max-width: 575px;
|
||||
|
@ -270,7 +270,7 @@
|
|||
margin-left: 0px;
|
||||
line-height: 18px;
|
||||
margin-top: 15px;
|
||||
color: #e6e6e6;
|
||||
color: #f0f0f0;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
|
|
@ -66,8 +66,6 @@ public class geckoClients
|
|||
geckoView.setSession(mSession);
|
||||
}
|
||||
mSession.onSetInitializeFromStartup();
|
||||
|
||||
|
||||
onUpdateFont();
|
||||
}
|
||||
|
||||
|
@ -185,6 +183,11 @@ public class geckoClients
|
|||
mSession.setLoading(status);
|
||||
}
|
||||
|
||||
|
||||
public void initURL(String url) {
|
||||
mSession.initURL(url);
|
||||
}
|
||||
|
||||
public void loadURL(String url) {
|
||||
if(mSession.onGetInitializeFromStartup()){
|
||||
mSession.initURL(url);
|
||||
|
@ -201,9 +204,10 @@ public class geckoClients
|
|||
}catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}else if(url.contains(constants.CONST_GENESIS_HELP_URL_SUB)){
|
||||
}else if(url.contains(constants.CONST_GENESIS_HELP_URL_SUB) || url.contains(constants.CONST_GENESIS_HELP_URL_CACHE) || url.contains(constants.CONST_GENESIS_HELP_URL_CACHE_DARK)){
|
||||
try{
|
||||
mSession.initURL(constants.CONST_GENESIS_HELP_URL);
|
||||
|
||||
if(status.sTheme == enums.Theme.THEME_LIGHT || helperMethod.isDayMode(context)){
|
||||
mSession.loadUri(constants.CONST_GENESIS_HELP_URL_CACHE);
|
||||
}else {
|
||||
|
@ -244,7 +248,6 @@ public class geckoClients
|
|||
}
|
||||
|
||||
public void onBackPressed(boolean isFinishAllowed){
|
||||
mSession.goBackSession();
|
||||
if(mSession.canGoBack()){
|
||||
mSession.goBackSession();
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import android.app.PendingIntent;
|
|||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.graphics.Matrix;
|
||||
|
@ -60,6 +61,8 @@ import java.util.Objects;
|
|||
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE;
|
||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE_DARK;
|
||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED;
|
||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED_DARK;
|
||||
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_LONG_PRESS_URL;
|
||||
|
@ -387,7 +390,7 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele
|
|||
|
||||
/* Its Absence causes delay on first launch*/
|
||||
if(mCurrentURL.contains("boogle.store")){
|
||||
event.invokeObserver(Arrays.asList(5, mSessionID), enums.etype.progress_update_forced);
|
||||
event.invokeObserver(Arrays.asList(5, mSessionID, mCurrentURL), enums.etype.progress_update_forced);
|
||||
}
|
||||
|
||||
return GeckoResult.fromValue(AllowOrDeny.ALLOW);
|
||||
|
@ -434,7 +437,7 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele
|
|||
public void onFirstContentfulPaint(@NonNull GeckoSession var1) {
|
||||
isFirstPaintExecuted = true;
|
||||
|
||||
if(mPreviousErrorPage || mCurrentURL.contains("boogle.store") || mCurrentURL.startsWith(CONST_GENESIS_URL_CACHED) || mCurrentURL.startsWith(CONST_GENESIS_URL_CACHED_DARK)){
|
||||
if(mPreviousErrorPage || mCurrentURL.contains("boogle.store") || mCurrentURL.startsWith(CONST_GENESIS_URL_CACHED) || mCurrentURL.startsWith(CONST_GENESIS_URL_CACHED_DARK) || mCurrentURL.startsWith(CONST_GENESIS_HELP_URL_CACHE) || mCurrentURL.toString().startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)){
|
||||
event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle, false), enums.etype.M_ON_BANNER_UPDATE);
|
||||
}else {
|
||||
event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle, true), enums.etype.M_ON_BANNER_UPDATE);
|
||||
|
@ -703,6 +706,9 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele
|
|||
return mTheme;
|
||||
}
|
||||
boolean canGoBack(){
|
||||
if(mHistoryList==null || mHistoryList.size()==0){
|
||||
return false;
|
||||
}
|
||||
return mCanGoBack;
|
||||
}
|
||||
|
||||
|
@ -746,16 +752,25 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele
|
|||
}
|
||||
|
||||
void goBackSession(){
|
||||
if(mHistoryList!=null){
|
||||
int index = mHistoryList.getCurrentIndex()-1;
|
||||
|
||||
if(mHistoryList!=null && index>=0 && index<mHistoryList.size()){
|
||||
event.invokeObserver(Arrays.asList(mHistoryList.get(index).getUri(),mSessionID), enums.etype.start_proxy);
|
||||
new Handler().postDelayed(this::goBack, 100);
|
||||
if(mHistoryList!=null){
|
||||
stop();
|
||||
int index = mHistoryList.getCurrentIndex()-1;
|
||||
initURL(mHistoryList.get(index).getUri());
|
||||
if(mHistoryList.size()>index && index>0){
|
||||
event.invokeObserver(Arrays.asList(mHistoryList.get(index).getUri(), mSessionID), enums.etype.start_proxy);
|
||||
}
|
||||
|
||||
final Handler handler = new Handler();
|
||||
handler.postDelayed(this::goBack, 100);
|
||||
event.invokeObserver(Arrays.asList(5, mSessionID, mCurrentURL), enums.etype.progress_update_forced);
|
||||
event.invokeObserver(Arrays.asList(5, mSessionID, mCurrentURL), enums.etype.M_ADMOB_BANNER_RECHECK);
|
||||
}
|
||||
else {
|
||||
goBack();
|
||||
final Handler handler = new Handler();
|
||||
handler.postDelayed(this::goBack, 100);
|
||||
event.invokeObserver(Arrays.asList(5, mSessionID, mCurrentURL), enums.etype.progress_update_forced);
|
||||
event.invokeObserver(Arrays.asList(5, mSessionID, mCurrentURL), enums.etype.M_ADMOB_BANNER_RECHECK);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -763,16 +778,21 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele
|
|||
|
||||
if(mHistoryList!=null)
|
||||
{
|
||||
stop();
|
||||
int index = mHistoryList.getCurrentIndex() + 1;
|
||||
|
||||
if (mHistoryList != null && index >= 0 && index < mHistoryList.size())
|
||||
{
|
||||
|
||||
initURL(mHistoryList.get(index).getUri());
|
||||
if(mHistoryList.size()>index){
|
||||
event.invokeObserver(Arrays.asList(mHistoryList.get(index).getUri(), mSessionID), enums.etype.start_proxy);
|
||||
new Handler().postDelayed(this::goForward, 100);
|
||||
}
|
||||
final Handler handler = new Handler();
|
||||
handler.postDelayed(this::goForward, 100);
|
||||
event.invokeObserver(Arrays.asList(5, mSessionID, mCurrentURL), enums.etype.progress_update_forced);
|
||||
event.invokeObserver(Arrays.asList(5, mSessionID, mCurrentURL), enums.etype.M_ADMOB_BANNER_RECHECK);
|
||||
}else {
|
||||
goForward();
|
||||
final Handler handler = new Handler();
|
||||
handler.postDelayed(this::goForward, 100);
|
||||
event.invokeObserver(Arrays.asList(5, mSessionID, mCurrentURL), enums.etype.progress_update_forced);
|
||||
event.invokeObserver(Arrays.asList(5, mSessionID, mCurrentURL), enums.etype.M_ADMOB_BANNER_RECHECK);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -90,6 +90,9 @@ import java.util.List;
|
|||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE;
|
||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE_DARK;
|
||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED;
|
||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED_DARK;
|
||||
import static com.darkweb.genesissearchengine.constants.enums.etype.GECKO_SCROLL_CHANGED;
|
||||
|
@ -143,6 +146,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
private ProgressBar mProgressBarIndeterminate;
|
||||
private FragmentContainerView mTabFragment;
|
||||
private LinearLayout mTopBarContainer;
|
||||
private View mPopupLoadNewTab;
|
||||
|
||||
/*Redirection Objects*/
|
||||
private GeckoResult<Bitmap> mRenderedBitmap = null;
|
||||
|
@ -230,6 +234,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
if(mTempModel!=null){
|
||||
tabRowModel model = (tabRowModel)mTempModel;
|
||||
if(!status.mThemeApplying){
|
||||
org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP1:",(String)model.getSession().getCurrentURL());
|
||||
mHomeViewController.onUpdateSearchBar(model.getSession().getCurrentURL(), false, false, false);
|
||||
}
|
||||
onLoadTab(model.getSession(),false);
|
||||
|
@ -240,6 +245,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
}
|
||||
initTabCount();
|
||||
if(!status.mThemeApplying){
|
||||
org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP2:",(String)mGeckoClient.getSession().getCurrentURL());
|
||||
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(), false, false, false);
|
||||
}
|
||||
status.mThemeApplying = false;
|
||||
|
@ -384,13 +390,14 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
mInfoLandscape = findViewById(R.id.pInfoLandscape);
|
||||
mProgressBarIndeterminate = findViewById(R.id.pProgressBarIndeterminate);
|
||||
mTabFragment = findViewById(R.id.mTabFragment);
|
||||
mPopupLoadNewTab = findViewById(R.id.pPopupLoadNewTab);
|
||||
|
||||
mGeckoView.setSaveEnabled(false);
|
||||
mGeckoView.setSaveFromParentEnabled(false);
|
||||
mGeckoView.setAutofillEnabled(true);
|
||||
|
||||
mGeckoClient = new geckoClients();
|
||||
mHomeViewController.initialization(new homeViewCallback(),this,mNewTab, mWebViewContainer, mLoadingText, mProgressBar, mSearchbar, mSplashScreen, mLoadingIcon, mBannerAds, mGatewaySplash, mTopBar, mGeckoView, mBackSplash, mConnectButton, mFindBar, mFindText, mFindCount, mTopLayout, mVoiceInput, mMenu, mNestedScroll, mBlocker, mBlockerFullSceen, mSearchEngineBar, mCopyright, mHintListView, mAppBar, mOrbotLogManager, mInfoLandscape, mInfoPortrait, mProgressBarIndeterminate, mTabFragment, mTopBarContainer, mSearchLock);
|
||||
mHomeViewController.initialization(new homeViewCallback(),this,mNewTab, mWebViewContainer, mLoadingText, mProgressBar, mSearchbar, mSplashScreen, mLoadingIcon, mBannerAds, mGatewaySplash, mTopBar, mGeckoView, mBackSplash, mConnectButton, mFindBar, mFindText, mFindCount, mTopLayout, mVoiceInput, mMenu, mNestedScroll, mBlocker, mBlockerFullSceen, mSearchEngineBar, mCopyright, mHintListView, mAppBar, mOrbotLogManager, mInfoLandscape, mInfoPortrait, mProgressBarIndeterminate, mTabFragment, mTopBarContainer, mSearchLock, mPopupLoadNewTab);
|
||||
mGeckoView.onSetHomeEvent(new nestedGeckoViewCallback());
|
||||
mGeckoClient.initialize(mGeckoView, new geckoViewCallback(), this,false);
|
||||
mGeckoClient.onValidateInitializeFromStartup();
|
||||
|
@ -519,6 +526,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
mGeckoView.setSession(mTempSession);
|
||||
|
||||
mHomeViewController.onClearSelections(false);
|
||||
org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP3:",(String)mTempSession.getCurrentURL());
|
||||
mHomeViewController.onUpdateSearchBar(mTempSession.getCurrentURL(),false,true, false);
|
||||
if(mTempSession.getProgress()>0 && mTempSession.getProgress()<100){
|
||||
mHomeViewController.onProgressBarUpdate(mTempSession.getProgress(), false);
|
||||
|
@ -529,6 +537,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
mGeckoClient.onValidateInitializeFromStartup();
|
||||
mGeckoClient.onSessionReinit();
|
||||
mHomeViewController.onUpdateStatusBarTheme(mTempSession.getTheme(), false);
|
||||
org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP4:",(String)mGeckoClient.getSession().getCurrentURL());
|
||||
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(), false, false, false);
|
||||
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getSession().getTheme(),true);
|
||||
mAppBar.setExpanded(true,true);
|
||||
|
@ -643,6 +652,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
if (actionId == EditorInfo.IME_ACTION_NEXT || actionId == EditorInfo.IME_ACTION_GO || actionId == EditorInfo.IME_ACTION_DONE)
|
||||
{
|
||||
onSearchBarInvoked(v);
|
||||
org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP5:",(String)mGeckoClient.getSession().getCurrentURL());
|
||||
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(),true,true, false);
|
||||
mHomeViewController.onClearSelections(true);
|
||||
mGeckoClient.setLoading(true);
|
||||
|
@ -673,7 +683,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
if(hasFocus)
|
||||
{
|
||||
pluginController.getInstance().onMessageManagerInvoke(null, M_RESET);
|
||||
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(),false,true, false);
|
||||
if (!mGeckoClient.getSession().getCurrentURL().equals("about:blank")){
|
||||
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(), false, true, false);
|
||||
}
|
||||
|
||||
final Handler handler = new Handler();
|
||||
handler.postDelayed(() ->
|
||||
|
@ -752,6 +764,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
}
|
||||
mHomeViewController.initSearchBarFocus(false);
|
||||
if(!mGeckoClient.isLoading()){
|
||||
org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP8:",(String)mGeckoClient.getSession().getCurrentURL());
|
||||
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(),false,true, false);
|
||||
}
|
||||
helperMethod.hideKeyboard(homeController.this);
|
||||
|
@ -802,6 +815,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
if(validated_url!=null){
|
||||
url = validated_url;
|
||||
}
|
||||
org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP9:",(String)url);
|
||||
mHomeViewController.onUpdateSearchBar(url,false,true, false);
|
||||
onLoadURL(url);
|
||||
}
|
||||
|
@ -817,11 +831,13 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
}
|
||||
|
||||
onLoadURL(pURL);
|
||||
org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP14:",(String)pURL);
|
||||
mHomeViewController.onUpdateSearchBar(pURL,false,true, false);
|
||||
}
|
||||
|
||||
public void onSuggestionMove(View view){
|
||||
String val = view.getTag().toString();
|
||||
org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP11:",(String)val);
|
||||
mHomeViewController.onUpdateSearchBar(val,false,false, true);
|
||||
}
|
||||
|
||||
|
@ -849,9 +865,15 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
activityContextManager.getInstance().getTabController().onRemoveSelection(view);
|
||||
}
|
||||
|
||||
public void onRestoreTab(View view){
|
||||
activityContextManager.getInstance().getTabController().onRestoreTab(view);
|
||||
public void onLoadRecentTab(View view){
|
||||
mHomeViewController.onHideLoadTabDialog();
|
||||
tabRowModel model = (tabRowModel)dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_RECENT_TAB, null);
|
||||
if(model!=null && !mGeckoClient.getSession().getSessionID().equals(model.getSession().getSessionID())){
|
||||
mHomeViewController.onUpdateSearchBar(model.getSession().getCurrentURL(),false,false,false);
|
||||
onLoadTab(model.getSession(), false);
|
||||
}
|
||||
}
|
||||
|
||||
public void onClearSelection(View view){
|
||||
activityContextManager.getInstance().getTabController().onClearSelection(view);
|
||||
}
|
||||
|
@ -864,9 +886,11 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
initializeGeckoView(true, true);
|
||||
if(status.sOpenURLInNewTab){
|
||||
onLoadURL(helperMethod.getDomainName(status.sSettingSearchStatus));
|
||||
org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP12:",(String)helperMethod.getDomainName(status.sSettingSearchStatus));
|
||||
mHomeViewController. onUpdateSearchBar(helperMethod.getDomainName(status.sSettingSearchStatus),false,true, false);
|
||||
}else {
|
||||
onLoadURL("about:blank");
|
||||
org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP13:",(String)strings.HOME_BLANK_PAGE);
|
||||
mHomeViewController. onUpdateSearchBar(strings.HOME_BLANK_PAGE,false,true, false);
|
||||
mHomeViewController.onNewTab();
|
||||
}
|
||||
|
@ -879,10 +903,28 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, null, mGeckoView,false));
|
||||
initializeGeckoView(true, true);
|
||||
mHomeViewController.progressBarReset();
|
||||
org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP15:",(String)url);
|
||||
mHomeViewController.onUpdateSearchBar(url,false,true, false);
|
||||
mGeckoClient.loadURL(url);
|
||||
}
|
||||
|
||||
public void postNewLinkTabAnimationInBackgroundTrigger(String url){
|
||||
postNewLinkTabAnimationInBackground(dataToStr(url));
|
||||
mHomeViewController.onShowLoadTabDialog();
|
||||
initTabCount();
|
||||
}
|
||||
|
||||
public void postNewLinkTabAnimationInBackground(String url){
|
||||
geckoSession mSession = mGeckoClient.getSession();
|
||||
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, null, mGeckoView,false));
|
||||
mGeckoClient.initialize(mGeckoView, new geckoViewCallback(), this,true);
|
||||
onSaveCurrentTab(mGeckoClient.getSession(),true);
|
||||
mHomeViewController.progressBarReset();
|
||||
mHomeViewController.onUpdateSearchBar(url,false,true, false);
|
||||
mGeckoClient.initURL(url);
|
||||
mGeckoClient.loadURL(url);
|
||||
onLoadTab(mSession,false);
|
||||
}
|
||||
|
||||
public void onNewTab(boolean isKeyboardOpenedTemp, boolean isKeyboardOpened){
|
||||
try {
|
||||
|
@ -972,9 +1014,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
mGeckoClient.onExitFullScreen();
|
||||
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getSession().getTheme(), true);
|
||||
}
|
||||
else if((int)dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_TOTAL_TAB, null)>0){
|
||||
mGeckoClient.onBackPressed(true);
|
||||
}
|
||||
else {
|
||||
mGeckoClient.onBackPressed(true);
|
||||
}
|
||||
|
@ -1027,7 +1066,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
mHomeViewController.onSetBannerAdMargin(true,(boolean)pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
|
||||
}
|
||||
|
||||
if(mGeckoClient.getSession().getCurrentURL().contains("boogle.store") || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED_DARK)){
|
||||
if(mGeckoClient.getSession().getCurrentURL().contains("boogle.store") || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED_DARK) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)){
|
||||
mHomeViewController.updateBannerAdvertStatus(false, (boolean)pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
|
||||
}else {
|
||||
mHomeViewController.updateBannerAdvertStatus(true, (boolean)pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
|
||||
|
@ -1247,6 +1286,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
}
|
||||
|
||||
public void onClearSearchBar(View view){
|
||||
org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP16:",(String)strings.GENERIC_EMPTY_STR);
|
||||
mHomeViewController.onUpdateSearchBar(strings.GENERIC_EMPTY_STR, false, true, false);
|
||||
}
|
||||
|
||||
|
@ -1354,7 +1394,23 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
}
|
||||
if (menuId == R.id.menu21) {
|
||||
helperMethod.hideKeyboard(this);
|
||||
mGeckoClient.onReload();
|
||||
String mUrl = mGeckoClient.getSession().getCurrentURL();
|
||||
|
||||
if(mUrl.equals(constants.CONST_GENESIS_HELP_URL_CACHE_DARK) && status.sTheme != enums.Theme.THEME_DARK){
|
||||
onLoadURL(constants.CONST_GENESIS_HELP_URL_CACHE);
|
||||
}
|
||||
else if(mUrl.equals(constants.CONST_GENESIS_HELP_URL_CACHE) && status.sTheme != enums.Theme.THEME_LIGHT){
|
||||
onLoadURL(constants.CONST_GENESIS_HELP_URL_CACHE_DARK);
|
||||
}
|
||||
else if(mUrl.equals(CONST_GENESIS_URL_CACHED_DARK) && status.sTheme != enums.Theme.THEME_DARK){
|
||||
onLoadURL(CONST_GENESIS_URL_CACHED);
|
||||
}
|
||||
else if(mUrl.equals(constants.CONST_GENESIS_URL_CACHED) && status.sTheme != enums.Theme.THEME_LIGHT){
|
||||
onLoadURL(CONST_GENESIS_URL_CACHED_DARK);
|
||||
}else {
|
||||
onLoadURL(mGeckoClient.getSession().getCurrentURL());
|
||||
}
|
||||
|
||||
}
|
||||
if (menuId == R.id.menu22) {
|
||||
helperMethod.hideKeyboard(this);
|
||||
|
@ -1448,11 +1504,13 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
status.sSettingRedirectStatus = strings.GENERIC_EMPTY_STR;
|
||||
}else {
|
||||
if(status.mThemeApplying){
|
||||
org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP17:",(String)data.get(0));
|
||||
mHomeViewController.onUpdateSearchBar(data.get(0).toString(),false, false, false);
|
||||
mHomeViewController.splashScreenDisableInstant();
|
||||
onLoadTabOnResume();
|
||||
}
|
||||
onLoadURL(data.get(0).toString());
|
||||
org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP18:",(String)data.get(0));
|
||||
mHomeViewController.onUpdateSearchBar(dataToStr(data.get(0),mGeckoClient.getSession().getCurrentURL()),false,true, false);
|
||||
}
|
||||
}
|
||||
|
@ -1519,6 +1577,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
}
|
||||
mHomeViewController.initSearchBarFocus(false);
|
||||
if(!mGeckoClient.isLoading()){
|
||||
org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP19:",(String)mGeckoClient.getSession().getCurrentURL());
|
||||
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(),false,true, false);
|
||||
}
|
||||
helperMethod.hideKeyboard(homeController.this);
|
||||
|
@ -1560,9 +1619,12 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
mHomeViewController.onProgressBarUpdate((int)data.get(0), false);
|
||||
}
|
||||
else if(e_type.equals(enums.etype.progress_update_forced)){
|
||||
Log.i("SUPPPP7:",(String)data.get(2));
|
||||
mHomeViewController.onUpdateSearchBar((String) data.get(2), false, true, false);
|
||||
mHomeViewController.onProgressBarUpdate((int)data.get(0), true);
|
||||
}
|
||||
else if(e_type.equals(enums.etype.ON_UPDATE_SEARCH_BAR)){
|
||||
org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP11:",(String)data.get(0));
|
||||
mHomeViewController.onUpdateSearchBar((String)data.get(0), false, false, false);
|
||||
}
|
||||
else if(e_type.equals(enums.etype.ON_FIRST_PAINT)){
|
||||
|
@ -1577,6 +1639,11 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
else if(e_type.equals(enums.etype.back_list_empty)){
|
||||
helperMethod.onMinimizeApp(homeController.this);
|
||||
}
|
||||
else if(e_type.equals(enums.etype.M_ADMOB_BANNER_RECHECK)){
|
||||
if(data.get(2).toString().startsWith(CONST_GENESIS_URL_CACHED) || data.get(2).toString().startsWith(CONST_GENESIS_URL_CACHED_DARK) || helperMethod.getHost(data.get(2).toString()).contains("boogle.store") || data.get(2).toString().startsWith(CONST_GENESIS_HELP_URL_CACHE) || data.get(2).toString().startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)){
|
||||
mHomeViewController.updateBannerAdvertStatus(false,true);
|
||||
}
|
||||
}
|
||||
else if(e_type.equals(enums.etype.ON_UPDATE_THEME)){
|
||||
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getSession().getTheme(),false);
|
||||
}
|
||||
|
@ -1603,6 +1670,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
initLocalLanguage();
|
||||
mHomeViewController.onPageFinished();
|
||||
mGeckoClient.onRedrawPixel();
|
||||
org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP12:",(String)data.get(0));
|
||||
mHomeViewController.onUpdateSearchBar(dataToStr(data.get(0),mGeckoClient.getSession().getCurrentURL()),false,true, false);
|
||||
}
|
||||
else if(e_type.equals(enums.etype.search_update)){
|
||||
|
@ -1632,7 +1700,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
pluginController.getInstance().onMessageManagerInvoke(data, M_LONG_PRESS_URL);
|
||||
}
|
||||
else if(e_type.equals(enums.etype.open_new_tab)){
|
||||
onOpenLinkNewTab(dataToStr(data.get(0)));
|
||||
postNewLinkTabAnimationInBackgroundTrigger(dataToStr(data.get(0)));
|
||||
}
|
||||
else if(e_type.equals(enums.etype.on_close_sesson)){
|
||||
if(!onCloseCurrentTab(mGeckoClient.getSession())){
|
||||
|
|
|
@ -48,6 +48,7 @@ import com.darkweb.genesissearchengine.widget.progressBar.AnimatedProgressBar;
|
|||
import com.example.myapplication.R;
|
||||
import com.google.android.gms.ads.AdView;
|
||||
import org.mozilla.geckoview.GeckoView;
|
||||
import org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log;
|
||||
import org.torproject.android.service.wrapper.orbotLocalConstants;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -56,6 +57,9 @@ import java.util.List;
|
|||
import java.util.concurrent.Callable;
|
||||
import static android.content.Context.LAYOUT_INFLATER_SERVICE;
|
||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_DOMAIN_URL;
|
||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL;
|
||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE;
|
||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE_DARK;
|
||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED;
|
||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED_DARK;
|
||||
import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_DESKTOP;
|
||||
|
@ -100,6 +104,7 @@ class homeViewController
|
|||
private FragmentContainerView mTabFragment;
|
||||
private LinearLayout mTopBarContainer;
|
||||
private ImageView mSearchLock;
|
||||
private View mPopupLoadNewTab;
|
||||
|
||||
/*Local Variables*/
|
||||
private Callable<String> mLogs = null;
|
||||
|
@ -107,7 +112,7 @@ class homeViewController
|
|||
private boolean isFullScreen = false;
|
||||
private MovementMethod mSearchBarMovementMethod = null;
|
||||
|
||||
void initialization(eventObserver.eventListener event, AppCompatActivity context, Button mNewTab, ConstraintLayout webviewContainer, TextView loadingText, AnimatedProgressBar progressBar, editTextManager searchbar, ConstraintLayout splashScreen, ImageView loading, AdView banner_ads, ImageButton gateway_splash, LinearLayout top_bar, GeckoView gecko_view, ImageView backsplash, Button connect_button, View pFindBar, EditText pFindText, TextView pFindCount, androidx.constraintlayout.widget.ConstraintLayout pTopLayout, ImageButton pVoiceInput, ImageButton pMenu, androidx.core.widget.NestedScrollView pNestedScroll, ImageView pBlocker, ImageView pBlockerFullSceen, View mSearchEngineBar, TextView pCopyright, RecyclerView pHistListView, com.google.android.material.appbar.AppBarLayout pAppBar, ImageButton pOrbotLogManager, ConstraintLayout pInfoLandscape, ConstraintLayout pInfoPortrait, ProgressBar pProgressBarIndeterminate, FragmentContainerView pTabFragment, LinearLayout pTopBarContainer, ImageView pSearchLock){
|
||||
void initialization(eventObserver.eventListener event, AppCompatActivity context, Button mNewTab, ConstraintLayout webviewContainer, TextView loadingText, AnimatedProgressBar progressBar, editTextManager searchbar, ConstraintLayout splashScreen, ImageView loading, AdView banner_ads, ImageButton gateway_splash, LinearLayout top_bar, GeckoView gecko_view, ImageView backsplash, Button connect_button, View pFindBar, EditText pFindText, TextView pFindCount, androidx.constraintlayout.widget.ConstraintLayout pTopLayout, ImageButton pVoiceInput, ImageButton pMenu, androidx.core.widget.NestedScrollView pNestedScroll, ImageView pBlocker, ImageView pBlockerFullSceen, View mSearchEngineBar, TextView pCopyright, RecyclerView pHistListView, com.google.android.material.appbar.AppBarLayout pAppBar, ImageButton pOrbotLogManager, ConstraintLayout pInfoLandscape, ConstraintLayout pInfoPortrait, ProgressBar pProgressBarIndeterminate, FragmentContainerView pTabFragment, LinearLayout pTopBarContainer, ImageView pSearchLock, View pPopupLoadNewTab){
|
||||
this.mContext = context;
|
||||
this.mProgressBar = progressBar;
|
||||
this.mSearchbar = searchbar;
|
||||
|
@ -142,6 +147,7 @@ class homeViewController
|
|||
this.mTabFragment = pTabFragment;
|
||||
this.mTopBarContainer = pTopBarContainer;
|
||||
this.mSearchLock = pSearchLock;
|
||||
this.mPopupLoadNewTab = pPopupLoadNewTab;
|
||||
|
||||
initSplashScreen();
|
||||
createUpdateUiHandler();
|
||||
|
@ -192,6 +198,25 @@ class homeViewController
|
|||
}
|
||||
}
|
||||
|
||||
public void onShowLoadTabDialog() {
|
||||
mPopupLoadNewTab.findViewById(R.id.pBlockerUndo).setVisibility(View.GONE);
|
||||
mPopupLoadNewTab.animate().cancel();
|
||||
mPopupLoadNewTab.setAlpha(0);
|
||||
mPopupLoadNewTab.setVisibility(View.VISIBLE);
|
||||
mPopupLoadNewTab.animate().setDuration(350).alpha(1);
|
||||
|
||||
final Handler handler = new Handler();
|
||||
handler.postDelayed(this::onHideLoadTabDialog, 2000);
|
||||
}
|
||||
|
||||
public void onHideLoadTabDialog() {
|
||||
mPopupLoadNewTab.findViewById(R.id.pBlockerUndo).setVisibility(View.VISIBLE);
|
||||
mPopupLoadNewTab.animate().cancel();
|
||||
mPopupLoadNewTab.animate().setDuration(350).alpha(0).withEndAction(() -> {
|
||||
mPopupLoadNewTab.setVisibility(View.GONE);
|
||||
});
|
||||
}
|
||||
|
||||
public void onShowTabContainer(){
|
||||
if(mTabFragment.getAlpha()==0 || mTabFragment.getAlpha()==1){
|
||||
mTabFragment.setVisibility(View.VISIBLE);
|
||||
|
@ -208,8 +233,8 @@ class homeViewController
|
|||
mTabFragment.animate()
|
||||
.setDuration(250)
|
||||
.alpha(0f).withEndAction(() -> mTabFragment.setVisibility(View.GONE));
|
||||
mEvent.invokeObserver(Collections.singletonList(status.sSettingSearchStatus), enums.etype.M_INIT_TAB_COUNT);
|
||||
}
|
||||
mEvent.invokeObserver(Collections.singletonList(status.sSettingSearchStatus), enums.etype.M_INIT_TAB_COUNT);
|
||||
}
|
||||
|
||||
public int getSearchLogo(){
|
||||
|
@ -684,9 +709,13 @@ class homeViewController
|
|||
private Handler searchBarUpdateHandler = new Handler();
|
||||
private String handlerLocalUrl = "";
|
||||
void onUpdateSearchBar(String url,boolean showProtocol, boolean pClearText, boolean pBypassFocus){
|
||||
if(url.equals(CONST_GENESIS_URL_CACHED) || url.equals(CONST_GENESIS_URL_CACHED_DARK)){
|
||||
|
||||
if(url.startsWith(CONST_GENESIS_URL_CACHED) || url.startsWith(CONST_GENESIS_URL_CACHED_DARK)){
|
||||
url = CONST_GENESIS_DOMAIN_URL;
|
||||
}
|
||||
else if(url.startsWith(CONST_GENESIS_HELP_URL_CACHE) || url.startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)){
|
||||
url = CONST_GENESIS_HELP_URL;
|
||||
}
|
||||
if(!mSearchbar.hasFocus() || pClearText || pBypassFocus){
|
||||
int delay = 0;
|
||||
handlerLocalUrl = url;
|
||||
|
|
|
@ -27,6 +27,13 @@ import java.util.Arrays;
|
|||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_DOMAIN_URL;
|
||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL;
|
||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE;
|
||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE_DARK;
|
||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED;
|
||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED_DARK;
|
||||
|
||||
public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
|
||||
{
|
||||
/*Private Variables*/
|
||||
|
@ -224,18 +231,26 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
|
|||
}catch (Exception ignored){}
|
||||
}
|
||||
|
||||
String mURL = model.getSession().getCurrentURL();
|
||||
if(mURL.startsWith(CONST_GENESIS_URL_CACHED) || mURL.startsWith(CONST_GENESIS_URL_CACHED_DARK)){
|
||||
mURL = CONST_GENESIS_DOMAIN_URL;
|
||||
}
|
||||
else if(mURL.startsWith(CONST_GENESIS_HELP_URL_CACHE) || mURL.startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)){
|
||||
mURL = CONST_GENESIS_HELP_URL;
|
||||
}
|
||||
|
||||
mItemSelectionMenu.setVisibility(View.GONE);
|
||||
if(model.getSession().getTitle().equals("$TITLE") || model.getSession().getTitle().toLowerCase().equals("loading")){
|
||||
mHeader.setText(helperMethod.getDomainName(model.getSession().getCurrentURL()));
|
||||
mHeader.setText(helperMethod.getDomainName(mURL));
|
||||
}else {
|
||||
mHeader.setText(model.getSession().getTitle());
|
||||
}
|
||||
mDescription.setText(model.getSession().getCurrentURL());
|
||||
mDescription.setText(mURL);
|
||||
mDate.setText(model.getDate());
|
||||
mWebThumbnail.setImageBitmap(model.getBitmap());
|
||||
|
||||
if(getLayoutPosition()==0){
|
||||
mEvent.invokeObserver(Arrays.asList(mWebThumbnail, model.getSession().getCurrentURL()), enums.etype.fetch_thumbnail);
|
||||
mEvent.invokeObserver(Arrays.asList(mWebThumbnail, mURL), enums.etype.fetch_thumbnail);
|
||||
}
|
||||
|
||||
if(mSelectedList.contains(model.getSession().getSessionID())){
|
||||
|
@ -260,21 +275,25 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
|
|||
mLoadSession.setOnClickListener(this);
|
||||
}
|
||||
|
||||
mItemSelectionMenuReference.animate().cancel();
|
||||
if(this.getLayoutPosition()==mModelList.size()-1){
|
||||
if(mSelectedList.size()>0){
|
||||
itemView.setVisibility(View.GONE);
|
||||
mLongPressMenuEnabled = true;
|
||||
try{
|
||||
mItemSelectionMenuReference.animate().cancel();
|
||||
if(this.getLayoutPosition()==mModelList.size()-1){
|
||||
if(mSelectedList.size()>0){
|
||||
itemView.setVisibility(View.GONE);
|
||||
mLongPressMenuEnabled = true;
|
||||
}else {
|
||||
itemView.setVisibility(View.VISIBLE);
|
||||
mLongPressMenuEnabled = false;
|
||||
mItemSelectionMenuButton.animate().cancel();
|
||||
mItemSelectionMenuButton.animate().setDuration(250).alpha(1);
|
||||
}
|
||||
}else {
|
||||
itemView.setVisibility(View.VISIBLE);
|
||||
mLongPressMenuEnabled = false;
|
||||
mItemSelectionMenuButton.animate().cancel();
|
||||
mItemSelectionMenuButton.animate().setDuration(250).alpha(1);
|
||||
}
|
||||
}else {
|
||||
itemView.setVisibility(View.VISIBLE);
|
||||
mLongPressMenuEnabled = false;
|
||||
mItemSelectionMenuButton.animate().setDuration(250).alpha(1);
|
||||
}catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@ public class constants
|
|||
|
||||
public static final String CONST_GENESIS_URL_CACHED = "resource://android/assets/homepage/homepage.html";
|
||||
public static final String CONST_GENESIS_URL_CACHED_DARK = "resource://android/assets/homepage/homepage-dark.html";
|
||||
public static final String CONST_GENESIS_ERROR_CACHED = "resource://android/assets/error/error.html";
|
||||
public static final String CONST_GENESIS_ERROR_CACHED_DARK = "resource://android/assets/error/error-dark.html";
|
||||
public static final String CONST_GENESIS_ERROR_CACHED = "error/error.html";
|
||||
public static final String CONST_GENESIS_ERROR_CACHED_DARK = "error/error-dark.html";
|
||||
public static final String CONST_GENESIS_DOMAIN_URL_SLASHED = "https://boogle.store/";
|
||||
public static final String CONST_GENESIS_REFERENCE_WEBSITES = "https://drive.google.com/uc?export=download&id=1lOmukKOPYHApBFyTDkaRPoAwm59E_YEE";
|
||||
public static final String CONST_GENESIS_DOMAIN_URL = "https://boogle.store";
|
||||
|
@ -30,7 +30,7 @@ public class constants
|
|||
public static final String CONST_GENESIS_GMT_TIME_GET_KEY = "pGlobalTimeVerificationToken";
|
||||
public static final String CONST_GENESIS_HELP_URL_CACHE = "resource://android/assets/help/help.html";
|
||||
public static final String CONST_GENESIS_HELP_URL_CACHE_DARK = "resource://android/assets/help/help-dark.html";
|
||||
public static final String CONST_GENESIS_HELP_URL = "https://boogle.store/help";
|
||||
public static final String CONST_GENESIS_HELP_URL = "https://genesis.onion/help";
|
||||
public static final String CONST_GENESIS_HELP_URL_SUB = "boogle.store/help";
|
||||
public static final String CONST_BACKEND_GENESIS_URL = "https://boogle.store/search?q=$s&p_num=1&s_type=all";
|
||||
public static final String CONST_BACKEND_GOOGLE_URL = "https://www.google.com/search?q=$s";
|
||||
|
|
|
@ -5,7 +5,7 @@ public class enums
|
|||
/*Settings Manager*/
|
||||
public enum etype{
|
||||
on_update_favicon,ON_UPDATE_TAB_TITLE, ON_LOAD_REQUEST,GECKO_SCROLL_CHANGED,ON_UPDATE_SEARCH_BAR,M_ON_MAIL,
|
||||
on_verify_selected_url_menu,FINDER_RESULT_CALLBACK,
|
||||
on_verify_selected_url_menu,FINDER_RESULT_CALLBACK,M_ADMOB_BANNER_RECHECK,
|
||||
welcome, reload,download_folder,M_ON_BANNER_UPDATE,M_INIT_TAB_COUNT,
|
||||
url_triggered, url_triggered_new_tab,url_clear,fetch_favicon, fetch_thumbnail,url_clear_at,remove_from_database,is_empty,M_HOME_PAGE,M_PRELOAD_URL,ON_KEYBOARD_CLOSE,
|
||||
on_close_sesson,on_long_press, on_full_screen,on_handle_external_intent,on_update_suggestion_url,progress_update,progress_update_forced, ON_EXPAND_TOP_BAR,recheck_orbot,on_url_load,on_playstore_load,back_list_empty,start_proxy, ON_UPDATE_THEME, M_INITIALIZE_TAB_SINGLE, M_INITIALIZE_TAB_LINK,on_request_completed, on_update_history,on_update_suggestion,M_WELCOME_MESSAGE,ON_UPDATE_TITLE_BAR,ON_FIRST_PAINT, ON_LOAD_TAB_ON_RESUME, ON_SESSION_REINIT,on_page_loaded,on_load_error,download_file_popup,on_init_ads,search_update, open_new_tab
|
||||
|
|
|
@ -24,7 +24,7 @@ public class dataEnums
|
|||
}
|
||||
|
||||
public enum eTabCommands{
|
||||
M_UPDATE_TAB, M_ADD_TAB, M_CLEAR_TAB,M_GET_SUGGESTIONS, CLOSE_TAB, GET_TAB, GET_CURRENT_TAB, GET_LAST_TAB, GET_TOTAL_TAB, MOVE_TAB_TO_TOP, M_UPDATE_PIXEL, M_HOME_PAGE
|
||||
M_UPDATE_TAB, M_ADD_TAB, M_CLEAR_TAB,M_GET_SUGGESTIONS, CLOSE_TAB, GET_TAB, GET_CURRENT_TAB,GET_RECENT_TAB, GET_LAST_TAB, GET_TOTAL_TAB, MOVE_TAB_TO_TOP, M_UPDATE_PIXEL, M_HOME_PAGE
|
||||
}
|
||||
|
||||
public enum eImageCommands{
|
||||
|
|
|
@ -161,6 +161,15 @@ class tabDataModel
|
|||
}
|
||||
}
|
||||
|
||||
tabRowModel getRecentTab(){
|
||||
if(mTabs.size()>0){
|
||||
return mTabs.get(1);
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
tabRowModel getLastTab(){
|
||||
if(mTabs.size()>0){
|
||||
return mTabs.get(mTabs.size()-1);
|
||||
|
@ -263,6 +272,9 @@ class tabDataModel
|
|||
else if(pCommands == dataEnums.eTabCommands.GET_CURRENT_TAB){
|
||||
return getCurrentTab();
|
||||
}
|
||||
else if(pCommands == dataEnums.eTabCommands.GET_RECENT_TAB){
|
||||
return getRecentTab();
|
||||
}
|
||||
else if(pCommands == dataEnums.eTabCommands.GET_LAST_TAB){
|
||||
return getLastTab();
|
||||
}
|
||||
|
|
|
@ -235,7 +235,7 @@ public class pluginController
|
|||
mHomeController.onManualDownload(pData.get(0).toString());
|
||||
}
|
||||
else if(pEventType.equals(M_OPEN_LINK_NEW_TAB)){
|
||||
mHomeController.onOpenLinkNewTab(pData.get(0).toString());
|
||||
mHomeController.postNewLinkTabAnimationInBackgroundTrigger(pData.get(0).toString());
|
||||
}
|
||||
else if(pEventType.equals(M_OPEN_LINK_CURRENT_TAB)){
|
||||
mHomeController.onLoadURL(pData.get(0).toString());
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/pToastLayoutRoot"
|
||||
android:translationZ="5dp"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/pMainLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:background="@xml/ax_background_inverted"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pDescription"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:alpha="0.6"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:text="@string/ALERT_OPEN_NEW_TAB"
|
||||
android:textAlignment="textStart"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/c_alert_text_inverted"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SmallSp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/pUndo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@xml/ax_ripple_default_round_right"
|
||||
android:padding="0dp"
|
||||
android:onClick="onLoadRecentTab"
|
||||
android:text="@string/ALERT_OPEN_NEW_TAB_LOAD"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/c_button_text_v1_inverted"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pBlockerUndo"
|
||||
android:visibility="visible"
|
||||
android:layout_width="match_parent"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:layout_height="55dp"
|
||||
android:translationZ="211dp"
|
||||
android:contentDescription="@string/GENERAL_TODO"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/pMainLayout" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -48,7 +48,7 @@
|
|||
android:layout_weight="1"
|
||||
android:background="@xml/ax_ripple_default_round_right"
|
||||
android:padding="0dp"
|
||||
android:onClick="onRestoreTab"
|
||||
android:onClick="onLoadRecentTab"
|
||||
android:text="@string/ALERT_UNDO_TAB_REMOVE_BUTTON"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/c_button_text_v1_inverted"
|
||||
|
|
|
@ -761,6 +761,12 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<include
|
||||
android:id="@+id/pPopupLoadNewTab"
|
||||
layout="@layout/popup_load_new_tab"
|
||||
android:translationZ="5dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/mTabFragment"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -257,6 +257,8 @@
|
|||
<string name="ALERT_DATA_CLEARED_INFO" translatable="true">Private data cleared successfully. Some default settings will require application to restart. Now you can safely continue browsing</string>
|
||||
<string name="ALERT_UNDO_TAB_REMOVE_INFO" translatable="true">Tab Closed</string>
|
||||
<string name="ALERT_UNDO_TAB_REMOVE_BUTTON" translatable="true">Undo</string>
|
||||
<string name="ALERT_OPEN_NEW_TAB" translatable="true">New tab opened</string>
|
||||
<string name="ALERT_OPEN_NEW_TAB_LOAD" translatable="true">Switch</string>
|
||||
|
||||
<!-- Privacy Policy -->
|
||||
<string name="PRIVACY_HEADER" translatable="true">Privacy Policy</string>
|
||||
|
|
Loading…
Reference in New Issue