Hi!
I found a way to embed a gist into tiddler without a motify to $:/core
First, creat a file named "gist.html" with the following content and put it anywhere(local or web server):
<html>
<body>
<script language="javascript">
function GetRequest() {
var url = location.search;
var theRequest = new Object();
if (url.indexOf("?") != -1) {
var str = url.substr(1);
strs = str.split("&");
for(var i = 0; i < strs.length; i ++) {
theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
}
}
return theRequest;
}
var Request = new Object();
Request = GetRequest();
var id=Request["id"];
var user=Request["user"];
document.write(usel);
</script>
</body>
</html>
Then, creat a template tiddler "T/Gist" with the following content, remember to replace the path/to/your/gist.html to the url or local path of yourself:
<$set name="q" value={{{[[path/to/your/gist.html?user=]addsuffix{!!gist_user}addsuffix[&id=]addsuffix{!!gist_id}]}}}>
<$set name="myVariable" value="Some text">
<html><div align="center"><iframe src=<<q>> frameborder="0" width="100%" height="600"></iframe></div></html>
</$set>
It will use the field "gist_id" and "gist_user" and embed gist in tiddlers like this:
{{||T/Gist}}.