deepjyoti30 / startpage

A minimal starpage for Chrome and Firefox
MIT License
625 stars 85 forks source link

editing config.json when searchbar is hidden #30

Closed rusty-electron closed 4 years ago

rusty-electron commented 4 years ago

I ran into this funny situation(bug?) where I disabled the searchbar in the configs and now I can't access the --setting. I tried searching manually for extension data in brave browser's user folder but couldn't find any config.json file there.

I guess I can manually reinstall the extension and then add my custom config but is there any other way? If not I think it would be a good feature.

deepjyoti30 commented 4 years ago

@rusty-electron Yeah I am aware of that. That was known back when I was implementing the key. According to #29 , we are thinking of adding a settings button on the down left which will again be optional. Perhaps I can also add something like a keybinding to open up the settings.

But, I was surely, aware of this issue. Initially there was no option to disable the search bar so this wasn't thought of. Also, you can install it manually. It's pretty simple to do that on chromium based browsers. Once you have it installed manually, you'd be able to make changes to the local config, however, it might still not change startpage since startpage uses localStorage to store the config.

rusty-electron commented 4 years ago

The idea of adding a keybinding for the settings page seems nice. I will lookout for the fix.

Also, is it possible to access the config.json file within the browser (or filesystem) in order to modify it?

deepjyoti30 commented 4 years ago

@rusty-electron Sure, you can access the config from the browser. Considering you know the basics of JS, you can use the following.

So, the config is a JSON object and it is stored in the Browsers storage.

Open a new tab and assuming you have startpage installed, open the developer tools using Ctrl+Shift+I.

You'll get the console. Type the following command to get the config stored in the browser.

var config = {}; // To store the object.

BROWSER.storage.sync.get(r => {config = r;});

You can now make changes to this config. If you want, you can even copy it, paste in some json file and make changes.

Once, you're done, use the following to save the config.

BROWSER.storage.sync.set(config);

Once, done, just reload the tab and you should see the changes.

deepjyoti30 commented 4 years ago

@rusty-electron Consider taking a look at c536886eb9372a5078018ec75069251138a2ec11

If you want you can try it out. It adds the ctrl+, (ctrl plus comma) key to open settings.

@reesericci Seems like we can drop the settings icon since this keybinding will be a nice addition, what do you say?

rusty-electron commented 4 years ago

@deepjyoti30 Both methods work perfectly. Thanks! 😁👌

I have just one more request, please add some bottom margin to the squares as they stick together in smaller windows sizes.

deepjyoti30 commented 4 years ago

@rusty-electron Can you gimme some screenshots of this bottom-margin issue??

rusty-electron commented 4 years ago

@deepjyoti30 Here you go

image

deepjyoti30 commented 4 years ago

@rusty-electron Got it. Will look into it. Thanks!

You rice BTW?

rusty-electron commented 4 years ago

Yah, just got into ricing a month back. I found your project via r/unixporn.

deepjyoti30 commented 4 years ago

@rusty-electron Cool, welcome to ricing :smile:

The margin issue should be fixed in c536886

I'll be making a release soon. Been a lot of changes since the last release.

rusty-electron commented 4 years ago

thanks, the recent commit fixed it 😁.