A little useful or a very distracting NewTabPage. Also Supports Dark Mode.
- Poster
- Current Time
- Kanji
- Book Reader
- Quote
- News
- Icon Links
Poster Tab shows the random image it will fetch from ./media/images/
folder and all the images should be renamed to numbers starting from zero. The noOfImages
varibale in the index.js
should be set to the number of images you have in the ./media/images/
folder.
There can a better way of doing this by having a sinlge json file in the folder with the links of all the images and the reason I didn't did it that way was because it will fetch, process, select and send a request to other server every time i will open my NewTab. So i just download the images with enough resolution in the fodler and run a simple python script to rename and change the noOfImages
variable for me.
Kanji Tab shows a random kanji vocabulary by fetching a single json file from the ./media/vocab/
folder. I scraped a vocabulary list from a website and separated each with its own file ordering them all in numbers from 0 and so on. The reason to separate all into their own files is to not fetch and process the whole file every time a NewTab is opened. You also have to change the noOfKanjiVocabFiles
variable according to the files you have in the folder.
Book Reader shows the current chapter of the book you are reading. I took a PDF book and then using Ptyhon separated the book into smaller 300 words chapter and stored them in json files. Then fethced the current chapter and stored that number in the window.localStorage("chapter")
varibale.
The next button will change the chapter number and also the window.localStorage("chapter")
variable. Same goes for noOfChapters
variable in the index.js
.
News tab fetches new stories from the HackerNews API and only shows the first 25 news stories from the response
For quotations there is a json file which it fetches from the ./media/
and injects a random one from the list.
This lists displays all the most common website that i visit.
Color Scheme is taken from Apple's Website
Constributions to make it as much better as possible are welcomed.