fortune

A minimalist browser extension that displays a new quote in the browser tab. For example, when you open a new tab, you will see quotes like this:


"And this is aviation; I give it to the world." - Louis Mouillard, French Inventor/Aeronaut (1834-1897)

"We were on the point of abandoning our work when the book of Mouillard fell into our hands, and we continued with the results you know." - Wilbur Wright, American Inventor/Aviator (1867-1921)


This extension is named after popular Unix Program Fortune_(Unix) fortune is a program that displays a pseudorandom message from a database of quotations. , a command line utility which displays quotes in the shell. The browser with tabs is a modern shell interface of the computer. And this is the fortune program for the browser.

Technical Details

I developed this with Python hosted on Google App Engine, and the client side written using Javascript as a browser addon. In the backend there is a database where I keep the quote and author in a table. There is API call that returns the quote and the author in the JSON format. To call the API visit http://quotes-1271.appspot.com/json . This is an unauthenticated API as it read-only GET call, and cannot change the state of the system.

The client side is entirely handled by Javascript, and it displays the quote using simple Document_Object_Model The Document Object Model (DOM) is a cross-platform and language-independent API that treats an HTML or XML document as a tree structure wherein each node is an object representing a part of the document. The DOM represents a document with a logical tree. Each branch of the tree ends in a node, and each node contains objects. DOM methods allow programmatic access to the tree; with them one can change the structure, style or content of a document. Nodes can have event handlers (also known as event listeners) attached to them. Once an event is triggered, the event handlers get executed. manipulation.

Get the extension directly from the webstore

Screenshot

screenshot

Video Demo

Demo