We have moved to a new Sailfish OS Forum. Please start new discussions there.
37

Browser home page. [released]

asked 2014-01-22 00:37:22 +0300

ApB gravatar image

updated 2014-06-11 22:38:19 +0300

ssahla gravatar image

The page when you open the browser is jolla.com. Is there a way of having an empty tab or set a personal page.

I would prefer if this was/is possible without enabling developer mode or sshing into the phone. Not that i have a problem with this approach but for the moment i don't want to do it this way.

edit retag flag offensive reopen delete

The question has been closed for the following reason "released in a software update" by ssahla
close date 2014-12-19 22:15:32.607317

Comments

I have not tried it yet, because I use ssh, but when you access the storage per usb, you get access to your home directory where the .mozilla folder is. You can edit the "pref.js" file in the 'mozembed' folder and look for the startpage settings. You can compare those with you own firefox settings.

Edit: I have not found any startup settings in my pref.js file. Maybe you have to add them to overwrite the default ones.

Should be:

user_pref("browser.startup.homepage", "https://duckduckgo.com");

But I have not tried it.

PyroDevil ( 2014-01-22 00:42:26 +0300 )edit
2

Being able to have the browser start with an empty tab, would also save some power and network traffic.

Since in most cases starting the browser means needlessly loading jolla.com or whichever site you happened to have open when you closed the browser.

cb400f ( 2014-02-02 12:49:04 +0300 )edit
3

I'd like to see an about:home page similar to Firefox, a static page loaded locally with a search bar.

Tested the browser.startup.homepage setting, it doesnt work. Theres something else going on, jolla.com still opens even though I have a different page set.

vasavr ( 2014-02-12 09:49:31 +0300 )edit

Is it hard-coded in the browser?

IZ1IVA ( 2014-02-12 18:39:07 +0300 )edit
1

Judging from the fact browser.startup.homepage does nothing, yes.

vasavr ( 2014-02-12 21:01:50 +0300 )edit

4 Answers

Sort by » oldest newest most voted
12

answered 2014-08-17 20:40:43 +0300

mordae gravatar image

Please remove the "default page" altogether. It does not make any sense and only serves to slow the user down by downloading unnecessary payload at the moment the browser is opened. The preferred behaviour is to show user's bookmarks and a search / address bar.

Or kill the browser completely and get a standard one.

edit flag offensive delete publish link more
3

answered 2014-12-19 22:14:47 +0300

ssahla gravatar image

Just noticed that this has been implemented in update 9 or 10 (?). You can change the home page in Settings > Apps > Browser.

(It would be nice to also have the option to skip the home page so that Browser opens straight to my bookmarks. Putting "about:bookmarks" as the home page doesn't work. Is there some other workaround to achieve this?)

edit flag offensive delete publish link more
2

answered 2014-06-11 21:44:52 +0300

ApB gravatar image

updated 2014-06-11 22:14:28 +0300

OK. The browser doesn't load jolla.com in the beginning however it got a bit of a weird behavior.

Clear everything from Settings>Apps>Browser>Privacy and start the browser.

It first puts on the screen a blank page and after a delay it goes to an enter adress page.

If you haven't cleared anything from privacy it starts with a blank page and then after a delay it loads the last open page.

The delay MUST go.

Edit: The first time after you clear everything it takes you to the address page (after a delay). If you close and open the browser again it takes you to jolla.com.

edit flag offensive delete publish link more

Comments

1

Still loads jolla.com for me if no page previously open. I haven't cleared Privacy.

ssahla ( 2014-06-11 21:59:19 +0300 )edit
1

Hmmm. There is more weird behavior. Clear everything go to the store and click the url of an app.

ApB ( 2014-06-11 22:11:27 +0300 )edit

@ApB, I tested that. Cleared everything. First time I tapped an url in the store, Browser was opened with "enter address" page. After that, Store urls seem to open as expected.

And jolla.com still opens when launching with no previous tabs open...

Edit: Ok, it seems that clearing privacy stuff affects next launch of Browser...

ssahla ( 2014-06-11 22:20:22 +0300 )edit

Do you get the delay?

ApB ( 2014-06-11 22:30:23 +0300 )edit

Yes. Blank white browser view for a sec or two, then the address page.

ssahla ( 2014-06-11 22:34:32 +0300 )edit
2

answered 2014-09-15 12:49:20 +0300

cjb gravatar image

To change the home page for the web browser, ssh into your phone. (you could use the terminal too)

Then type devel-su and press enter to get root (password will be needed).

Now type vim /usr/share/jolla-settings/pages/browser/browser.qml and press enter.

Find the line that says 'title: qsTrId("settings_browser-ph-browser")'

Go down one line

Press 'o'

Copy and paste this:

           TextField {
                id: homePage

                width: parent.width
                //: Label for home page text field
                //% "Home Page"
                label: qsTrId("settings_browser-la-home_page")
                text: homePageConfig.value
                placeholderText: homePageConfig.defaultValue
                inputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhNoAutoUppercase | Qt.ImhUrlCharactersOnly

                onTextChanged: homePageConfig.value = text || placeholderText

                EnterKey.iconSource: "image://theme/icon-m-enter-close"
                EnterKey.onClicked: focus = false
            }

Now press 'esc'.

Then go to the very bottom of the file

Press 'shift+o'

Copy and paste this:

    ConfigurationValue {
        id: homePageConfig

        property bool edited

        key: "/apps/sailfish-browser/settings/home_page"
        defaultValue: "http://jolla.com/"

        // Set homePage TextField when text field first time edited
        onValueChanged: {
            if (!edited) {
                homePage.text = value
                edited = true
            }
        }
    }

Now press 'esc' and type w then press enter.

Next go to the Settings app on the phone. Tap 'Apps' and then tap 'Browser' and change the homepage. Now close all tabs in the browser and open it again. It should load the homepage you just set. If it does not go back to you terminal and press 'u' until you are at the oldest change. Then press 'esc' and type x and press enter. That way there are no changes made to the file.

Thanks to siteshwar for his commit on github for the code. https://github.com/sailfishos/sailfish-browser/commit/1c99ee31007f88ceccd7827674a69854517fba0a

edit flag offensive delete publish link more

Comments

Since he pushed it in github does it mean we'll get it in update 9 or maybe 10?

ApB ( 2014-09-15 13:09:18 +0300 )edit

@ApB I don't know. To me it seems unlikely that they would do another release without homepage support.

cjb ( 2014-09-15 14:09:48 +0300 )edit

@veskuh will answer if he sees this i believe ;)

ApB ( 2014-09-15 14:19:07 +0300 )edit

I asked in irc and this is what I got:

21:11 < cjbayliss> situ: do you know if homepage support in the browser is going to be included in the next release?

21:14 < situ> cjbayliss: I think so.

21:15 < situ> veskuh: ^ Can you confirm this ?

21:16 < veskuh> situ, cjbayliss it missed the integration deadline for the next update, so should be one after that.

cjb ( 2014-09-15 14:45:10 +0300 )edit

Update 10 it is then :). Thanks.

ApB ( 2014-09-15 14:47:27 +0300 )edit

Question tools

Follow
8 followers

Stats

Asked: 2014-01-22 00:37:22 +0300

Seen: 1,270 times

Last updated: Dec 19 '14