Lightning-Browser
Lightning-Browser copied to clipboard
set default url after opening browser
how can i set single page such as https://github.com
after opening browser without get request from user?
If you mean a homepage then it's in the General Settings page - just click 'homepage' then 'webpage' then paste in the URL you want. Hope this helps
can i set that programmatically?
@MahdiPishguy : Yes The catch... Settings > General settings > Homepage > Webpage (when click "OK" popups a windows where put a URL)
Go to GeneralSettingsFragment.kt and replace "https://www.google.com/" with your URL. (Found somewhere between line 370 to 380)
Then go to LightningView.kt and find(Starts on line 235 onwards):
when (requireNotNull(homepage)) {
SCHEME_HOMEPAGE -> loadStartPage()
SCHEME_BOOKMARKS -> loadBookmarkPage()
else -> webView?.loadUrl(homepage, requestHeaders)
Remove SCHEME_HOMEPAGE and SCHEME_BOOKMARKS like this:
when (requireNotNull(homepage)) {
else -> webView?.loadUrl(homepage, requestHeaders)
Done. ^^