Skip to content
This repository has been archived by the owner on Jul 8, 2021. It is now read-only.

portal mods (js include) #38

Open
ruby0x1 opened this issue Oct 19, 2017 · 7 comments
Open

portal mods (js include) #38

ruby0x1 opened this issue Oct 19, 2017 · 7 comments
Labels

Comments

@ruby0x1
Copy link
Member

ruby0x1 commented Oct 19, 2017

I've got some ideas kicking around for this, initially as a simple scripts/custom.js with a hook function(rotonde) {} but that could probably be specialized into specific mods.

As an example of a specialized mod: the idea of an embed (youtube video, pico8.com game, instagram post - whatever) being a drop in module that someone provides for portals to opt into. It is important that the fallback remain legible valid for this type of entry, but in my feed, I opt to view custom types of content in my own way. something like scripts/embed/youtube.js. These might also want a css and maybe even images/assets, so maybe embeds/<type>/*.

I'll try to formalize how I see this structured soon but opening discussion @cblgh @neauoire

@neauoire
Copy link
Contributor

Rotonde apps is the future of decentralized web. I could see people building discussion toolkits for sharing specific video game statistics, or $search and $crawl bots. I think appended custom.js files could build up a collection on r.services.search = function(p,option), invokable through the operator.

@ianh
Copy link
Collaborator

ianh commented Oct 19, 2017

How much do we want to support customizing the look of the feed itself? I've just ported a few customizations over from the old architecture, but in a very ad-hoc way (see dat://278a6181c1e488137ff1117255cfb20e48bf0f6223f5e63db8763912f3db9529/) -- it seems like there should be a cleaner way to do it. Or is forking the client code the right way to make these sorts of modifications?

@ruby0x1
Copy link
Member Author

ruby0x1 commented Oct 19, 2017

how much of that is css vs js @ianh?
(The custom css is already implemented portal side, just edit links/custom.css in your portal)

@neauoire
Copy link
Contributor

neauoire commented Oct 19, 2017

I think that we don't need to do any changes to the core client(besides adding custom.js, or service.js to the includes) to allow for this, @ianh, maybe just wait for @underscorediscovery's proof-of-concept. My only fear with this pattern is security, someone could build a service that deletes your feed and so on. But at least beaker has history and revisions.

@ianh
Copy link
Collaborator

ianh commented Oct 19, 2017

The changes are all to the JS (you can see for yourself at that address).

@ianh
Copy link
Collaborator

ianh commented Oct 19, 2017

And yeah, at some point we should do an audit for security. I think you can already delete someone's feed by embedding evil JavaScript into your name, for example!

@composition4
Copy link

would the use of shadowing help with custom.js?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants