ProTipHQ / ProTip

A browser extension for tipping, donations, and peer-to-peer crowd-funding
https://protip.is
GNU General Public License v3.0
96 stars 15 forks source link

Javascript Plugin #6

Closed opn closed 8 years ago

opn commented 9 years ago

This is a question about the local storage used by ProTip, and whether / how easy it would be to create a Javascript library that could be added to a web site that would write to exactly the same ProTip storage as the Chrome Extension does.

The proposed scenario is as follows: visitors to a particular web site, given that they are signed in and have given their consent to the web site concerned, allow Javascript downloaded from the origin web site to write a time record of how long a viewer has visited the page to the very same storage as ProTip?

This is not going to be very useful for normal web sites - as each web site would need to add the same javascript library - but with a Fedwiki site this works as the origin site - once loaded pull in Javascript pages form multiple sites and multiple pages on multiple sites as you browse around the Federation. The use case here is to reward different contributors depending on who reads what - but all within the Federation of Fedwiki sites - and without the need for installing an extension - it's simply built into your own research / writing space - and tracks the time you spend reading people stuff in the Federation.

What would be great is if you also had the Chrome Extension version of ProTip - that the two data sets were combined in your browsers local storage. And you could use ProTip Chrome Extension to display the top 10 sites across both the Federation and general internet.

So my question are:

  1. Can client side Javascript and ProTip Chrome extension share the same storage / data structures?
  2. Is the ProTip code structured in such a way that it would re-using elements of it for Fedwiki JavaScript plugin? Or would we have to start again from scratch?

For the latter point - I was thinking it might be cool to organise a Hangout with Ward and have an hours hack - looking at how the ProTip code works and Fedwiki plugin architecture works - and make a simple start with creating a node module?

Leo-ajc commented 9 years ago

I'd like to hear more about FedWiki. Let's do a hangout. How about tomorrow sometime?

opn commented 9 years ago

That would be great - any time tomorrow is good. We also have a Hangout with Ward each Weds 6pm GMT?

Leo-ajc commented 9 years ago

Let's do it with Ward on Wednesday then. I'll see if Chris is free.