Closed MoOx closed 10 years ago
All this feature have one thing in common: it will increase the complexity of the page. This not a problem: it's a choice to make. Will this page stay basic ? or we want to really be customisable/have a more functionalities ? If yes, it will be needed to refactor the code be compliant with.
Yep, true. Do we want to customise everything or just want a random image generator?
You don't get my point. My point is just to make a external script loader (so users can code their custom stuff). This should take just a bunch of lines. Not that much.
Anyway, build + test are inevitable if project get customisation gui.
The page must stay basic, I think it is a great feature of the projet. However, adding a very simple way to add custom behaviour should be quite simple.
I've been thinking about this a litte bit and here is what I propose:
loadPlugin
function that can load files from an extra
folder in this repo.This way, we can ship custom plugins directly in this repo, and users can still add their custom behaviour.
Here's an hypothetical example of what I mean:
loadPlugin("speed-dial") // #18
loadPlugin("pretty-clock") // #27
console.log("OMG THIS IS MY CUSTOM SCRIPT")
Also, I think custom scripts should be able to add settings options to the modal, so we should make the settings manager able to handle this fact
I think we should really keep this simple for now & just support injected script from url or localstorage. Maybe offer a simple generic api (widget position ? configurable field ?) is a nice idea.
For now this issue should just correspond to script(s) injection. What about handling /?scripts=url1.js,url2.js&styles=url1.css ?
For config, I would like to be able to share my config with a simple url (this is a nice feature isn't it ?) But this is more something we should handle (url + localstorage) in #12
Ref #18