public.html 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  6. <meta http-equiv="Access-Control-Allow-Origin" content="*">
  7. <title><%=anchorInfo.nick_name%> | Live Broadcasting on CharmLive.com</title>
  8. <meta name="keywords" content="charmlive.com,live broadcast,live video chat,live broadcasting,live video streaming" />
  9. <meta name="description" content="Watch <%=anchorInfo.nick_name%> live! Join to explore live streaming and chat in real time." />
  10. <!-- Open Graph data -->
  11. <meta property="og:title" content="Live - <%=anchorInfo.nick_name%> is broadcasting on CharmLive" />
  12. <meta property="og:description" content="Watch and explore live streaming and chat in real time." />
  13. <meta property="og:url" content="<%-url%>" /> <meta property="og:image" content="<%=cover%>" />
  14. <meta property="og:type" content="video.other" />
  15. <meta property="og:site_name" content="CharmLive.com"/>
  16. <meta property="fb:app_id" content="2022708618006078"/>
  17. <!-- Twitter Card data -->
  18. <meta name ="twitter:card"content ="summary_large_image">
  19. <meta name="twitter:title" content="Live - <%=anchorInfo.nick_name%> is broadcasting on CharmLive">
  20. <meta name="twitter:description" content="Watch and explore live streaming and chat in real time.">
  21. <meta name="twitter:url" content="<%-url%>">
  22. <meta name="twitter:image" content="<%=cover%>">
  23. <meta name="twitter:site" content="@CharmLivePage">
  24. <script src="<%=public_path%>/js/jquery.js"></script>
  25. </head>
  26. <body>
  27. <div id="app"></div>
  28. <script>
  29. $.ajaxSetup({
  30. cache: true
  31. });
  32. $.get('/page/live.html', {}, function(res) {
  33. var str = res.replace(/[\r\n]/g, "");
  34. var source = {},
  35. scriptArr = [];
  36. source.style = str.match(/<style.*?<\/style>/g);
  37. source.link = str.match(/<link.*?>/g);
  38. scriptArr = str.match(/<script.*?<\/script>/g);
  39. var script = '';
  40. for (var key in source) {
  41. if (Object.prototype.toString.call(source[key]) == '[object Array]') {
  42. source[key].forEach(function(value) {
  43. $('body').append(value);
  44. })
  45. }
  46. }
  47. scriptArr.forEach(function(value) {
  48. if (value.toLowerCase().indexOf('jquery.min.js') > -1) return;
  49. $('body').append(value);
  50. })
  51. })
  52. </script>
  53. </body>
  54. </html>