Lightning-Browser icon indicating copy to clipboard operation
Lightning-Browser copied to clipboard

set default url after opening browser

Open pishguy opened this issue 7 years ago • 4 comments

how can i set single page such as https://github.com after opening browser without get request from user?

pishguy avatar Apr 26 '17 09:04 pishguy

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

mtbu avatar Apr 26 '17 10:04 mtbu

can i set that programmatically?

pishguy avatar Apr 26 '17 17:04 pishguy

@MahdiPishguy : Yes The catch... Settings > General settings > Homepage > Webpage (when click "OK" popups a windows where put a URL)

sefernet avatar Sep 12 '17 20:09 sefernet

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. ^^

razorcrackers avatar Oct 08 '18 22:10 razorcrackers