@Felix : thank you a lot, indeed. I've used $tw.browser.

And now, the version 1.0 of the plugin is officially available to try and
download at
http://snowgoon88.github.io/TW5-extendedit

And the source is at
https://github.com/snowgoon88/TW5-extendedit/

Enjoy, comment and critic :o)
Alain


On Mon, Dec 28, 2015 at 3:02 PM, Felix Küppers <[email protected]>
wrote:

> Hi Alain,
>
> because, I guess, the global var *window* is only defined if using a
> browser.
>
> What is the usual way of dealing with this within node.js ??
>
>
> It is not good style that the lib assumes the window object exists while
> it is loaded. Not sure how you can solve this.
>
> I would suggest you replace the occurence of isFirefox (
> https://github.com/snowgoon88/TW5-extendedit/blob/df28ef2044a24cb4804af2037719ec08c7b68640/files/cursor-position.js#L91)
> with window.mozInnerScreenX != null; and remove the variable so it is
> only evaluated at runtime.
>
> Maybe @Jeremy or somebody else can provide a better answer.
>
> Also have a look at the use of $tw.browser in some of the tw lib plugins:
>
>
> https://github.com/Jermolene/TiddlyWiki5/blob/72941f3e9a916948222ff7be540d896e2b1901f6/plugins/tiddlywiki/codemirror/edit-codemirror.js#L31
>
> In startup modules you usually say:
>
> exports.platforms = ["browser"];
>
> Good luck.
>
> -Felix
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "TiddlyWikiDev" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/tiddlywikidev/BXGldH6YK78/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> 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/BLU436-SMTP1918D965DE0BF203778755BCEFB0%40phx.gbl
> <https://groups.google.com/d/msgid/tiddlywikidev/BLU436-SMTP1918D965DE0BF203778755BCEFB0%40phx.gbl?utm_medium=email&utm_source=footer>
> .
>
> 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 [email protected].
To post to this group, send email to [email protected].
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/CAFF9YEGd_XDA6H6K6nk33WXNgSPVZSJX0WQmcA1k0VmyCMgbuw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to