Twitter provides the HTML to add a tweet button to a page:
<a href="https://twitter.com/share" class="twitter-share-button" data-url="
http://socialalgebra.com" data-via="kennytilt"
data-hashtags="socialalgebra">Tweet</a>
<script>!function(d,s,id){var
js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);
js.id=id;js.src=p+'://
platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document,
'script', 'twitter-wjs');</script>
This works great whether I put it right in the index.html and suppress the
loading of my application script or if I just put it into a W3C Tryedit
pane.
If I try doing the same with an htmlEmbed widget It has three problems: (1)
it does not open a pop-up. it loads a new page and (2) it does not show all
the info/elements I see in the Tweet interface with ufiltered html (3)
"Tweet" text is not replaced by the birdie icon.
So I see a little text URL "tweet", no icon, and it does not work as well.
Same thing in the Playground:
http://tinyurl.com/oq4yc4t
here is the page source (from Firefox) of the filed page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head> <meta
http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Social Algebra</title> <script type="text/x-mathjax-config">
MathJax.Hub.Config({ messageStyle: "none" , showMathMenu:
true , tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]} ,
TeX: { Macros: { CRT:
'\\class{mxjcaret}{\\mathord{\\smash{\\rlap{\\kern-.1em\\color{black}{\\unicode{x7C}}}}}}',
XCRT:
'\\class{mxjcaret}{\\mathord{\\smash{\\rlap{\\kern-.1em\\color{red}{\\unicode{x7C}}}}}}',
CRTW:
'\\\\mathord{\\\\smash{\\\\rlap{\\\\kern-.1em\\\\color{white}{\\\\unicode{x7C}}}}}'
} } }); </script> <script type="text/javascript"
src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML
<view-source:https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML>">
</script> <script type="text/javascript"> setInterval(blink_caret,
750); window.onblur = function () {
document.myFocused=false; }; window.onfocus =
function () { document.myFocused=true;
}; document.myFocused=true; function blink_caret() {
carets = document.getElementsByClassName('mxjcaret'); for (var
i=0, caret; caret = carets[i++];) { if (document.myFocused) {
caret.style.visibility = (caret.style.visibility ==
'visible') ? 'hidden':'visible'; } else {
caret.style.visibility = 'hidden'; } } } </script> <!--
script>!function(d,s,id){var
js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document,
'script', 'twitter-wjs');</script --> <script
type="text/javascript" src="script/soa.js
<view-source:http://localhost:8000/script/soa.js>"></script><script
type='text/javascript'
src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js
<view-source:http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js>'></script></head><!--
body class="tex2jax_ignore" --><body><div
style='font-size:18pt'>\(42\)</div><!DOCTYPE html><a
href="https://twitter.com/share
<view-source:https://twitter.com/share>"
class="twitter-share-button">Tweet</a><script>!function(d,s,id){var
js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document,
'script', 'twitter-wjs');</script></body></html>
If I paste the above body into W3c TryEdit it works there, too.
I'll go study the QX embed widget to see if there are limitations I
may be transgressing.
Any ideas welcome.
-kt
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel