Live data from Hacker News

Show HN: Custom New Tab page for Firefox

github.com

21–30 of 31 posts

Re: Show HN: Custom New Tab page for Firefox

#23

Looks fantastic. It did take a few minutes to get forked over and modify for location, °F instead of °C, etc. Perhaps a future version could use a config.js or something that would just swap those. For the record, you want to edit js/scripts/controllers.js and js/scripts/view/dashboard.html . Replacing Helsinki in the openweathermap.org link with your plain text city name seems to work. For Fahrenheit, replace the "v…

Similarly, if you prefer the American date format you can change the two $scope.text lines near the end of controllers.js to

  $scope.text = "Good " + $scope.getStateOfDay(moment().get('hour')) + ", today is " + moment().format('dddd MM/DD/YYYY') + ".";
which looks like 'Thursday 03/12/2015'; or you can change both lines to

  $scope.text = "Good " + $scope.getStateOfDay(moment().get('hour')) + ", today is " + moment().format('dddd, MMMM DD, YYYY') + ".";
which looks like 'Thursday, March 12, 2015'.

Re: Show HN: Custom New Tab page for Firefox

#27
I'm the author of the cited add-on: Custom-New-Tab (https://addons.mozilla.org/en/firefox/addon/custom-new-tab/). Thank you so much for promoting it jakke (OP)! Just wanted to quickly respond to the few comments in this thread about my addon.

- It doesn't work for FF on Android (I have never looked into it).

- It's true that setting browser.newtab.url does achieve similar functionality but only Custom-New-Tab properly places the focus!

- CNT can fix your "blanking the URL" problem. Check out the preferences.

Re: Show HN: Custom New Tab page for Firefox

#28

This is a really cool start! In the future, I'd love to be able to set preferences and save them to local storage. (For example, it would be nice to be able to set date formatting or location.) I know I could grab a copy of the code and then change those things myself, but then upgrades would be a pain. Overall, though, good stuff!

Thanks! I've now added basic level customization from user.json, supports location but I'll work on the date time formatting also in near future.

Re: Show HN: Custom New Tab page for Firefox

#30
post #7

An issue I've found is that the URL stays in the address bar. This seems to be caused by Angular adding "#/" to the page URL after it is loaded - any idea how to fix this?

Be sure to link it to the #/ address if you're using the plugin. I had the same problem, this is because the router is redirecting all to the #/-address.

I ended up rewriting the page without any JS frameworks - now it's a lot more compact. Index.html: http://pastebin.com/EwUDuhYG
Post reply on HN