Hi Danielo, I also though about starting the ajax automatically when the tiddler is > displayed, but I was not sure on how to implement it. A hidden widget maybe > can be a solution. I don't understand why do you consider better getting > via DOM selection.
The problem with a hidden widget is that it cannot retrieve the current tiddlers title. So it would be better to create a plugin that checks during refresh() if "$:/StoryList" is in changedTiddlers and then checks which tiddlers where opened and have not been downloaded yet. > Also I think the less queries to the server the less chances to kill my > quota. Maybe is not so bad for the user to click the download button. > hehe well, I didnt even know that google drive has a quota. But I think you should not mind the quota. I mean it is more important to have high usability (ajax automatically started) instead of optimizing for a quota. > > About your second suggestion I think your latest idea is the best one. How > can that list be built and where should I store it? Maybe a event listener > that listens to tiddler changes is the way construct such list. I'm not > very familiar with that kind of event listeners and I'm not sure what kind > of information do they receive. What do you think? Here is an idea how it could be implemented 1. When the wiki starts, your plugin loads a tiddler via ajax which contains all the names of tiddlers in a json format (an array with all names). You save this tiddler as $:/pluginpath/downloadedTiddlers 2. Everytime during a refresh inside your widget's refresh function (or if you are in a startup module inside you change listener) you check if a tiddler has been changed that was also inside that list (use wiki.getTiddlerList() or for json stuff wiki.getTiddlerData()). if yes, you either upload it directly or save it into a new list tiddler and upload it later. Good night Felix -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/tiddlywikidev. For more options, visit https://groups.google.com/d/optout.
