SOOP - 참여 통계 리캡

참여 통계에 스트리머 별 총 시간을 표시합니다

  1. // ==UserScript==
  2. // @name SOOP - 참여 통계 리캡
  3. // @namespace https://www.afreecatv.com/
  4. // @version 2.0.0
  5. // @description 참여 통계에 스트리머 별 총 시간을 표시합니다
  6. // @author Jebibot
  7. // @match *://broadstatistic.sooplive.co.kr/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=www.sooplive.co.kr
  9. // @grant unsafeWindow
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function () {
  14. "use strict";
  15.  
  16. const container = document.createElement("div");
  17. container.id = "recap";
  18. container.style.height = "100%";
  19. const chart = document.getElementById("containchart");
  20. if (chart == null) {
  21. return;
  22. }
  23. chart.parentNode.appendChild(container);
  24.  
  25. const oPage = unsafeWindow.oPage;
  26. const setMultipleChart = oPage.setMultipleChart.bind(oPage);
  27. oPage.setMultipleChart = (data) => {
  28. setMultipleChart(data);
  29.  
  30. new unsafeWindow.Highcharts.Chart({
  31. chart: {
  32. renderTo: "recap",
  33. width: 900,
  34. height: Math.max(300, data.data_stack.length * 40),
  35. zoomType: "xy",
  36. },
  37. title: {
  38. text: null,
  39. },
  40. legend: {
  41. enabled: false,
  42. },
  43. xAxis: {
  44. type: "category",
  45. },
  46. yAxis: {
  47. opposite: true,
  48. title: {
  49. text: null,
  50. },
  51. },
  52. plotOptions: {
  53. series: {
  54. type: "bar",
  55. colorByPoint: true,
  56. },
  57. },
  58. tooltip: {
  59. valueDecimals: 0,
  60. valueSuffix: "분",
  61. },
  62. series: [
  63. {
  64. type: "bar",
  65. name: "시간",
  66. data: data.data_stack
  67. .map((t) => [t.bj_nick, t.data.reduce((a, b) => a + b, 0) / 60])
  68. .sort((a, b) => {
  69. if (a[0] === "기타") {
  70. return 1;
  71. } else if (b[0] === "기타") {
  72. return -1;
  73. } else {
  74. return b[1] - a[1];
  75. }
  76. }),
  77. },
  78. ],
  79. });
  80. };
  81. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址