code_junkie

Google Friend Connect + CSS Style Switching

Nov 13th, 2011
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.33 KB | None | 0 0
  1. <!-- Include the Google Friend Connect javascript library. -->
  2. <script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>
  3.  
  4. <!-- Define the div tag where the gadget will be inserted. -->
  5. <div id="div-1229769625913" style="width:260px;border:1px solid #cccccc;"></div>
  6. <!-- Render the gadget into a div. -->
  7. <script type="text/javascript">
  8. var skin = {};
  9. skin['HEIGHT'] = '385';
  10. skin['BORDER_COLOR'] = '#cccccc';
  11. skin['ENDCAP_BG_COLOR'] = '#e0ecff';
  12. skin['ENDCAP_TEXT_COLOR'] = '#333333';
  13. skin['ENDCAP_LINK_COLOR'] = '#0000cc';
  14. skin['ALTERNATE_BG_COLOR'] = '#ffffff';
  15. skin['CONTENT_BG_COLOR'] = '#ffffff';
  16. skin['CONTENT_LINK_COLOR'] = '#0000cc';
  17. skin['CONTENT_TEXT_COLOR'] = '#333333';
  18. skin['CONTENT_SECONDARY_LINK_COLOR'] = '#7777cc';
  19. skin['CONTENT_SECONDARY_TEXT_COLOR'] = '#666666';
  20. skin['CONTENT_HEADLINE_COLOR'] = '#333333';
  21. google.friendconnect.container.setParentUrl('/' /* location of rpc_relay.html and canvas.html */);
  22. google.friendconnect.container.renderMembersGadget(
  23. { id: 'div-1229769625913',
  24. site: '10794935298529647173'},
  25. skin);
  26. </script>
  27.  
  28. <!-- Include the Google Friend Connect javascript library. -->
  29. <script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>
  30.  
  31. <!-- Define the div tag where the gadget will be inserted. -->
  32. <div id="div-1229769625913" style="width:260px"></div>
  33. <!-- Render the gadget into a div. -->
  34. <script type="text/javascript">
  35. function currentSkin() {
  36. // Put some real code that detects what the
  37. // right color scheme is here.
  38. return 'VERY_BLUE';
  39. }
  40.  
  41. var skins = {};
  42. skins['VERY_BLUE'] = {};
  43. skins['VERY_RED'] = {};
  44. skins['VERY_BLUE']['HEIGHT'] = '385';
  45. skins['VERY_BLUE']['BORDER_COLOR'] = '#0000ff';
  46. skins['VERY_BLUE']['ENDCAP_BG_COLOR'] = '#0000ff';
  47. skins['VERY_BLUE']['ENDCAP_TEXT_COLOR'] = '#0000ff';
  48. skins['VERY_BLUE']['ENDCAP_LINK_COLOR'] = '#0000ff';
  49. skins['VERY_BLUE']['ALTERNATE_BG_COLOR'] = '#0000ff';
  50. skins['VERY_BLUE']['CONTENT_BG_COLOR'] = '#0000ff';
  51. skins['VERY_BLUE']['CONTENT_LINK_COLOR'] = '#0000ff';
  52. skins['VERY_BLUE']['CONTENT_TEXT_COLOR'] = '#0000ff';
  53. skins['VERY_BLUE']['CONTENT_SECONDARY_LINK_COLOR'] = '#0000ff';
  54. skins['VERY_BLUE']['CONTENT_SECONDARY_TEXT_COLOR'] = '#0000ff';
  55. skins['VERY_BLUE']['CONTENT_HEADLINE_COLOR'] = '#0000ff';
  56. skins['VERY_RED']['HEIGHT'] = '385';
  57. skins['VERY_RED']['BORDER_COLOR'] = '#ff0000';
  58. skins['VERY_RED']['ENDCAP_BG_COLOR'] = '#ff0000';
  59. skins['VERY_RED']['ENDCAP_TEXT_COLOR'] = '#ff0000';
  60. skins['VERY_RED']['ENDCAP_LINK_COLOR'] = '#ff0000';
  61. skins['VERY_RED']['ALTERNATE_BG_COLOR'] = '#ff0000';
  62. skins['VERY_RED']['CONTENT_BG_COLOR'] = '#ff0000';
  63. skins['VERY_RED']['CONTENT_LINK_COLOR'] = '#ff0000';
  64. skins['VERY_RED']['CONTENT_TEXT_COLOR'] = '#ff0000';
  65. skins['VERY_RED']['CONTENT_SECONDARY_LINK_COLOR'] = '#ff0000';
  66. skins['VERY_RED']['CONTENT_SECONDARY_TEXT_COLOR'] = '#ff0000';
  67. skins['VERY_RED']['CONTENT_HEADLINE_COLOR'] = '#ff0000';
  68. google.friendconnect.container.setParentUrl('/' /* location of rpc_relay.html and canvas.html */);
  69. google.friendconnect.container.renderMembersGadget(
  70. { id: 'div-1229769625913',
  71. site: '10794935298529647173'},
  72. skins[currentSkin()]);
  73. </script>
Add Comment
Please, Sign In to add comment