howitworks.html 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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>How it Works | Introducing CharmLive.com and Its Services</title>
  8. <meta name="keywords" content="Charmlive,charmlive.com,live broadcast,live streaming,live video chat,videostream" />
  9. <meta name="description" content="CharmLive provides different kinds of live broadcasts catering to your needs.Simply click to know what they are and how they work." />
  10. <script src="<%=public_path%>/js/jquery.js"></script>
  11. </head>
  12. <body>
  13. <div id="app"></div>
  14. <script>
  15. $.ajaxSetup({
  16. cache: true
  17. });
  18. $.get('/page/list.html', {}, function(res) {
  19. var str = res.replace(/[\r\n]/g, "");
  20. var source = {},
  21. scriptArr = [];
  22. source.style = str.match(/<style.*?<\/style>/g);
  23. source.link = str.match(/<link.*?>/g);
  24. scriptArr = str.match(/<script.*?<\/script>/g);
  25. var script = '';
  26. for (var key in source) {
  27. if (Object.prototype.toString.call(source[key]) == '[object Array]') {
  28. source[key].forEach(function(value) {
  29. $('body').append(value);
  30. })
  31. }
  32. }
  33. scriptArr.forEach(function(value) {
  34. if (value.toLowerCase().indexOf('jquery.min.js') > -1) return;
  35. $('body').append(value);
  36. })
  37. })
  38. </script>
  39. </body>
  40. </html>