How to make an html piece of code workable inside tiddlywiki?

135 views
Skip to first unread message

oleghbond

unread,
Jan 30, 2020, 3:57:29 PM1/30/20
to tiddl...@googlegroups.com
Dear tiddlymates, please advise me how to make the following html piece of code workable inside tiddlywiki:

<a href="#" id="bug_tracker">Leave a message about an error</a>
<script type="text/javascript">
BugTracker = {
 group_project
: "https://nauprof.freedcamp.com/NAUPROF_xxx/SOLVEIT_yyy/bugtracker/bugtracker_public",
 
Button: [document.getElementById('bug_tracker')]
}
</script>
<script type="text/javascript" src="https://cdn.freedcamp.com/project_apps/bugtracker/js/bugtracker_public.js"></script>

It works well into single static html-file when I put it between <html><body> and </body></html>

Thanks in advance

TonyM

unread,
Jan 31, 2020, 12:35:01 AM1/31/20
to TiddlyWiki
oleghbond,

I am afraid script does not work in tiddlywiki this way. To introduce you need to create a widget that complies with tiddlywiki's requirements. 
When things occur in tiddlywiki it will automatically update the change whereever needed, this is why you need to use tiddlywikis methods.
Also just imagine if anyone could code any javascript live on your website, it would be a hackers dream. 
So the fact you need to save and reload means you must have write access to embed script beyond html

Can you tell me what this does because perhaps I could provide a tiddlywiki alternative.

Also look for the information about the raw tags, this allows the content of the raw tiddlers to be stored in locations other than as tiddlers within your tiddlywiki html file.

Regards
Tony



On Friday, January 31, 2020 at 7:57:29 AM UTC+11, oleghbond wrote:
Dear tiddlymates, please advise me how to make the following html piece of code workable inside tiddlywiki:

<a href="#" id="bug_tracker">Leave a message about an error</a>
<script type="text/javascript">
BugTracker = {

 
Button: [document.getElementById('bug_tracker')]
}
</script>
<script type="text/javascript" src="https://cdn.freedcamp.com/project_apps/bugtracker/js/bugtracker_public.js"></script>

PMario

unread,
Jan 31, 2020, 7:06:30 AM1/31/20
to tiddl...@googlegroups.com
Hmm,

As Tony pointed out, we don't allow script tags in tiddler content, because of security reasons.

I did have a little look at the code. The first link seems to be a form, which should be opened in an iframe window. The second link contains some code, that initializes the hidden window.

The first script-tag contains some configuration data, which is used in the second script tag. ...

I did test the form, and it seems you don't need to be logged in, or something similar. ... Do you have a problem with spam? ..

Since google groups is public imo you should edit your first post link to something like this: "https://xxxxx.freedcamp.com/yyyyy/bugtracker/bugtracker_public"
Otherwise everyone can see the link to your form, which could be spammed in the future.

I think we can rebuild the behaviour with TW. It's possible to dynamically open the form in a new window.

Do you want to submit bugs to different bug-trackers, or is it the same tracker for all your tiddlywiki  wikis?

have fun!
mario

oleghbond

unread,
Jan 31, 2020, 9:24:18 AM1/31/20
to TiddlyWiki
Dear tiddlymates,

I solved temporarily the issue putting a single static html-file where the given code is between <html><body> and </body></html>. A working example is at the site https://protw.github.io/prosteer/. Here you can on the sidebar just under the big logo 5 icons. The most right from them (bug-icon) is a link to form (or one can reach it out directly via https://protw.github.io/prosteer/issuetracker.html). For this I just put the single static html-file mentioned above nearby.

I don't like this solution because I need to manage an external file and also for an additional click in order to get to this file.

It would be great if you can help me by a proper advice. 

Olegh

четвер, 30 січня 2020 р. 22:57:29 UTC+2 користувач oleghbond написав:
Dear tiddlymates, please advise me how to make the following html piece of code workable inside tiddlywiki:

<a href="#" id="bug_tracker">Leave a message about an error</a>
<script type="text/javascript">
BugTracker = {

 
Button: [document.getElementById('bug_tracker')]
}
</script>
<script type="text/javascript" src="https://cdn.freedcamp.com/project_apps/bugtracker/js/bugtracker_public.js"></script>

TonyM

unread,
Jan 31, 2020, 5:13:07 PM1/31/20
to TiddlyWiki
Hi

When I follow the issue tracker I get this message

Повідомити про помилку

Unfortunatly I can't read.

Tony

Olegh Bondarenko

unread,
Feb 2, 2020, 4:56:19 AM2/2/20
to tiddl...@googlegroups.com
Повідомити про помилку 
 
means sort of: "Report an error"

Olegh Bondarenko
https://bit.ly/oleghbond





сб, 1 лют. 2020 о 00:13 TonyM <anthony...@gmail.com> пише:
--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/lvXJQ9-l2x0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/29c6aa3c-241d-4dc3-b10e-ffd145a17522%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages