goodmuyis

Scrolling tnews ticker widget for blogger.

Jul 11th, 2014
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.93 KB | None | 0 0
  1. <table border="0" cellspacing="0" cellpadding="0" style="width:901px;background:url(http://3.bp.blogspot.com/-21gcotIBlXM/UlzEuVhSc_I/AAAAAAAAFKY/SBaZ_L-JEEE/s1600/hot-articles.jpg) no-repeat center left;;padding:3px 3px 3px 100px;border: 1px solid #ddd;;"><tbody><tr><td><div style="position:relative;overflow:hidden;width:895px;height:20px;" onmouseover="copyspeed=pausespeed" onmouseout="copyspeed=memoryspeed"><div id="memoryscroller" style="position: absolute; left: -101px; top: 0px;"><nobr><script type="text/javascript" async="" src="https://apis.google.com/js/plusone.js" gapi_processed="true"></script><script type="text/javascript">
  2. var nMaxPosts =10;
  3.         var nWidth = 100;
  4.         var nScrollDelay = 0;
  5.         var sDirection = "left";
  6.         var sOpenLinkLocation = "N";
  7.         var sBulletChar = "✿"
  8. </script>
  9. <script type="text/javascript">
  10. function RecentPostsScrollerv2(json) {
  11. var sHeadLines;
  12. var sPostURL;
  13. var objPost;
  14. var sMoqueeHTMLStart;
  15. var sMoqueeHTMLEnd;
  16. var sPoweredBy;
  17. var sHeadlineTerminator;
  18. var sPostLinkLocation;
  19.  
  20. try {
  21.  
  22. sMoqueeHTMLStart = "\<MARQUEE behavior=\"scroll\" onmouseover=\"this.stop();\" onmouseout=\"this.start();\" ";
  23. if (nWidth) {
  24. sMoqueeHTMLStart = sMoqueeHTMLStart + " width = \"" + nWidth + "%\"";
  25. } else {
  26. sMoqueeHTMLStart = sMoqueeHTMLStart + " width = \"100%\"";
  27. }
  28. if (nScrollDelay) {
  29. sMoqueeHTMLStart = sMoqueeHTMLStart + " scrolldelay = \"" + nScrollDelay + "\"";
  30. }
  31. if (sDirection) {
  32. sMoqueeHTMLStart = sMoqueeHTMLStart + " direction = \"" + sDirection + "\"\>";
  33.  
  34. if (sDirection == "left" || sDirection == "right") {
  35. sHeadlineTerminator = "&nbsp;&nbsp;";
  36. } else {
  37. sHeadlineTerminator = "\<br/\>";
  38. }
  39. }
  40. if (sOpenLinkLocation == "N") {
  41. sPostLinkLocation = " target= \"_blank\" ";
  42. } else {
  43. sPostLinkLocation = " ";
  44. }
  45. sMoqueeHTMLEnd = "\</MARQUEE\>"
  46.  
  47. sHeadLines = "";
  48.  
  49. for (var nFeedCounter = 0; nFeedCounter < nMaxPosts; nFeedCounter++) {
  50. var objPost = json.feed.entry[nFeedCounter];
  51.  
  52. if (nFeedCounter == json.feed.entry.length) break;
  53.  
  54. for (var nCounter = 0; nCounter < objPost.link.length; nCounter++) {
  55. if (objPost.link[nCounter].rel == 'alternate') {
  56. sPostURL = objPost.link[nCounter].href;
  57. break;
  58. }
  59. }
  60. sHeadLines = sHeadLines + "\<b\>" + sBulletChar + "\</b\> \<a " + sPostLinkLocation + " href=\"" + sPostURL + "\">" + objPost.title.$t + "\</a\>" + sHeadlineTerminator;
  61. }
  62.  
  63. if (sDirection == "left") {
  64. sHeadLines = sHeadLines + "&nbsp;&nbsp;" + sPoweredBy;
  65. } else if (sDirection == "right") {
  66. sHeadLines = sPoweredBy + "&nbsp;&nbsp;" + sHeadLines;
  67. } else if (sDirection == "up") {
  68. sHeadLines = sHeadLines + "\<br/\>" + sHeadLines;
  69. }
  70. document.write(sMoqueeHTMLStart + sHeadLines + sMoqueeHTMLEnd)
  71. } catch (exception) {
  72. alert(exception);
  73. }
  74. }</script>
  75. <script src="http://www.thebravesandsmarts.com/feeds/posts/default?alt=json-in-script&amp;callback=RecentPostsScrollerv2&amp;max-results=10" type="text/javascript"></script></nobr></div></div></td></tr></tbody></table>
Advertisement
Add Comment
Please, Sign In to add comment