AgregoreWeb / agregore-browser

A minimal browser for the distributed web (Desktop version)
https://www.youtube.com/watch?v=TnYKvOQB0ts&list=PL7sG5SCUNyeYx8wnfMOUpsh7rM_g0w_cu&index=14
GNU Affero General Public License v3.0
741 stars 66 forks source link

View History page #140

Open RangerMauve opened 2 years ago

RangerMauve commented 2 years ago

The history extension should add a "view history" page somewhere. It should be served from the extension's path and should have a way to list the history in chronological order.

We should regsiter a button somewhere to open this page. Might be worth it to make it a raw action and to make a window that doesn't have window chrome.

Arskan17 commented 10 months ago

Have any Idea where one could start from? Maybe some documentation, or some prerequisites ?

RangerMauve commented 10 months ago

Thanks for taking a shot! :)

First you'll want to get acquainted with the codebase. Here's where the history extension lives: https://github.com/AgregoreWeb/extension-agregore-history

If you open up agregore then go to Help > Open Extensions Folder you should see the local version of the extension if you want to tinker with it directly.

This is how the search bar talks to the history extension: https://github.com/AgregoreWeb/agregore-browser/blob/master/app/history.js

Likely you'll want to add a new page to the extension like view.html which imports agregore's built in styles at agregore://theme/style.css

From there you'll need to make a search through the indexdb database and render the results in a list of <a> tags with the title being the text and the url being the href property so that the link could be visited.

From there you might want to limit to the last 128 results or something and have a "show more" button to render more items.

Please only use vanilla JavaScript with custom elements and no dependencies except the existing idb.js library.

Does that sound like enough info to get you started?