The "Download Empty" button in the wiki page does not work in my app. I'm not sure whether this function can be handled by injecting js, just like saving function handled by TiddlyFox or TiddlyDesktop. The button invokes an method in $:/core/modules/widgets/action-sendmessage.js, which will pass an url begins with "blob:" to the browser, but WebView won't support this scheme. I'm now finding a way to change the blob things to a base64 string so that I can decode it to a byte array. Anyone can help? :-)
--
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 tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/c32330c5-74a7-4aad-9d3f-cee8a11eda6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
var enableSaving = function(doc) { var messageBox = doc.createElement("div"); messageBox.id = "tiddlyfox-message-box"; doc.body.appendChild(messageBox); messageBox.addEventListener("tiddlyfox-save-file",function(event) { var message = event.target, filepath = message.getAttribute("data-tiddlyfox-path"), content = message.getAttribute("data-tiddlyfox-content"); window.client.saveWiki(filepath,content); message.parentNode.removeChild(message); var event = doc.createEvent("Events"); event.initEvent("tiddlyfox-have-saved-file",true,false); event.savedFilePath = filepath; message.dispatchEvent(event); return false; },false); }; enableSaving(document);Hi Donmor
The "Download Empty" button in the wiki page does not work in my app. I'm not sure whether this function can be handled by injecting js, just like saving function handled by TiddlyFox or TiddlyDesktop. The button invokes an method in $:/core/modules/widgets/action-sendmessage.js, which will pass an url begins with "blob:" to the browser, but WebView won't support this scheme. I'm now finding a way to change the blob things to a base64 string so that I can decode it to a byte array. Anyone can help? :-)Just to be clear, does ordinary saving work in your app? Have you injected a custom saver?Downloads are handled by the same saver module mechanism that we use for saving, but with the “method” parameter to the saver passed as “download” instead of “save” or “autosave”.Perhaps you can share some more details of how your app is working at the moment?Best wishesJeremy
--
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 tiddly...@googlegroups.com.
It seems that the code provides no downloading interface. The only thing they do is to get the content of current page.
在 2019年4月27日星期六 UTC+8下午9:49:39,Jeremy Ruston写道:Hi DonmorThe "Download Empty" button in the wiki page does not work in my app. I'm not sure whether this function can be handled by injecting js, just like saving function handled by TiddlyFox or TiddlyDesktop. The button invokes an method in $:/core/modules/widgets/action-sendmessage.js, which will pass an url begins with "blob:" to the browser, but WebView won't support this scheme. I'm now finding a way to change the blob things to a base64 string so that I can decode it to a byte array. Anyone can help? :-)Just to be clear, does ordinary saving work in your app? Have you injected a custom saver?Downloads are handled by the same saver module mechanism that we use for saving, but with the “method” parameter to the saver passed as “download” instead of “save” or “autosave”.Perhaps you can share some more details of how your app is working at the moment?Best wishesJeremy--
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 tiddly...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/c32330c5-74a7-4aad-9d3f-cee8a11eda6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.--
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 tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/60be369a-539e-4050-a411-cc11cd39b739%40googlegroups.com.
Thanks a lot! I managed to enable the green button, though it fails if the tiddler in the button is changed.
BTW what kind of public license should I use with my app? Is it OK to use GPLv2? Here's my git url: https://github.com/donmor/Tiddloid
--
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 tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/8a226322-e4f8-4245-b2fc-ed701373ed17%40googlegroups.com.
<$button class="tc-btn-big-green"><$action-sendmessage $message="tm-download-file" $param="$:/editions/tw5.com/download-empty" filename="empty.html"/>Download Empty {{$:/core/images/save-button}}</$button>Hi Donmor
Thanks a lot! I managed to enable the green button, though it fails if the tiddler in the button is changed.Can you show the relevant code?BTW what kind of public license should I use with my app? Is it OK to use GPLv2? Here's my git url: https://github.com/donmor/TiddloidYes, but I personally favour BSD because it places fewer obligations on the user and thus improves adoption.Best wishesJeremy
--
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 tiddly...@googlegroups.com.