repo_name stringlengths 1 62 | dataset stringclasses 1 value | lang stringclasses 11 values | pr_id int64 1 20.1k | owner stringlengths 2 34 | reviewer stringlengths 2 39 | diff_hunk stringlengths 15 262k | code_review_comment stringlengths 1 99.6k |
|---|---|---|---|---|---|---|---|
biliscope | github_2023 | javascript | 251 | gaogaotiantian | gaogaotiantian | @@ -304,6 +310,10 @@ VideoProfileCard.prototype.drawConclusion = function() {
} else {
outlineDiv.classList.add("d-none");
}
+
+ if (summary || outline?.length > 0) {
+ document.getElementById("biliscope-ai-summary-popup").classList.remove("d-none"); | 这里呢?需要它么? |
biliscope | github_2023 | javascript | 253 | gaogaotiantian | gaogaotiantian | @@ -7,6 +7,26 @@ const NUM_PER_PAGE = 50
var biliMixin = null;
+async function getJwt() {
+ this.jwtTimeStamp ||= 0; | 这行是需要的么?这是初始化的意思吧?如果`this.jwtTimeStamp`不存在,`this.jwt`也必然不存在吧?那下面那个判断在`this.jwt`的地方就结束了,不会读这个timestamp吧?在现在这个函数下,由于一切是单线程的,所以`jwt`和`jwtTimeStamp`必然同时存在?(Timestamp是一个词,s别大写了。) |
biliscope | github_2023 | javascript | 250 | gaogaotiantian | gaogaotiantian | @@ -118,8 +118,6 @@ function installIdHooks() {
window.location.href.startsWith(BILIBILI_DYNAMIC_DETAIL_URL) ||
window.location.href.startsWith(BILIBILI_SPACE_URL)) {
labelDynamicPage();
- } else if (window.location.href.startsWith(BILIBILI_WATCH_LATER_URL)) {
- labelComments(); | 现在`labelComments()`还有调用么 |
biliscope | github_2023 | javascript | 244 | gaogaotiantian | gaogaotiantian | @@ -411,35 +411,14 @@ UserProfileCard.prototype.updateUserId = function(userId) {
}
UserProfileCard.prototype.updateCursor = function(cursorX, cursorY) {
- const cursorPadding = 10;
- const windowPadding = 20;
-
this.cursorX = cursorX;
this.cursorY = cursorY;
- if (this.el) {
- let width = this.el.scrollWidth;
- let height = this.el.scrollHeight;
-
- if (this.cursorX + width + windowPadding > window.scrollX + window.innerWidth) {
- // Will overflow to the right, put it on the left
- this.el.style.left = `${this.cursorX - cursorPadding - width}px`;
- } else {
- this.el.style.left = `${this.cursorX + cursorPadding}px`;
- }
-
- if (this.cursorY + height + windowPadding > window.scrollY + window.innerHeight) {
- // Will overflow to the bottom, put it on the top
- if (this.cursorY - windowPadding - height < window.scrollY) {
- // Can't fit on top either, put it in the middle
- this.el.style.top = `${window.scrollY + (window.innerHeight - height) / 2}px`;
- } else {
- this.el.style.top = `${this.cursorY - cursorPadding - height}px`;
- }
- } else {
- this.el.style.top = `${this.cursorY + cursorPadding}px`;
- }
- }
+ displayElOutsideTarget(
+ this.el,
+ {left:cursorX,right:cursorX,top:cursorY,bottom:cursorY}, | `:`和`,`后面都有个空格 |
biliscope | github_2023 | javascript | 244 | gaogaotiantian | gaogaotiantian | @@ -99,3 +99,83 @@ function parseCookie(cookie) {
}
return ret;
}
+
+// ===========================================================================
+// ===================== Element display related =============================
+// ===========================================================================
+
+/***
+ * @param {HTMLElement} el
+ * @param {{left: number, right: number, top: number, bottom: number}} targetBounding
+ * @param {('left' | 'right' | 'top' | 'bottom' | 'default')[]} directions
+ * @param {number} cursorPadding
+ * @param {number} windowPadding
+ */
+function displayElOutsideTarget(el, targetBounding, directions, cursorPadding=10, windowPadding=20) {
+ const cardWidth = el.scrollWidth;
+ const cardHeight = el.scrollHeight;
+
+ const {left=0,right=0,top=0,bottom=0} = targetBounding; | 这里也是,等号两边也留一个。还有前面function definition里的default argument,我看也是留的。 |
biliscope | github_2023 | javascript | 244 | gaogaotiantian | gaogaotiantian | @@ -225,77 +223,24 @@ VideoProfileCard.prototype.updateVideoId = function(videoId) {
}
VideoProfileCard.prototype.updatePosition = function() {
- const needVerticalDisplay = () => {
- if (window.location.href.startsWith(BILIBILI_DYNAMIC_URL) ||
- window.location.href.startsWith(BILIBILI_DYNAMIC_DETAIL_URL) ||
- window.location.href.startsWith(BILIBILI_SPACE_URL) &&
- window.location.pathname.endsWith("/dynamic")) {
- // 动态页的视频
- if (this.target.matches(".bili-dyn-card-video")) {
- return true;
- }
- } else if (window.location.href.startsWith(BILIBILI_VIDEO_URL) ||
- window.location.href.startsWith(BILIBILI_WATCH_LATER_URL)) {
- // 视频页右侧的推荐视频
- if (this.target.matches("#reco_list [biliscope-videoid]")) {
- return true;
- }
- } else if (window.location.href.startsWith(BILIBILI_POPULAR_URL)) {
- // 热门页的视频
- if (this.target.matches(".popular-container [biliscope-videoid]")) {
- return true;
- }
- }
-
- return false;
- }
-
- if (this.el) {
- const cardWidth = this.el.scrollWidth;
- const cardHeight = this.el.scrollHeight;
-
- const cursorPadding = 10;
- const windowPadding = 20;
- /** @type {DOMRect} */
- const targetBounding = this.target.getBoundingClientRect();
-
- if (needVerticalDisplay()) {
- // 往上下显示
- if (targetBounding.bottom + cardHeight > window.innerHeight &&
- targetBounding.top - cardHeight > 0) {
- // Will overflow to the bottom and not overflow to the top, put it on the top
- this.el.style.top = `${targetBounding.top - cursorPadding - cardHeight + window.scrollY}px`;
- } else {
- this.el.style.top = `${targetBounding.bottom + window.scrollY + cursorPadding}px`;
- }
-
- if (targetBounding.left + cardWidth > window.innerWidth) {
- // Will overflow to the right, put it on the left
- this.el.style.left = `${targetBounding.right - cardHeight + window.scrollX}px`;
- } else {
- this.el.style.left = `${targetBounding.left + window.scrollX}px`;
- }
- } else {
- // 往左右显示
- if (targetBounding.right + windowPadding + cardWidth > window.innerWidth) {
- // Will overflow to the right, put it on the left
- this.el.style.left = `${targetBounding.left - cursorPadding - cardWidth + window.scrollX}px`;
- } else {
- this.el.style.left = `${targetBounding.right + window.scrollX + cursorPadding}px`;
- }
-
- if (targetBounding.top + windowPadding + cardHeight < window.innerHeight) {
- // Put it on the bottom
- this.el.style.top = `${targetBounding.top + window.scrollY}px`;
- } else if (targetBounding.bottom - windowPadding - cardHeight > 0) {
- // Put it on the top
- this.el.style.top = `${targetBounding.bottom - cardHeight + window.scrollY}px`;
- } else {
- // Put it in the middle
- const middle = targetBounding.top + (targetBounding.bottom - targetBounding.top) / 2;
- this.el.style.top = `${middle - cardHeight / 2 + window.scrollY}px`;
- }
- }
+ const targetBounding = this.target.getBoundingClientRect();
+ const {href} = window.location;
+
+ if ((href.startsWith(BILIBILI_DYNAMIC_URL) || href.startsWith(BILIBILI_DYNAMIC_DETAIL_URL) ||
+ href.startsWith(BILIBILI_SPACE_URL) && window.location.pathname.endsWith("/dynamic")) &&
+ this.target.matches(".bili-dyn-card-video")) { | 这里把这个target match写前面吧,感觉更清楚,后面尽量一个case写一行。 |
biliscope | github_2023 | javascript | 206 | gaogaotiantian | gaogaotiantian | @@ -226,34 +226,77 @@ VideoProfileCard.prototype.updateVideoId = function(videoId) {
return updated;
}
-VideoProfileCard.prototype.updateCursor = function(cursorX, cursorY) {
- const cursorPadding = 10;
- const windowPadding = 20;
+VideoProfileCard.prototype.updatePosition = function() {
+ const needVerticalDisplay = () => {
+ if (window.location.href.startsWith(BILIBILI_DYNAMIC_URL) ||
+ window.location.href.startsWith(BILIBILI_NEW_DYNAMIC_URL) ||
+ window.location.href.startsWith(BILIBILI_SPACE_URL) &&
+ window.location.pathname.endsWith("/dynamic")) {
+ // 动态页的视频
+ if (this.target.matches(".bili-dyn-card-video")) {
+ return true;
+ }
+ } else if (window.location.href.startsWith(BILIBILI_VIDEO_URL) ||
+ window.location.href.startsWith(BILIBILI_WATCH_LATER_URL)) {
+ // 视频页右侧的推荐视频
+ if (this.target.matches("#reco_list [biliscope-videoid]")) {
+ return true;
+ }
+ } else if (window.location.href.startsWith(BILIBILI_POPULAR_URL)) {
+ // 热门页的视频
+ if (this.target.matches(".popular-container > :last-child [biliscope-videoid]:not(.title)")) { | 这里为啥需要一个这么复杂的match? |
biliscope | github_2023 | javascript | 206 | gaogaotiantian | gaogaotiantian | @@ -226,34 +226,77 @@ VideoProfileCard.prototype.updateVideoId = function(videoId) {
return updated;
}
-VideoProfileCard.prototype.updateCursor = function(cursorX, cursorY) {
- const cursorPadding = 10;
- const windowPadding = 20;
+VideoProfileCard.prototype.updatePosition = function() {
+ const needVerticalDisplay = () => {
+ if (window.location.href.startsWith(BILIBILI_DYNAMIC_URL) ||
+ window.location.href.startsWith(BILIBILI_NEW_DYNAMIC_URL) ||
+ window.location.href.startsWith(BILIBILI_SPACE_URL) &&
+ window.location.pathname.endsWith("/dynamic")) {
+ // 动态页的视频
+ if (this.target.matches(".bili-dyn-card-video")) {
+ return true;
+ }
+ } else if (window.location.href.startsWith(BILIBILI_VIDEO_URL) ||
+ window.location.href.startsWith(BILIBILI_WATCH_LATER_URL)) {
+ // 视频页右侧的推荐视频
+ if (this.target.matches("#reco_list [biliscope-videoid]")) {
+ return true;
+ }
+ } else if (window.location.href.startsWith(BILIBILI_POPULAR_URL)) {
+ // 热门页的视频
+ if (this.target.matches(".popular-container > :last-child [biliscope-videoid]:not(.title)")) {
+ return true;
+ }
+ }
- this.cursorX = cursorX;
- this.cursorY = cursorY;
+ return false;
+ }
if (this.el) {
- let width = this.el.scrollWidth;
- let height = this.el.scrollHeight;
+ const cardWidth = this.el.scrollWidth;
+ const cardHeight = this.el.scrollHeight;
+
+ const cursorPadding = 10;
+ const windowPadding = 20;
+ /** @type {DOMRect} */
+ const targetBounding = this.target.getBoundingClientRect();
+
+ if (!needVerticalDisplay()) {
+ // 往左右显示
+ if (targetBounding.right + windowPadding + cardWidth > window.innerWidth) {
+ // Will overflow to the right, put it on the left
+ this.el.style.left = `${targetBounding.left - cursorPadding - cardWidth + window.scrollX}px`;
+ } else {
+ this.el.style.left = `${targetBounding.right + window.scrollX + cursorPadding}px`;
+ }
- if (this.cursorX + width + windowPadding > window.scrollX + window.innerWidth) {
- // Will overflow to the right, put it on the left
- this.el.style.left = `${this.cursorX - cursorPadding - width}px`;
+ if (targetBounding.top + windowPadding + cardHeight < window.innerHeight) {
+ // Put it on the bottom
+ this.el.style.top = `${targetBounding.top + window.scrollY}px`;
+ } else if (targetBounding.bottom - windowPadding - cardHeight > 0) {
+ // Put it on the top
+ this.el.style.top = `${targetBounding.bottom - cardHeight + window.scrollY}px`;
+ } else {
+ // Put it in the middle
+ const middle = targetBounding.top + (targetBounding.bottom - targetBounding.top) / 2;
+ this.el.style.top = `${middle - cardHeight / 2 + window.scrollY}px`;
+ }
} else {
- this.el.style.left = `${this.cursorX + cursorPadding}px`;
- }
+ // 往上下显示
+ // 40 为热评的高度,热评可以在屏幕外,以解决上下位置都不够放卡片的问题 | 这里这个热评太magic了。如果用户把热评给关了呢?这里平白无故冒出来个40有点太怪了,未来如果我们改了热评的size呢?我比较好奇的是这里card在计算的时候是没有热评的大小的是么? |
biliscope | github_2023 | javascript | 206 | gaogaotiantian | gaogaotiantian | @@ -226,34 +226,77 @@ VideoProfileCard.prototype.updateVideoId = function(videoId) {
return updated;
}
-VideoProfileCard.prototype.updateCursor = function(cursorX, cursorY) {
- const cursorPadding = 10;
- const windowPadding = 20;
+VideoProfileCard.prototype.updatePosition = function() {
+ const needVerticalDisplay = () => {
+ if (window.location.href.startsWith(BILIBILI_DYNAMIC_URL) ||
+ window.location.href.startsWith(BILIBILI_NEW_DYNAMIC_URL) ||
+ window.location.href.startsWith(BILIBILI_SPACE_URL) &&
+ window.location.pathname.endsWith("/dynamic")) {
+ // 动态页的视频
+ if (this.target.matches(".bili-dyn-card-video")) {
+ return true;
+ }
+ } else if (window.location.href.startsWith(BILIBILI_VIDEO_URL) ||
+ window.location.href.startsWith(BILIBILI_WATCH_LATER_URL)) {
+ // 视频页右侧的推荐视频
+ if (this.target.matches("#reco_list [biliscope-videoid]")) {
+ return true;
+ }
+ } else if (window.location.href.startsWith(BILIBILI_POPULAR_URL)) {
+ // 热门页的视频
+ if (this.target.matches(".popular-container [biliscope-videoid]")) {
+ return true;
+ }
+ }
- this.cursorX = cursorX;
- this.cursorY = cursorY;
+ return false;
+ }
if (this.el) {
- let width = this.el.scrollWidth;
- let height = this.el.scrollHeight;
+ const cardWidth = this.el.scrollWidth;
+ const cardHeight = this.el.scrollHeight;
+
+ const cursorPadding = 10;
+ const windowPadding = 20;
+ /** @type {DOMRect} */
+ const targetBounding = this.target.getBoundingClientRect();
+
+ if (!needVerticalDisplay()) { | 最后改一个点就行了,把这里的逻辑反过来
```javascript
if (needVerticalDisplay()) {
...
} else {
...
}
```
在if和else都存在的情况下你的if里带一个`!`是一个有点别扭的逻辑。 |
biliscope | github_2023 | javascript | 235 | gaogaotiantian | gaogaotiantian | @@ -348,7 +348,7 @@ UserProfileCard.prototype.clearOriginalCard = function() {
}
for (let card of document.getElementsByTagName("bili-user-profile")) {
- card.hidden = true;
+ card.style.display = "none"; | 这里这个修改是必要的么? |
biliscope | github_2023 | javascript | 235 | gaogaotiantian | gaogaotiantian | @@ -15,11 +15,12 @@ function labelVideoCommentIp(observer) {
}
}
- if (window.location.href.startsWith(BILIBILI_VIDEO_URL)) {
- const comments = document.getElementsByTagName("bili-comments")[0];
- const feed = comments?.renderRoot?.children?.contents?.children?.feed;
+ const comments = document.getElementsByTagName("bili-comments"); | 这里是一个单纯的格式改变么? |
biliscope | github_2023 | javascript | 235 | gaogaotiantian | gaogaotiantian | @@ -73,19 +73,12 @@ function labelDynamicPage() {
}
}
- for (let className of ["user-name", "root-reply-avatar", "sub-user-name", "sub-reply-avatar"]) {
- for (let el of document.getElementsByClassName(className)) {
- let mid = el.getAttribute("data-user-id");
- if (mid) {
- el.setAttribute("biliscope-userid", mid);
- }
- }
- }
+ labelComments();
}
-function labelVideoPage() {
- for (let el of document.querySelectorAll(".user-name,.root-reply-avatar,.sub-user-name,.sub-reply-avatar")) {
- let mid = el.getAttribute("data-user-id");
+function labelComments() {
+ for (const el of document.querySelectorAll(".user-name, .root-reply-avatar, .sub-user-name, .sub-reply-avatar")) {
+ const mid = el.getAttribute("data-user-id"); | 下次再做这种相对复杂的功能性的修改的时候,尽量不要顺手去改这些cosmetic的东西,因为会增加review的工作量。我要去判断哎这里逻辑变了么?还是只是改了一下const啥的 |
biliscope | github_2023 | others | 238 | gaogaotiantian | gaogaotiantian | @@ -200,7 +200,7 @@
#biliscope-id-card .idc-meta {
font-size: 12px;
- margin-top: 4px
+ margin-top: 4px; | 这个地方改回来吧,一个commit不要改没必要改的地方。 |
biliscope | github_2023 | javascript | 238 | gaogaotiantian | gaogaotiantian | @@ -96,7 +104,10 @@ function getUserProfileCardDataHTML(data) {
return `
<div class="idc-theme-img" style="background-image: url("${data["top_photo"]}@100Q.webp");">
<div style="position: absolute; top: 85px; right: 10px">
- <a><span id="biliscope-follow-button" class="biliscope-relation ${relationClass(data)}">${relationDisplay(data)}</span></a>
+ <a><span id="biliscope-follow-button" class="biliscope-relation ${relationClass(data)}"
+ ${(data["relation"] && data["relation"]["mtime"] !== 0) ? `title="${subscribeTimeToDisplay(data)}"` : ''}> | 这里如果要换行的话,这个title的部分不能和前面的`<a>`对齐。你可以`id`, `class`然后这一串对齐。
另外,这里可以写成`data?.relation?.mtime ? xxx`吧?
你测试过没关注的情况么?这边mtime我不确定数值是怎么给的。 |
biliscope | github_2023 | javascript | 238 | gaogaotiantian | gaogaotiantian | @@ -104,9 +104,11 @@ function getUserProfileCardDataHTML(data) {
return `
<div class="idc-theme-img" style="background-image: url("${data["top_photo"]}@100Q.webp");">
<div style="position: absolute; top: 85px; right: 10px">
- <a><span id="biliscope-follow-button" class="biliscope-relation ${relationClass(data)}"
- ${(data["relation"] && data["relation"]["mtime"] !== 0) ? `title="${subscribeTimeToDisplay(data)}"` : ''}>
- ${relationDisplay(data)}
+ <a><span
+ id="biliscope-follow-button"
+ class="biliscope-relation ${relationClass(data)}"
+ ${data?.relation?.mtime ? `title="${subscribeTimeToDisplay(data)}"` : ''}>
+ ${relationDisplay(data)} | ```suggestion
<a><span id="biliscope-follow-button"
class="biliscope-relation ${relationClass(data)}"
${data?.relation?.mtime ? `title="${subscribeTimeToDisplay(data)}"` : ''}>
${relationDisplay(data)}
``` |
biliscope | github_2023 | javascript | 222 | gaogaotiantian | gaogaotiantian | @@ -658,15 +658,15 @@ UserProfileCard.prototype.setupTriggers = function() {
UserProfileCard.prototype.drawWordCloud = function(canvas) {
canvas.style.height = `${canvas.offsetWidth / 2}px`;
- canvas.width = canvas.offsetWidth;
- canvas.height = canvas.offsetHeight;
+ canvas.width = canvas.offsetWidth * window.devicePixelRatio;
+ canvas.height = canvas.offsetHeight * window.devicePixelRatio;
canvas.parentNode.classList.add("biliscope-canvas-show");
WordCloud(canvas, {
list: JSON.parse(JSON.stringify(this.data["wordcloud"])),
backgroundColor: "transparent",
- weightFactor: 100 / this.wordCloudMaxCount(),
+ weightFactor: 100 / this.wordCloudMaxCount() * window.devicePixelRatio,
shrinkToFit: true,
minSize: biliScopeOptions.minSize | ```suggestion
minSize: biliScopeOptions.minSize
minSize: biliScopeOptions.minSize * window.devicePixelRatio
``` |
biliscope | github_2023 | javascript | 217 | gaogaotiantian | gaogaotiantian | @@ -58,8 +54,21 @@ function relationClass(data) {
}
}
+function blockDisplay(data) {
+ if (data?.relation?.attribute === undefined) {
+ return null; | 这里在什么情况下会是null?或者说什么情况下不显示这个拉黑按钮? |
biliscope | github_2023 | javascript | 216 | gaogaotiantian | gaogaotiantian | @@ -314,7 +314,7 @@ VideoProfileCard.prototype.drawConclusion = function() {
}
VideoProfileCard.prototype.drawHotComment = function() {
- if (!this.data.replies?.length) {
+ if (!this.data.replies?.length || !biliScopeOptions.enableHotComment) { | ```suggestion
if (!biliScopeOptions.enableHotComment || !this.data.replies?.length) {
``` |
biliscope | github_2023 | javascript | 210 | gaogaotiantian | gaogaotiantian | @@ -689,7 +689,8 @@ UserProfileCard.prototype.updateData = function (data) {
this.data["live_status"] = d["data"]["live_room"] ? d["data"]["live_room"]["liveStatus"]: 0;
this.data["vip"] = d["data"]["vip"]["status"];
this.data["top_photo"] = d["data"]["top_photo"].replace("http://", "https://");
- this.data["profession"] = d["data"]["profession"];
+ const profession = d["data"]["profession"]; | 这里别开临时变量了,确实代码会显得长一些,break line一下,要不和其他的部分长得太不一样了。另外确认一下,`is_show`总会存在吧? |
biliscope | github_2023 | javascript | 197 | gaogaotiantian | gaogaotiantian | @@ -15,14 +16,18 @@ function getUserIdFromLink(s) {
return userId;
}
-function getVideoIdFromLink(s) {
- let regex = /.*?bilibili.com\/video\/(BV[1-9a-zA-Z]{10})(\/|\/\?.*)?$/;
- let videoId = null;
+function getVideoIdFromLink(link) { | 现在这个函数逻辑完全就是
```javascript
const regexBV = /(BV[1-9a-zA-Z]{10})/g;
return link.match(regexBV)?.[0]
```
了吧 |
biliscope | github_2023 | others | 180 | gaogaotiantian | gaogaotiantian | @@ -2,6 +2,11 @@
position: absolute;
z-index: 1002;
font-size: 14px;
+ display: flex;
+ flex-direction: column;
+ background-color: #fff;
+ border-radius: 8px;
+ max-height: calc(50vh + 74px); | 这里这个`+74px`有什么讲究么?直接`50vh`不行的么? |
biliscope | github_2023 | javascript | 180 | gaogaotiantian | gaogaotiantian | @@ -292,32 +302,124 @@ VideoProfileCard.prototype.drawConclusion = function() {
}
}
+VideoProfileCard.prototype.drawHotComment = function() {
+ let hotComment;
+
+ // 具有热评标签的
+ hotComment = this.data.replies.filter(reply =>
+ reply?.attr == 32768
+ )?.[0];
+
+ // 高赞的
+ if(!hotComment) {
+ hotComment = this.data.replies.reduce((lReply, rReply) =>
+ lReply.like > rReply.like ? lReply : rReply
+ );
+ }
+
+ if(hotComment) {
+ const {content, member} = hotComment;
+ const hotCommentText = document.getElementById("biliscope-hot-comment-text");
+
+ document.getElementById("biliscope-hot-comment-author").innerHTML = `${member.uname}:`;
+ document.getElementById("biliscope-hot-comment-author").onclick = function() {
+ open(`//space.bilibili.com/${member.mid}`);
+ }
+
+ if (!content?.emote && !content?.jump_url) {
+ hotCommentText.innerHTML = content.message;
+ } else {
+ hotCommentText.innerHTML = '';
+ let separators = [];
+ let emotes = content?.emote;
+ let jump_urls = content?.jump_url;
+ if (emotes) {
+ separators = separators.concat(Object.keys(emotes));
+ }
+ if (jump_urls) {
+ separators = separators.concat(Object.keys(jump_urls));
+ }
+
+ let regexStr = separators.map(s =>
+ s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join('|');
+ let hotComments, hotCommentItem;
+
+ if (regexStr) {
+ hotComments = content.message.split(new RegExp(`(${regexStr})`));
+ } else {
+ hotComments = [content.message];
+ }
+
+ let jump_urls_copy = {...jump_urls};
+ hotComments.map(s => {
+ if (emotes?.[s]) {
+ hotCommentItem = document.createElement("img");
+ hotCommentItem.style = "width:1.4em;height:1.4em;vertical-align:text-bottom;";
+ hotCommentItem.src = emotes[s].url;
+ } else if (jump_urls_copy?.[s]) {
+ hotCommentItem = document.createElement("a");
+ hotCommentItem.style = "color:#008ac5;cursor:pointer;";
+ hotCommentItem.onmouseover = function() {
+ this.style.color = '#00AEEC';
+ }
+ hotCommentItem.onmouseout = function() {
+ this.style.color = '#008ac5';
+ }
+ hotCommentItem.target = "_blank";
+ hotCommentItem.href = jump_urls_copy[s].pc_url;
+ hotCommentItem.innerHTML = s;
+ delete jump_urls_copy[s];
+ } else {
+ hotCommentItem = document.createElement("span");
+ hotCommentItem.innerHTML = s;
+ }
+
+ hotCommentText.appendChild(hotCommentItem);
+ });
+ }
+
+ document.getElementById("biliscope-hot-comment-wrapper").classList.remove("d-none");
+ }
+}
+
VideoProfileCard.prototype.updateData = function(data) {
+ if (this.valid == null) { | 这里是要干什么?`this.valid == null`只有最开始的时候是吧?你把html的部分初始化好是不是就行了?不懂为什么要再最前面加个这个。 |
biliscope | github_2023 | javascript | 180 | gaogaotiantian | gaogaotiantian | @@ -292,32 +302,124 @@ VideoProfileCard.prototype.drawConclusion = function() {
}
}
+VideoProfileCard.prototype.drawHotComment = function() {
+ let hotComment;
+
+ // 具有热评标签的
+ hotComment = this.data.replies.filter(reply =>
+ reply?.attr == 32768
+ )?.[0];
+
+ // 高赞的
+ if(!hotComment) {
+ hotComment = this.data.replies.reduce((lReply, rReply) =>
+ lReply.like > rReply.like ? lReply : rReply
+ );
+ }
+
+ if(hotComment) {
+ const {content, member} = hotComment;
+ const hotCommentText = document.getElementById("biliscope-hot-comment-text");
+
+ document.getElementById("biliscope-hot-comment-author").innerHTML = `${member.uname}:`;
+ document.getElementById("biliscope-hot-comment-author").onclick = function() {
+ open(`//space.bilibili.com/${member.mid}`);
+ }
+
+ if (!content?.emote && !content?.jump_url) {
+ hotCommentText.innerHTML = content.message;
+ } else {
+ hotCommentText.innerHTML = '';
+ let separators = [];
+ let emotes = content?.emote;
+ let jump_urls = content?.jump_url;
+ if (emotes) {
+ separators = separators.concat(Object.keys(emotes));
+ }
+ if (jump_urls) {
+ separators = separators.concat(Object.keys(jump_urls));
+ }
+
+ let regexStr = separators.map(s =>
+ s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join('|');
+ let hotComments, hotCommentItem;
+
+ if (regexStr) {
+ hotComments = content.message.split(new RegExp(`(${regexStr})`));
+ } else {
+ hotComments = [content.message];
+ }
+
+ let jump_urls_copy = {...jump_urls};
+ hotComments.map(s => {
+ if (emotes?.[s]) {
+ hotCommentItem = document.createElement("img");
+ hotCommentItem.style = "width:1.4em;height:1.4em;vertical-align:text-bottom;";
+ hotCommentItem.src = emotes[s].url;
+ } else if (jump_urls_copy?.[s]) {
+ hotCommentItem = document.createElement("a");
+ hotCommentItem.style = "color:#008ac5;cursor:pointer;";
+ hotCommentItem.onmouseover = function() {
+ this.style.color = '#00AEEC';
+ }
+ hotCommentItem.onmouseout = function() {
+ this.style.color = '#008ac5';
+ }
+ hotCommentItem.target = "_blank";
+ hotCommentItem.href = jump_urls_copy[s].pc_url;
+ hotCommentItem.innerHTML = s;
+ delete jump_urls_copy[s];
+ } else {
+ hotCommentItem = document.createElement("span");
+ hotCommentItem.innerHTML = s;
+ }
+
+ hotCommentText.appendChild(hotCommentItem);
+ });
+ }
+
+ document.getElementById("biliscope-hot-comment-wrapper").classList.remove("d-none");
+ }
+}
+
VideoProfileCard.prototype.updateData = function(data) {
+ if (this.valid == null) {
+ document.getElementById("biliscope-hot-comment-wrapper").classList.add("d-none");
+ document.getElementById("biliscope-ai-summary-popup").classList.add("d-none");
+ document.getElementById("biliscope-ai-summary-none").classList.remove("d-none");
+ }
+
if (data["api"] == "view") {
this.data.view = data["payload"];
} else if (data["api"] == "conclusion") {
this.data.conclusion = data["payload"];
+ this.drawConclusion();
+
if (this.data.conclusion.model_result.summary) {
+ document.getElementById("biliscope-ai-summary-none").classList.add("d-none");
+ document.getElementById("biliscope-ai-summary-popup").classList.remove("d-none"); | 你这里整个处理的方法有问题,逻辑弄得太乱了。
你在处理数据的时候,不应该做任何DOM上的操作。你处理数据只有一个目的,就是决定接下来要干什么。
你看我原来的整体逻辑,前面读数据的部分是只读数据的,后面的逻辑去“画”DOM,这是个基本的逻辑拆分,你现在全给混到一起了。
首先HTML的部分,你不能把三个div平行列出来,就是none, summary和reply。none自己是一个div,然后summary和reply肯定在一个div里。要么就是把reply放到summary里,要么就是新建一个div去放它俩。这样你在后面control的时候,就不会存在说有三个DOM要你来回开关的。
然后读数据的时候,你只应该读数据。只要summary存在,`this.valid`就是`true`,而reply只更新数据层面的reply。
你可以分别在读conclusion和读reply的时候,调用`drawConclusion`和`drawReply`,而所有的对reply的DOM逻辑都应该在`drawReply`里完成,包括这个reply是不是显示。
下面的那个显示逻辑应该是基本不变的,可能有的id需要改一下。
你可能会遇到一个问题是上一个video的reply残留,或者reply和summary没法同步显示,这是没事的,user card也会有这个问题。不要把这个updateData搞得乱七八糟。 |
biliscope | github_2023 | javascript | 180 | gaogaotiantian | gaogaotiantian | @@ -292,32 +302,124 @@ VideoProfileCard.prototype.drawConclusion = function() {
}
}
+VideoProfileCard.prototype.drawHotComment = function() {
+ let hotComment;
+
+ // 具有热评标签的
+ hotComment = this.data.replies.filter(reply =>
+ reply?.attr == 32768
+ )?.[0];
+
+ // 高赞的
+ if(!hotComment) {
+ hotComment = this.data.replies.reduce((lReply, rReply) =>
+ lReply.like > rReply.like ? lReply : rReply
+ );
+ }
+
+ if(hotComment) {
+ const {content, member} = hotComment;
+ const hotCommentText = document.getElementById("biliscope-hot-comment-text");
+
+ document.getElementById("biliscope-hot-comment-author").innerHTML = `${member.uname}:`;
+ document.getElementById("biliscope-hot-comment-author").onclick = function() {
+ open(`//space.bilibili.com/${member.mid}`);
+ }
+
+ if (!content?.emote && !content?.jump_url) {
+ hotCommentText.innerHTML = content.message;
+ } else {
+ hotCommentText.innerHTML = '';
+ let separators = [];
+ let emotes = content?.emote;
+ let jump_urls = content?.jump_url;
+ if (emotes) {
+ separators = separators.concat(Object.keys(emotes));
+ }
+ if (jump_urls) {
+ separators = separators.concat(Object.keys(jump_urls));
+ }
+
+ let regexStr = separators.map(s =>
+ s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join('|');
+ let hotComments, hotCommentItem;
+
+ if (regexStr) {
+ hotComments = content.message.split(new RegExp(`(${regexStr})`));
+ } else {
+ hotComments = [content.message];
+ }
+
+ let jump_urls_copy = {...jump_urls};
+ hotComments.map(s => {
+ if (emotes?.[s]) {
+ hotCommentItem = document.createElement("img");
+ hotCommentItem.style = "width:1.4em;height:1.4em;vertical-align:text-bottom;"; | 这里如果你已经用`createElement`建立element了,就用css去控制style。只有直接写html的时候可能为了方便我们去inline style。而且你这个item还不少style呢,包括下面的hover style,完全没必要去做onmouseover |
biliscope | github_2023 | javascript | 180 | gaogaotiantian | gaogaotiantian | @@ -292,32 +302,124 @@ VideoProfileCard.prototype.drawConclusion = function() {
}
}
+VideoProfileCard.prototype.drawHotComment = function() {
+ let hotComment; | 这里直接`let hotComment = `就好了啊。 |
biliscope | github_2023 | javascript | 180 | gaogaotiantian | gaogaotiantian | @@ -292,32 +302,124 @@ VideoProfileCard.prototype.drawConclusion = function() {
}
}
+VideoProfileCard.prototype.drawHotComment = function() {
+ let hotComment;
+
+ // 具有热评标签的
+ hotComment = this.data.replies.filter(reply =>
+ reply?.attr == 32768
+ )?.[0];
+
+ // 高赞的
+ if(!hotComment) { | `if`后面的空格 |
biliscope | github_2023 | javascript | 180 | gaogaotiantian | gaogaotiantian | @@ -292,32 +302,124 @@ VideoProfileCard.prototype.drawConclusion = function() {
}
}
+VideoProfileCard.prototype.drawHotComment = function() {
+ let hotComment;
+
+ // 具有热评标签的
+ hotComment = this.data.replies.filter(reply =>
+ reply?.attr == 32768
+ )?.[0];
+
+ // 高赞的
+ if(!hotComment) {
+ hotComment = this.data.replies.reduce((lReply, rReply) =>
+ lReply.like > rReply.like ? lReply : rReply
+ );
+ }
+
+ if(hotComment) {
+ const {content, member} = hotComment;
+ const hotCommentText = document.getElementById("biliscope-hot-comment-text");
+
+ document.getElementById("biliscope-hot-comment-author").innerHTML = `${member.uname}:`;
+ document.getElementById("biliscope-hot-comment-author").onclick = function() {
+ open(`//space.bilibili.com/${member.mid}`);
+ }
+
+ if (!content?.emote && !content?.jump_url) {
+ hotCommentText.innerHTML = content.message;
+ } else {
+ hotCommentText.innerHTML = '';
+ let separators = [];
+ let emotes = content?.emote; | 能用const的就const一下。 |
biliscope | github_2023 | javascript | 180 | gaogaotiantian | gaogaotiantian | @@ -292,32 +302,124 @@ VideoProfileCard.prototype.drawConclusion = function() {
}
}
+VideoProfileCard.prototype.drawHotComment = function() {
+ let hotComment;
+
+ // 具有热评标签的
+ hotComment = this.data.replies.filter(reply =>
+ reply?.attr == 32768
+ )?.[0];
+
+ // 高赞的
+ if(!hotComment) {
+ hotComment = this.data.replies.reduce((lReply, rReply) =>
+ lReply.like > rReply.like ? lReply : rReply
+ );
+ }
+
+ if(hotComment) {
+ const {content, member} = hotComment;
+ const hotCommentText = document.getElementById("biliscope-hot-comment-text");
+
+ document.getElementById("biliscope-hot-comment-author").innerHTML = `${member.uname}:`;
+ document.getElementById("biliscope-hot-comment-author").onclick = function() {
+ open(`//space.bilibili.com/${member.mid}`);
+ }
+
+ if (!content?.emote && !content?.jump_url) {
+ hotCommentText.innerHTML = content.message;
+ } else {
+ hotCommentText.innerHTML = '';
+ let separators = [];
+ let emotes = content?.emote;
+ let jump_urls = content?.jump_url;
+ if (emotes) {
+ separators = separators.concat(Object.keys(emotes));
+ }
+ if (jump_urls) {
+ separators = separators.concat(Object.keys(jump_urls));
+ }
+
+ let regexStr = separators.map(s =>
+ s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join('|');
+ let hotComments, hotCommentItem; | 这里这个`hotComments`感觉像是若干个`hotComment`(你前面定义的),而不是`hotComment`拆分出来的若干部分。命名最好改一下。 |
biliscope | github_2023 | javascript | 180 | gaogaotiantian | gaogaotiantian | @@ -292,32 +302,124 @@ VideoProfileCard.prototype.drawConclusion = function() {
}
}
+VideoProfileCard.prototype.drawHotComment = function() {
+ let hotComment;
+
+ // 具有热评标签的
+ hotComment = this.data.replies.filter(reply =>
+ reply?.attr == 32768
+ )?.[0];
+
+ // 高赞的
+ if(!hotComment) {
+ hotComment = this.data.replies.reduce((lReply, rReply) =>
+ lReply.like > rReply.like ? lReply : rReply
+ );
+ }
+
+ if(hotComment) {
+ const {content, member} = hotComment;
+ const hotCommentText = document.getElementById("biliscope-hot-comment-text");
+
+ document.getElementById("biliscope-hot-comment-author").innerHTML = `${member.uname}:`;
+ document.getElementById("biliscope-hot-comment-author").onclick = function() {
+ open(`//space.bilibili.com/${member.mid}`);
+ }
+
+ if (!content?.emote && !content?.jump_url) {
+ hotCommentText.innerHTML = content.message;
+ } else {
+ hotCommentText.innerHTML = '';
+ let separators = [];
+ let emotes = content?.emote;
+ let jump_urls = content?.jump_url;
+ if (emotes) {
+ separators = separators.concat(Object.keys(emotes));
+ }
+ if (jump_urls) {
+ separators = separators.concat(Object.keys(jump_urls));
+ }
+
+ let regexStr = separators.map(s =>
+ s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join('|');
+ let hotComments, hotCommentItem;
+
+ if (regexStr) {
+ hotComments = content.message.split(new RegExp(`(${regexStr})`));
+ } else {
+ hotComments = [content.message];
+ }
+
+ let jump_urls_copy = {...jump_urls};
+ hotComments.map(s => {
+ if (emotes?.[s]) {
+ hotCommentItem = document.createElement("img");
+ hotCommentItem.style = "width:1.4em;height:1.4em;vertical-align:text-bottom;";
+ hotCommentItem.src = emotes[s].url;
+ } else if (jump_urls_copy?.[s]) {
+ hotCommentItem = document.createElement("a");
+ hotCommentItem.style = "color:#008ac5;cursor:pointer;";
+ hotCommentItem.onmouseover = function() {
+ this.style.color = '#00AEEC';
+ }
+ hotCommentItem.onmouseout = function() {
+ this.style.color = '#008ac5';
+ }
+ hotCommentItem.target = "_blank";
+ hotCommentItem.href = jump_urls_copy[s].pc_url;
+ hotCommentItem.innerHTML = s;
+ delete jump_urls_copy[s]; | 这里需要显式删除么? |
biliscope | github_2023 | others | 180 | gaogaotiantian | gaogaotiantian | @@ -161,4 +236,4 @@
.biliscope-ai-summary-popup-body::-webkit-scrollbar-thumb {
border-radius: 4px;
background: #999
-}
+} | 这儿怎么把我最后一行的空行给改没了。 |
biliscope | github_2023 | javascript | 180 | gaogaotiantian | gaogaotiantian | @@ -292,31 +310,106 @@ VideoProfileCard.prototype.drawConclusion = function() {
}
}
+VideoProfileCard.prototype.drawHotComment = function() {
+ document.getElementById("biliscope-hot-comment-wrapper").classList.add("d-none"); | 是不是只有一种情况不显示,就是在没有reply的时候?那你这个代码是不是可以直接放到下面的判断去?因为你这个函数不是async的,在开始加`d-none`然后算到最后拿掉,应该对DOM的渲染没有影响吧。 |
biliscope | github_2023 | javascript | 180 | gaogaotiantian | gaogaotiantian | @@ -292,31 +310,106 @@ VideoProfileCard.prototype.drawConclusion = function() {
}
}
+VideoProfileCard.prototype.drawHotComment = function() {
+ document.getElementById("biliscope-hot-comment-wrapper").classList.add("d-none");
+
+ if (this.data.replies.length == 0) {
+ return;
+ }
+
+ // 具有热评标签的
+ let hotComment = this.data.replies.filter(reply =>
+ reply?.attr == 32768
+ )?.[0];
+
+ // 高赞的
+ if (!hotComment) {
+ hotComment = this.data.replies.reduce((lReply, rReply) =>
+ lReply.like > rReply.like ? lReply : rReply
+ );
+ }
+
+ if(hotComment) { | if后面的空格 |
biliscope | github_2023 | javascript | 180 | gaogaotiantian | gaogaotiantian | @@ -292,31 +310,106 @@ VideoProfileCard.prototype.drawConclusion = function() {
}
}
+VideoProfileCard.prototype.drawHotComment = function() {
+ document.getElementById("biliscope-hot-comment-wrapper").classList.add("d-none");
+
+ if (this.data.replies.length == 0) {
+ return;
+ }
+
+ // 具有热评标签的
+ let hotComment = this.data.replies.filter(reply =>
+ reply?.attr == 32768
+ )?.[0];
+
+ // 高赞的
+ if (!hotComment) {
+ hotComment = this.data.replies.reduce((lReply, rReply) =>
+ lReply.like > rReply.like ? lReply : rReply
+ );
+ }
+
+ if(hotComment) {
+ const {content, member} = hotComment;
+ const hotCommentText = document.getElementById("biliscope-hot-comment-text");
+
+ document.getElementById("biliscope-hot-comment-author").innerHTML = `${member.uname}:`;
+ document.getElementById("biliscope-hot-comment-author").onclick = function() {
+ open(`//space.bilibili.com/${member.mid}`);
+ }
+
+ if (!content?.emote && !content?.jump_url) {
+ hotCommentText.innerHTML = content.message;
+ } else {
+ hotCommentText.innerHTML = '';
+ let separators = [];
+ const emotes = content?.emote;
+ const jump_urls = content?.jump_url;
+ if (emotes) {
+ separators = separators.concat(Object.keys(emotes)); | 这里是不是可以直接
```javascript
separators = separators.concat(Object.keys(content?.emotes || {}));
``` |
biliscope | github_2023 | javascript | 180 | gaogaotiantian | gaogaotiantian | @@ -292,31 +310,106 @@ VideoProfileCard.prototype.drawConclusion = function() {
}
}
+VideoProfileCard.prototype.drawHotComment = function() {
+ document.getElementById("biliscope-hot-comment-wrapper").classList.add("d-none");
+
+ if (this.data.replies.length == 0) {
+ return;
+ }
+
+ // 具有热评标签的
+ let hotComment = this.data.replies.filter(reply =>
+ reply?.attr == 32768
+ )?.[0];
+
+ // 高赞的
+ if (!hotComment) {
+ hotComment = this.data.replies.reduce((lReply, rReply) =>
+ lReply.like > rReply.like ? lReply : rReply
+ );
+ }
+
+ if(hotComment) {
+ const {content, member} = hotComment;
+ const hotCommentText = document.getElementById("biliscope-hot-comment-text");
+
+ document.getElementById("biliscope-hot-comment-author").innerHTML = `${member.uname}:`;
+ document.getElementById("biliscope-hot-comment-author").onclick = function() {
+ open(`//space.bilibili.com/${member.mid}`);
+ }
+
+ if (!content?.emote && !content?.jump_url) {
+ hotCommentText.innerHTML = content.message;
+ } else {
+ hotCommentText.innerHTML = '';
+ let separators = [];
+ const emotes = content?.emote;
+ const jump_urls = content?.jump_url;
+ if (emotes) {
+ separators = separators.concat(Object.keys(emotes));
+ }
+ if (jump_urls) {
+ separators = separators.concat(Object.keys(jump_urls));
+ }
+
+ let regexStr = separators.map(s => | 这个regex有点复杂,稍微写个注释给个例子说明一下它在干啥。 |
biliscope | github_2023 | javascript | 180 | gaogaotiantian | gaogaotiantian | @@ -292,31 +310,106 @@ VideoProfileCard.prototype.drawConclusion = function() {
}
}
+VideoProfileCard.prototype.drawHotComment = function() {
+ document.getElementById("biliscope-hot-comment-wrapper").classList.add("d-none");
+
+ if (this.data.replies.length == 0) {
+ return;
+ }
+
+ // 具有热评标签的
+ let hotComment = this.data.replies.filter(reply =>
+ reply?.attr == 32768
+ )?.[0];
+
+ // 高赞的
+ if (!hotComment) {
+ hotComment = this.data.replies.reduce((lReply, rReply) =>
+ lReply.like > rReply.like ? lReply : rReply
+ );
+ }
+
+ if(hotComment) {
+ const {content, member} = hotComment;
+ const hotCommentText = document.getElementById("biliscope-hot-comment-text");
+
+ document.getElementById("biliscope-hot-comment-author").innerHTML = `${member.uname}:`;
+ document.getElementById("biliscope-hot-comment-author").onclick = function() {
+ open(`//space.bilibili.com/${member.mid}`);
+ }
+
+ if (!content?.emote && !content?.jump_url) {
+ hotCommentText.innerHTML = content.message;
+ } else {
+ hotCommentText.innerHTML = '';
+ let separators = [];
+ const emotes = content?.emote;
+ const jump_urls = content?.jump_url;
+ if (emotes) {
+ separators = separators.concat(Object.keys(emotes));
+ }
+ if (jump_urls) {
+ separators = separators.concat(Object.keys(jump_urls));
+ }
+
+ let regexStr = separators.map(s =>
+ s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join('|');
+ let hotCommentItems;
+
+ if (regexStr) {
+ hotCommentItems = content.message.split(new RegExp(`(${regexStr})`));
+ } else {
+ hotCommentItems = [content.message];
+ }
+
+ let jump_urls_copy = {...jump_urls};
+ hotCommentItems.map(s => {
+ let hotCommentItem;
+ if (emotes?.[s]) {
+ hotCommentItem = document.createElement("img");
+ hotCommentItem.src = emotes[s].url;
+ } else if (jump_urls_copy?.[s]) {
+ hotCommentItem = document.createElement("a");
+ hotCommentItem.target = "_blank";
+ hotCommentItem.href = jump_urls_copy[s].pc_url;
+ hotCommentItem.innerHTML = s;
+ jump_urls_copy[s] = undefined; | `undefined`是这么用的么……我不确定啊,但是我自己好像从来没有显示给一个东西assign undefined过。如果这里确实有需求删掉`s`这个key,可以delete。稍微注释一下为什么要这么干就行。 |
biliscope | github_2023 | javascript | 180 | gaogaotiantian | gaogaotiantian | @@ -292,31 +310,98 @@ VideoProfileCard.prototype.drawConclusion = function() {
}
}
+VideoProfileCard.prototype.drawHotComment = function() {
+ if (!this.data.replies?.length) {
+ document.getElementById("biliscope-hot-comment-wrapper").classList.add("d-none");
+ return;
+ }
+
+ // 具有热评标签的
+ let hotComment = this.data.replies.filter(reply =>
+ reply?.attr == 32768
+ )?.[0];
+
+ // 高赞的
+ if (!hotComment) {
+ hotComment = this.data.replies.reduce((lReply, rReply) =>
+ lReply.like > rReply.like ? lReply : rReply
+ );
+ }
+
+ if (hotComment) {
+ const {content, member} = hotComment;
+ const hotCommentText = document.getElementById("biliscope-hot-comment-text");
+ const hotCommentAuthor = document.getElementById("biliscope-hot-comment-author");
+
+ hotCommentText.innerHTML = '';
+ hotCommentAuthor.innerHTML = `${member.uname}:`;
+ hotCommentAuthor.onclick = function() {
+ open(`//space.bilibili.com/${member.mid}`);
+ }
+
+ const emotes = content?.emote;
+ const jump_urls = content?.jump_url;
+ const separators = Object.keys(emotes || {}).concat(Object.keys(jump_urls || {}));
+
+ // 转义separators中每个元素的特殊字符,并用'|'作为分隔符连接为字符串
+ const regexStr = separators.map(s =>
+ s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
+ ).join('|');
+
+ if (!regexStr) {
+ hotCommentText.innerHTML = content.message;
+ } else {
+ let jump_urls_copy = {...jump_urls};
+
+ content.message.split(new RegExp(`(${regexStr})`)).map(s => {
+ let hotCommentItem;
+ if (emotes?.[s]) {
+ hotCommentItem = document.createElement("img");
+ hotCommentItem.src = emotes[s].url;
+ } else if (jump_urls_copy?.[s]) {
+ hotCommentItem = document.createElement("a");
+ hotCommentItem.target = "_blank";
+ hotCommentItem.href = jump_urls_copy[s].pc_url;
+ hotCommentItem.innerHTML = s;
+
+ // 只标注一次jump_url,其余当作普通文本
+ delete jump_urls_copy[s];
+ } else {
+ hotCommentItem = document.createElement("span");
+ hotCommentItem.innerHTML = s;
+ }
+
+ hotCommentText.appendChild(hotCommentItem);
+ });
+ }
+
+ document.getElementById("biliscope-hot-comment-wrapper").classList.remove("d-none");
+ }
+}
+
VideoProfileCard.prototype.updateData = function(data) {
if (data["api"] == "view") {
this.data.view = data["payload"];
} else if (data["api"] == "conclusion") {
this.data.conclusion = data["payload"];
if (this.data.conclusion.model_result.summary) {
this.valid = true;
- } else {
- this.valid = false;
}
this.drawConclusion();
+ } else if (data["api"] == "reply") {
+ this.data.replies = data.payload?.replies;
+ this.drawHotComment();
}
- if (this.enabled && this.el && this.el.style.display != "flex") {
- if (this.valid != null) {
- this.el.style.display = "flex";
- if (this.valid) {
- document.getElementById("biliscope-ai-summary-popup").classList.remove("d-none");
- document.getElementById("biliscope-ai-summary-none").classList.add("d-none");
- } else {
- document.getElementById("biliscope-ai-summary-popup").classList.add("d-none");
- document.getElementById("biliscope-ai-summary-none").classList.remove("d-none");
- }
-
+ if (this.enabled && this.el) {
+ if (this.valid) { | 你把这里改成这样的话,如果先完成的API是`view`,那就会在完全没有数据的情况下直接显示东西,这是没必要的。`this.valid`是`null`代表没有足够数据判断,啥也不现实,`false`代表确定了,显示没有AI总结,`true`代表确定了,显示AI总结和热评。 |
biliscope | github_2023 | javascript | 181 | gaogaotiantian | gaogaotiantian | @@ -42,6 +42,34 @@ window.addEventListener("load", function() {
});
}
}
+
+ let hookComment = () => { | 这个let可以const吧 |
biliscope | github_2023 | javascript | 181 | gaogaotiantian | gaogaotiantian | @@ -42,6 +42,34 @@ window.addEventListener("load", function() {
});
}
}
+
+ let hookComment = () => {
+ if (!document.querySelector("bili-comments")?.shadowRoot.querySelector("bili-comment-thread-renderer")
+ ?.shadowRoot.querySelector("bili-comment-renderer")) { | 我们这里把所有的换行统一一下吧。产生带`.`的换行都直接把`.`对齐最开始那个parent。比如
```
if (!document.
.querySelector(..))
```
然后保证`.shadowRoot`不成为开头的那个element,不好读,因为`.shadowRoot`一般是紧跟着上一个element的。
下面还有几个换行也是,53行56行之类的。 |
biliscope | github_2023 | javascript | 181 | gaogaotiantian | gaogaotiantian | @@ -42,6 +42,34 @@ window.addEventListener("load", function() {
});
}
}
+
+ let hookComment = () => {
+ if (!document.querySelector("bili-comments")?.shadowRoot.querySelector("bili-comment-thread-renderer")
+ ?.shadowRoot.querySelector("bili-comment-renderer")) {
+ setTimeout(() => hookComment(), 400);
+ return;
+ }
+
+ document.querySelector("bili-comments")
+ .shadowRoot.querySelectorAll("bili-comment-thread-renderer")
+ .forEach(element => {
+ el = element.shadowRoot.querySelector("bili-comment-renderer")
+ .shadowRoot.getElementById("user-avatar");
+ el.addEventListener("mouseover", showProfileDebounce);
+
+ replies = element.shadowRoot.querySelector("bili-comment-replies-renderer") | `const replies = ...` |
biliscope | github_2023 | javascript | 181 | gaogaotiantian | gaogaotiantian | @@ -42,6 +42,44 @@ window.addEventListener("load", function() {
});
}
}
+
+ let retry = 20;
+ const hookComment = (retry) => {
+ if (retry < 1) {
+ return;
+ }
+
+ if (!document.querySelector("bili-comments")?.shadowRoot
+ .querySelector("bili-comment-thread-renderer")?.shadowRoot | 我更倾向于这里的`.`和`d`对齐,而不是`!` |
biliscope | github_2023 | javascript | 181 | gaogaotiantian | gaogaotiantian | @@ -42,6 +42,44 @@ window.addEventListener("load", function() {
});
}
}
+
+ let retry = 20; | 这里的variable definition是没意义的,你实际用到它的时候在很下面。而且我觉得直接传个constant就行了。 |
biliscope | github_2023 | javascript | 181 | gaogaotiantian | gaogaotiantian | @@ -42,6 +42,44 @@ window.addEventListener("load", function() {
});
}
}
+
+ let retry = 20;
+ const hookComment = (retry) => {
+ if (retry < 1) {
+ return;
+ }
+
+ if (!document.querySelector("bili-comments")?.shadowRoot
+ .querySelector("bili-comment-thread-renderer")?.shadowRoot
+ .querySelector("bili-comment-renderer")) {
+ setTimeout(() => hookComment(retry-1), 500);
+ return;
+ }
+
+ let el;
+ document.querySelector("bili-comments").shadowRoot
+ .querySelectorAll("bili-comment-thread-renderer")
+ .forEach(element => {
+ el = element.shadowRoot
+ .querySelector("bili-comment-renderer").shadowRoot | 这里也是,`.`和`e`对齐 |
biliscope | github_2023 | javascript | 181 | gaogaotiantian | gaogaotiantian | @@ -42,6 +42,44 @@ window.addEventListener("load", function() {
});
}
}
+
+ let retry = 20;
+ const hookComment = (retry) => {
+ if (retry < 1) {
+ return;
+ }
+
+ if (!document.querySelector("bili-comments")?.shadowRoot
+ .querySelector("bili-comment-thread-renderer")?.shadowRoot
+ .querySelector("bili-comment-renderer")) {
+ setTimeout(() => hookComment(retry-1), 500);
+ return;
+ }
+
+ let el;
+ document.querySelector("bili-comments").shadowRoot
+ .querySelectorAll("bili-comment-thread-renderer")
+ .forEach(element => {
+ el = element.shadowRoot
+ .querySelector("bili-comment-renderer").shadowRoot
+ .getElementById("user-avatar");
+ el.addEventListener("mouseover", showProfileDebounce);
+
+ const replies = element.shadowRoot
+ .querySelector("bili-comment-replies-renderer").shadowRoot | 这里的`.`也是和`element`的`e`对齐。就是所有的`.`都去找它最开始的那个root的第一个字母 |
biliscope | github_2023 | javascript | 181 | gaogaotiantian | gaogaotiantian | @@ -42,6 +42,44 @@ window.addEventListener("load", function() {
});
}
}
+
+ let retry = 20;
+ const hookComment = (retry) => {
+ if (retry < 1) {
+ return;
+ }
+
+ if (!document.querySelector("bili-comments")?.shadowRoot
+ .querySelector("bili-comment-thread-renderer")?.shadowRoot
+ .querySelector("bili-comment-renderer")) {
+ setTimeout(() => hookComment(retry-1), 500);
+ return;
+ }
+
+ let el;
+ document.querySelector("bili-comments").shadowRoot
+ .querySelectorAll("bili-comment-thread-renderer")
+ .forEach(element => {
+ el = element.shadowRoot
+ .querySelector("bili-comment-renderer").shadowRoot
+ .getElementById("user-avatar");
+ el.addEventListener("mouseover", showProfileDebounce);
+
+ const replies = element.shadowRoot
+ .querySelector("bili-comment-replies-renderer").shadowRoot
+ .querySelectorAll("bili-comment-reply-renderer");
+ for (const reply of replies){
+ el = reply.shadowRoot
+ .querySelector("bili-comment-user-info") | 这个也是和`r`对齐。 |
biliscope | github_2023 | javascript | 181 | gaogaotiantian | gaogaotiantian | @@ -42,6 +42,44 @@ window.addEventListener("load", function() {
});
}
}
+
+ let retry = 20;
+ const hookComment = (retry) => {
+ if (retry < 1) {
+ return;
+ }
+
+ if (!document.querySelector("bili-comments")?.shadowRoot
+ .querySelector("bili-comment-thread-renderer")?.shadowRoot
+ .querySelector("bili-comment-renderer")) {
+ setTimeout(() => hookComment(retry-1), 500);
+ return;
+ }
+
+ let el;
+ document.querySelector("bili-comments").shadowRoot
+ .querySelectorAll("bili-comment-thread-renderer")
+ .forEach(element => {
+ el = element.shadowRoot
+ .querySelector("bili-comment-renderer").shadowRoot
+ .getElementById("user-avatar");
+ el.addEventListener("mouseover", showProfileDebounce);
+
+ const replies = element.shadowRoot
+ .querySelector("bili-comment-replies-renderer").shadowRoot
+ .querySelectorAll("bili-comment-reply-renderer");
+ for (const reply of replies){
+ el = reply.shadowRoot
+ .querySelector("bili-comment-user-info")
+ .getElementsByTagName("a")[0];
+ el.addEventListener("mouseover", showProfileDebounce);
+ }
+ })
+ }
+
+ if (window.location.href.startsWith(BILIBILI_VIDEO_URL)) {
+ setTimeout(() => hookComment(retry), 500); | 这里retry其实没必要单独写个var我觉得。实在特别想写可以直接在这里定义一个`const maxRetry = 20`然后pass一下。 |
biliscope | github_2023 | javascript | 181 | gaogaotiantian | gaogaotiantian | @@ -42,6 +42,43 @@ window.addEventListener("load", function() {
});
}
}
+
+ const hookComment = (retry) => {
+ if (retry < 1) {
+ return;
+ }
+
+ if (!document.querySelector("bili-comments")?.shadowRoot
+ .querySelector("bili-comment-thread-renderer")?.shadowRoot
+ .querySelector("bili-comment-renderer")) {
+ setTimeout(() => hookComment(retry-1), 500);
+ return;
+ }
+
+ let el; | 这个`el`为啥要定义在外面?为啥不定义在61行? |
biliscope | github_2023 | javascript | 181 | gaogaotiantian | gaogaotiantian | @@ -42,6 +42,42 @@ window.addEventListener("load", function() {
});
}
}
+
+ const hookComment = (retry) => {
+ if (retry < 1) {
+ return;
+ }
+
+ if (!document.querySelector("bili-comments")?.shadowRoot
+ .querySelector("bili-comment-thread-renderer")?.shadowRoot
+ .querySelector("bili-comment-renderer")) {
+ setTimeout(() => hookComment(retry-1), 500);
+ return;
+ }
+
+ document.querySelector("bili-comments").shadowRoot
+ .querySelectorAll("bili-comment-thread-renderer")
+ .forEach(element => {
+ const avatar = element.shadowRoot
+ .querySelector("bili-comment-renderer").shadowRoot | 这里的`.`对齐有问题。 |
biliscope | github_2023 | javascript | 181 | gaogaotiantian | gaogaotiantian | @@ -42,6 +42,42 @@ window.addEventListener("load", function() {
});
}
}
+
+ const hookComment = (retry) => {
+ if (retry < 1) {
+ return;
+ }
+
+ if (!document.querySelector("bili-comments")?.shadowRoot
+ .querySelector("bili-comment-thread-renderer")?.shadowRoot
+ .querySelector("bili-comment-renderer")) {
+ setTimeout(() => hookComment(retry-1), 500);
+ return;
+ }
+
+ document.querySelector("bili-comments").shadowRoot
+ .querySelectorAll("bili-comment-thread-renderer")
+ .forEach(element => {
+ const avatar = element.shadowRoot
+ .querySelector("bili-comment-renderer").shadowRoot
+ .getElementById("user-avatar");
+ avatar.addEventListener("mouseover", showProfileDebounce);
+
+ const replies = element.shadowRoot
+ .querySelector("bili-comment-replies-renderer").shadowRoot
+ .querySelectorAll("bili-comment-reply-renderer");
+ for (const reply of replies){
+ const avatar = reply.shadowRoot | 这里就不是avatar了,avatar是头像,这里应该是userInfo或者userName之类的。 |
biliscope | github_2023 | javascript | 186 | gaogaotiantian | gaogaotiantian | @@ -76,6 +76,13 @@ VideoTagManager.prototype.updateData = function(data) {
this.tags.add("低质");
newTag = true;
}
+
+ const staffs = data.payload?.staff;
+
+ if (staffs?.filter(staff => staff?.title == "赞助商")) { | ```suggestion
if (staffs?.find(staff => staff?.title == "赞助商")) {
``` |
biliscope | github_2023 | javascript | 171 | gaogaotiantian | gaogaotiantian | @@ -31,6 +32,15 @@ window.addEventListener("load", function() {
(document.head || document.documentElement).appendChild(s);
}
+ if (biliScopeOptions.enableRollbackFeedcard && document.location.pathname == '/') { | 这里这个check不太对,check一下主页是对的,但是这个check在比如`https://t.bilibili.com/`的情况下也会过。应该要再去去check一下href. |
biliscope | github_2023 | javascript | 171 | gaogaotiantian | gaogaotiantian | @@ -31,6 +32,15 @@ window.addEventListener("load", function() {
(document.head || document.documentElement).appendChild(s);
}
+ if (biliScopeOptions.enableRollbackFeedcard && document.location.pathname == '/') {
+ const rollBtn = document.querySelector('.roll-btn');
+ if (rollBtn) {
+ feedcardManager.addButton(rollBtn.parentElement); | 这里为啥不直接query `.feed-roll-btn`?我有个考量是我们实际上加了两个`.roll-btn`,而且如果我们可以直接定位到这个parent,就没必要找btn再去找parent了吧。 |
biliscope | github_2023 | javascript | 171 | gaogaotiantian | gaogaotiantian | @@ -0,0 +1,110 @@
+function FeedcardManager() {
+ this.backwardStack = [];
+ this.forwardStack = [];
+ this.backwardButton = null;
+ this.forwardButton = null;
+}
+
+FeedcardManager.prototype.addButton = function (parentNode) {
+ const buttonWrapper = document.createElement('div');
+ buttonWrapper.innerHTML = `
+ <button id="biliscope-feedcard-backward" class="primary-btn roll-btn" style="margin-top: 20px; margin-bottom: 10px; visibility: hidden; transition: visibility 0s;">
+ <svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" style="margin: 3px 0;">
+ <path d="M12 23.9917H36" stroke="#000" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
+ <path d="M24 36L12 24L24 12" stroke="#000" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
+ </svg>
+ </button>
+ <button id="biliscope-feedcard-forward" class="primary-btn roll-btn" style="visibility: hidden; transition: visibility 0s;">
+ <svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" style="margin: 3px 0;">
+ <path d="M36 24.0083H12" stroke="#000" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
+ <path d="M24 12L36 24L24 36" stroke="#000" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
+ </svg>
+ </button>
+ `;
+ parentNode.appendChild(buttonWrapper);
+
+ this.backwardButton = document.getElementById('biliscope-feedcard-backward');
+ this.backwardButton.addEventListener('click', () => {
+ this.backward();
+ });
+
+ this.forwardButton = document.getElementById('biliscope-feedcard-forward');
+ this.forwardButton.addEventListener('click', () => {
+ this.forward();
+ });
+}
+
+FeedcardManager.prototype.refreshButtonState = function () {
+ if (this.backwardStack.length > 0) {
+ this.backwardButton.style.visibility = 'visible'; | 这里我想了一下,我们把向前的button一直保留,然后做disable,就是这个按钮一直在,但是你按到头了就不能按了。然后把向后的button做visibility或者d-none,就是正常情况下不显示这个向后的button,只有开始回退了再显式。我感觉好像更好一些。 |
biliscope | github_2023 | javascript | 171 | gaogaotiantian | gaogaotiantian | @@ -31,6 +32,12 @@ window.addEventListener("load", function() {
(document.head || document.documentElement).appendChild(s);
}
+ if (biliScopeOptions.enableRollbackFeedcard && document.location.href == 'https://www.bilibili.com/') { | 这里不对,如果是从别的页面切过来,`document.location.href`有可能带一些零碎,比如`https://www.bilibili.com/?spm_id_from=666.32.0.0`。这里你需要查两个东西,`document.location.hostname`(或者`document.location.origin`),加上`document.location.pathname`。 |
biliscope | github_2023 | javascript | 171 | gaogaotiantian | gaogaotiantian | @@ -31,6 +32,12 @@ window.addEventListener("load", function() {
(document.head || document.documentElement).appendChild(s);
}
+ if (biliScopeOptions.enableRollbackFeedcard && document.location.href == 'https://www.bilibili.com/') {
+ feedcardManager.addButton(document.querySelector('.feed-roll-btn')); | 这里没检查如果不存在`.feed-roll-btn`的情况,最好还是查一下。不在这里查,就得在`addButton`里查。 |
biliscope | github_2023 | javascript | 171 | gaogaotiantian | gaogaotiantian | @@ -31,6 +32,12 @@ window.addEventListener("load", function() {
(document.head || document.documentElement).appendChild(s);
}
+ if (biliScopeOptions.enableRollbackFeedcard && document.location.href == 'https://www.bilibili.com/') {
+ feedcardManager.addButton(document.querySelector('.feed-roll-btn'));
+ document.querySelector('.roll-btn').addEventListener('click', () => { | 这里也是,因为这个是依赖B站的前端实现的,万一它忽然改了,这里我们可以没有这个功能,但是不能在这儿crash掉。你可以变成比如`?.addEventListener()`之类的,或者检查一下有没有。 |
biliscope | github_2023 | others | 126 | gaogaotiantian | gaogaotiantian | @@ -23,7 +23,7 @@
<hr>
<div class="item">
- <label for="enable-tag-color">根据标签修改用户名颜色:</label>
+ <label for="enable-tag-color">根据标签颜色修改用户名颜色:</label> | ```suggestion
<label for="enable-tag-color">根据标签修改用户名颜色:</label>
``` |
biliscope | github_2023 | javascript | 128 | gaogaotiantian | F-park | @@ -15,6 +15,16 @@ function getUserIdFromLink(s) {
return userId;
}
+function getVideoIdFromLink(s) {
+ let regex = /.*?bilibili.com\/video\/(BV[1-9a-zA-Z]{10})\/?$/; | 视频播放界面下的推荐视频目前无法匹配到,因为链接形式为 `/video/BV1fk4y1U7Kv/?spm_id_from=xxx`,进行如下修改即可匹配到。
```patch
- let regex = /.*?bilibili.com\/video\/(BV[1-9a-zA-Z]{10})\/?$/;
+ let regex = /.*?bilibili.com\/video\/(BV[1-9a-zA-Z]{10})/;
``` |
biliscope | github_2023 | javascript | 128 | gaogaotiantian | F-park | @@ -80,6 +90,11 @@ function labelLinks() {
if (userId) {
el.setAttribute("biliscope-userid", userId);
}
+ } else if (el.href.startsWith(BILIBILI_VIDEO_URL)) {
+ let videoId = getVideoIdFromLink(el.href);
+ if (videoId) {
+ el.setAttribute("biliscope-videoid", videoId); | 标题提示会同时与卡片显示(在主页下很明显),需要加入空 title 属性隐藏视频链接的标题提示。
```js
el.setAttribute("title", "");
``` |
biliscope | github_2023 | others | 128 | gaogaotiantian | F-park | @@ -0,0 +1,154 @@
+#biliscope-video-card {
+ position: absolute;
+ z-index: 1002;
+ width: 375px;
+ font-size: 14px;
+}
+
+#biliscope-video-card * {
+ box-sizing: content-box;
+}
+
+#biliscope-video-card .d-none {
+ display: none;
+}
+
+.biliscope-ai-summary-popup {
+ width: 100%;
+ height: 100%;
+ border-radius: 8px;
+ border: 1px solid #e3e5e7;
+ background: #fff;
+ box-shadow: 0 0 30px rgba(0, 0, 0, .10196);
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-direction: column;
+ flex-direction: column;
+ -ms-user-select: none;
+ user-select: none
+}
+
+.biliscope-ai-summary-popup-header {
+ position: relative;
+ border-radius: 8px 8px 0 0;
+ -ms-flex-negative: 0;
+ flex-shrink: 0;
+ height: 32px;
+ padding: 18px 14px 10px;
+ -ms-flex-pack: justify;
+ justify-content: space-between;
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABwgAAABoCAMAAADSHlRgAAADAFBMVEXH3P/M4//C4f8AAADE3f/A3//E3//B3v/B4P/B4P+/3v/C3v/C3v/A3//F3/+/3v+/3/+/3v/A3v/I2//D3v+/3f++3f+/3v+/3//A3/+/3/+/3v++3v/A3v+82/++3P+/4P/A3/+/4P++3f++3f/D3v/A4P+/3v+82//B4P/L2v++3P+93f+93P/A3//C4P++3f/B4P/i8P+83P+/3v+93P+93P/B4f/B4P/M2P/C4P/B3/+/3f+93f++3f/B4P+72/+83P+83P+92/++3f+93P+82//C4P+72v/A3//A3/+83P+32P7B4P/B4P+32P7B4P/C4P+/3v/B3/+52P683P+42f+22P652f672/+72v/o9P/B3/+52f611v7v9v++3f+32f683P+22P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e3hb2QDBhrpIRDZJJk38D4eBaNgFIyCUTBsAQCZ8YikMiCCuAAAAABJRU5ErkJggg==) 0 0/900px 52px no-repeat;
+}
+
+.biliscope-ai-summary-popup-header,
+.biliscope-ai-summary-popup-header-left {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-align: center;
+ align-items: center
+}
+
+.biliscope-ai-summary-popup-header-left .biliscope-ai-summary-popup-icon {
+ display: -ms-flexbox;
+ display: flex;
+ margin-right: 8px
+}
+
+.biliscope-ai-summary-popup-header-left .biliscope-ai-summary-popup-tips {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-align: center;
+ align-items: center
+}
+
+.biliscope-ai-summary-popup-header-left .biliscope-ai-summary-popup-tips-text {
+ color: #18191c;
+ font-size: 14px;
+ font-weight: 700
+}
+
+.biliscope-ai-summary-popup-body {
+ -ms-flex: 1;
+ flex: 1;
+ max-height: 50vh;
+ overflow: auto;
+ color: #18191c;
+ box-sizing: border-box;
+ padding: 8px 8px 6px
+}
+
+.biliscope-ai-summary-popup-body-abstracts {
+ padding: 8px 10px;
+ font-size: 14px;
+ font-weight: 700
+} | 总的摘要在之前实现的版本是可以复制的,这里可以加上 `user-select: text` 和 `-webkit-user-select: text` 让用户可以复制文本。 |
biliscope | github_2023 | javascript | 122 | gaogaotiantian | gaogaotiantian | @@ -638,19 +638,17 @@ UserProfileCard.prototype.updateData = function (data) {
let canvas = document.getElementById("word-cloud-canvas");
if (this.data["wordcloud"].length > 0) {
this.drawWordCloud(canvas);
- this.drawVideoTags();
} else {
canvas.style.height = "0px";
canvas.height = 0;
}
- } else if (this.data['name']) {
- // wait until name is ready
+ } else if (data["data"]["name"]) { | 这里没看懂你要干什么。这个部分的意思是只有拿到了name才更新,你改成只有这个数据里有name才更新,那新来的数据不是永远刷新不了了? |
biliscope | github_2023 | javascript | 122 | gaogaotiantian | gaogaotiantian | @@ -638,19 +638,19 @@ UserProfileCard.prototype.updateData = function (data) {
let canvas = document.getElementById("word-cloud-canvas");
if (this.data["wordcloud"].length > 0) {
this.drawWordCloud(canvas);
- this.drawVideoTags();
} else {
canvas.style.height = "0px";
canvas.height = 0;
}
- } else if (this.data['name']) {
- // wait until name is ready
- document.getElementById("biliscope-id-card-data").innerHTML = getUserProfileCardDataHTML(this.data);
+ } else if (data["data"]?.["name"]) {
this.setupTriggers();
this.drawVideoTags();
+ } else if (this.data["name"]) {
+ // wait until name is ready
+ document.getElementById("biliscope-id-card-data").innerHTML = getUserProfileCardDataHTML(this.data); | 这里还是错的,因为你不能保证在"info"这个API到的时候你的videoTags是ready to draw的状态。videoTags对若干个data是有dependency的,比如`data["relation"]`。如果你只在"info"到的时候draw,可能有的draw不出来。
这就显示出了手动测试的一个问题——对于这种大量async的代码,你的手动测试覆盖率极低,改错了代码都很可能意识不到。也就是说,需要在代码结构本身上下功夫,让代码结构更robost。
这就是为什么要去做full render。你现在这个就是非常非常不好的习惯,试图在完全没有performance问题的情况下,在业务代码上去抢performance。总想着,我要是少几个function call多好——并不好,这是个**坏习惯**。
我记得我之前和你说过,前端这个代码,最理想的情况就是"stateless",无状态的。代码尽量没有状态依赖,每次都把拥有的全部数据画出来——除非真的出现性能瓶颈。 |
biliscope | github_2023 | javascript | 122 | gaogaotiantian | gaogaotiantian | @@ -638,19 +638,19 @@ UserProfileCard.prototype.updateData = function (data) {
let canvas = document.getElementById("word-cloud-canvas");
if (this.data["wordcloud"].length > 0) {
this.drawWordCloud(canvas);
- this.drawVideoTags(); | 你有没有思考过这里最开始为什么要写一个`drawVideoTags()`呢? |
biliscope | github_2023 | javascript | 125 | gaogaotiantian | gaogaotiantian | @@ -680,5 +683,4 @@ window.addEventListener("load", function() {
getMyInfo().then((data) => {
myMid = data["profile"]["mid"];
}) | 这个空行是特意留在这个地方的。为了格式舒适
一般来说,我们不轻易在PR里去改空行之类的,要尽量减少每一个commit涉及的内容,尽量不要一个PR做若干个不太相关的事情。把这个空行修改revert了就行。 |
biliscope | github_2023 | javascript | 117 | gaogaotiantian | gaogaotiantian | @@ -57,6 +57,24 @@ function updatePage(clear=true) {
}
}
+ let vuiTabs = Array.from(document.querySelectorAll(".vui_tabs--nav-link")); | 为啥这里选择了querySelectorAll而不是getElementsByClassName? |
biliscope | github_2023 | javascript | 111 | gaogaotiantian | gaogaotiantian | @@ -208,22 +199,21 @@ function updateVideoData(userId, callback) {
}
function cacheValid(cache) {
- for (let key of ["stat", "info", "wordcloud", "count"]) {
- if (!cache[key]) {
- return false;
- }
+ if (!cache) {
+ return false;
}
- return true;
+
+ return ["stat", "info", "wordcloud", "count"].every((key) => cache[key]);
}
function cacheAndUpdate(callback, userId, api, payload) {
- let cache = {};
+ let cache = userInfoCache.get(userId) ?? {};
+
+ cache[api] = payload;
+
if (!userInfoCache.has(userId)) { | 你可以把这个if直接删了吧。 |
biliscope | github_2023 | javascript | 119 | gaogaotiantian | gaogaotiantian | @@ -664,11 +664,10 @@ window.addEventListener("load", function() {
getGuardInfo(6726252, 245645656).then((data) => {
guardInfo = data;
// Shuffle guardInfo
- for (let i = 0; i < guardInfo.length; i++) {
- let j = Math.floor(Math.random() * guardInfo.length);
- let t = guardInfo[i];
- guardInfo[i] = guardInfo[j];
- guardInfo[j] = t;
+ let i = guardInfo.length;
+ while(i) { | ```suggestion
while (i) {
``` |
biliscope | github_2023 | javascript | 120 | gaogaotiantian | F-park | @@ -290,23 +279,18 @@ async function requestGuardPage(roomid, uid, pn, map) {
async function getGuardInfo(roomId, uid) {
let map = new Map();
- let promises = [];
- let pn = 1;
- return requestGuardPage(roomId, uid, pn, map).then((data) => {
+ return requestGuardPage(roomId, uid, 1, map).then((data) => {
if (data["code"] == 0) {
let count = data["data"]["info"]["num"];
- if (count > 30) {
- while (pn * 30 < count) {
- pn += 1;
- promises.push(requestGuardPage(roomId, uid, pn, map));
- }
- return Promise.all(promises).then((values) => {
- let data = Array.from(map.values());
- return data
- })
- } else {
- return Array.from(map.values());
+ let pn = 1;
+ let promises = [];
+ while (pn * 30 < count) {
+ pn += 1;
+ promises.push(requestGuardPage(roomId, uid, pn, map));
}
+ return Promise.all(promises).then((values) => {
+ return Array.from(map.values());
+ })
} else {
return [];
} | 给个建议,这里可以提前返回减少 if 嵌套
```js
if (data["code"] != 0) {
return [];
}
let count = data["data"]["info"]["num"];
// 其他代码
``` |
biliscope | github_2023 | javascript | 120 | gaogaotiantian | F-park | @@ -173,32 +173,21 @@ function updateVideoData(userId, callback) {
let count = data["data"]["page"]["count"];
cacheAndUpdate(callback, userId, "count", {"count": count});
- if (count > 0) {
- let lastVideoTimestamp = data["data"]["list"]["vlist"][0]["created"];
- cacheAndUpdate(callback, userId, "lastVideoTimestamp", {"timestamp": lastVideoTimestamp});
- } else {
- cacheAndUpdate(callback, userId, "lastVideoTimestamp", {"timestamp": null});
- }
+ let lastVideoTimestamp = count > 0 ? data["data"]["list"]["vlist"][0]["created"] : null; | biliscope 里的三元运算符使用的基本是 `a>b ? a: b` 的形式,不确定这里的格式是否要修改。 |
biliscope | github_2023 | javascript | 120 | gaogaotiantian | gaogaotiantian | @@ -175,30 +175,23 @@ function updateVideoData(userId, callback) {
if (count > 0) {
let lastVideoTimestamp = data["data"]["list"]["vlist"][0]["created"];
- cacheAndUpdate(callback, userId, "lastVideoTimestamp", {"timestamp": lastVideoTimestamp});
+ cacheAndUpdate(callback, userId, "lastVideoTimestamp", { "timestamp": lastVideoTimestamp }); | 现在的code base里的object大括号里面应该基本没有空格吧?这里不要改非feature的东西了,影响review和后面的commit check。如果未来有需求,我们统一去改格式。 |
biliscope | github_2023 | others | 99 | gaogaotiantian | gaogaotiantian | @@ -434,3 +434,7 @@
#biliscope-id-card #word-cloud-toggler svg {
padding: 2px 0px;
}
+
+.arrow-up, .arrow-down {
+ cursor: pointer; | 这里前面加一个`#biliscope-id-card`的限定吧,这俩名字有点短容易撞。 |
biliscope | github_2023 | others | 99 | gaogaotiantian | gaogaotiantian | @@ -434,3 +434,7 @@
#biliscope-id-card #word-cloud-toggler svg {
padding: 2px 0px;
}
+
+#biliscope-id-card #word-cloud-toggler .arrow-up, .arrow-down { | ```suggestion
#biliscope-id-card .arrow-up,
#biliscope-id-card .arrow-down {
```
应该是这样的吧。你现在的`.arrow-down`应该是不受前面的部分制约的。 |
biliscope | github_2023 | others | 79 | gaogaotiantian | gaogaotiantian | @@ -356,7 +356,7 @@
}
#biliscope-profile-note textarea:focus,#biliscope-profile-note textarea:hover {
- border-color: #00a1d6
+ border-color: #00AEEC; | 这里不要改,这里和公告栏是统一的。
```css
.be-textarea_inner:focus,.be-textarea_inner:hover {
border-color: #00a1d6
}
``` |
biliscope | github_2023 | others | 79 | gaogaotiantian | gaogaotiantian | @@ -396,7 +397,7 @@
}
#biliscope-id-card .biliscope-badge-video-tag {
- background-color: #00a1d6;
+ background-color: #00AEEC; | color和其它的css统一一下用小写吧。 |
biliscope | github_2023 | javascript | 58 | gaogaotiantian | gaogaotiantian | @@ -1,3 +1,6 @@
BILIBILI_SPACE_URL = "https://space.bilibili.com/"
BILIBILI_SEARCH_URL = "https://search.bilibili.com/"
-BILIBILI_VIDEO_TYPE_MAP = {"1": "动画", "24": "MAD·AMV", "25": "MMD·3D", "47": "短片·手书·配音", "210": "手办·模玩", "86": "特摄", "253": "动漫杂谈", "27": "综合", "13": "番剧", "51": "资讯", "152": "官方延伸", "32": "完结动画", "33": "连载动画", "167": "国创", "153": "国产动画", "168": "国产原创相关", "169": "布袋戏", "170": "资讯", "195": "动态漫·广播剧", "3": "音乐", "28": "原创音乐", "31": "翻唱", "30": "VOCALOID·UTAU", "59": "演奏", "193": "MV", "29": "音乐现场", "130": "音乐综合", "243": "乐评盘点", "244": "音乐教学", "129": "舞蹈", "20": "宅舞", "154": "舞蹈综合", "156": "舞蹈教程", "198": "街舞", "199": "明星舞蹈", "200": "中国舞", "4": "游戏", "17": "单机游戏", "171": "电子竞技", "172": "手机游戏", "65": "网络游戏", "173": "桌游棋牌", "121": "GMV", "136": "音游", "19": "Mugen", "36": "知识", "201": "科学科普", "124": "社科·法律·心理", "228": "人文历史", "207": "财经商业", "208": "校园学习", "209": "职业职场", "229": "设计·创意", "122": "野生技术协会", "188": "科技", "95": "数码", "230": "软件应用", "231": "计算机技术", "232": "科工机械 ", "233": "极客DIY", "234": "运动", "235": "篮球", "249": "足球", "164": "健身", "236": "竞技体育", "237": "运动文化", "238": "运动综合", "223": "汽车", "245": "赛车", "246": "改装玩车", "247": "新能源车", "248": "房车", "240": "摩托车", "227": "购车攻略", "176": "汽车生活", "160": "生活", "138": "搞笑", "250": "出行", "251": "三农", "239": "家居房产", "161": "手工", "162": "绘画", "21": "日常", "211": "美食", "76": "美食制作", "212": "美食侦探", "213": "美食测评", "214": "田园美食", "215": "美食记录", "217": "动物圈", "218": "喵星人", "219": "汪星人", "220": "大熊猫", "221": "野生动物", "222": "爬宠", "75": "动物综合", "119": "鬼畜", "22": "鬼畜调教", "26": "音MAD", "126": "人力VOCALOID", "216": "鬼畜剧场", "127": "教程演示", "155": "时尚", "157": "美妆护肤", "252": "仿妆cos", "158": "穿搭", "159": "时尚潮流", "202": "资讯", "203": "热点", "204": "环球", "205": "社会", "206": "综合", "165": "广告", "5": "娱乐", "71": "综艺", "241": "娱乐杂谈", "242": "粉丝创作", "137": "明星综合", "181": "影视", "182": "影视杂谈", "183": "影视剪辑", "85": "小剧场", "184": "预告·资讯", "177": "纪录片", "37": "人文·历史", "178": "科学·探索·自然", "179": "军事", "180": "社会·美食·旅行", "23": "电影", "147": "华语电影", "145": "欧美电影", "146": "日本电影", "83": "其他国家", "11": "电视剧", "185": "国产剧", "187": "海外剧"}
+BILIBILI_VIDEO_TYPE_MAP = {"1": "动画", "24": "MAD·AMV", "25": "MMD·3D", "47": "短片·手书·配音", "210": "手办·模玩", "86": "特摄", "253": "动漫杂谈", "27": "综合", "13": "番剧", "51": "番剧资讯", "152": "官方延伸", "32": "完结动画", "33": "连载动画", "167": "国创", "153": "国产动画", "168": "国产原创相关", "169": "布袋戏", "170": "动画资讯", "195": "动态漫·广播剧", "3": "音乐", "28": "原创音乐", "31": "翻唱", "30": "VOCALOID·UTAU", "59": "演奏", "193": "MV", "29": "音乐现场", "130": "音乐综合", "243": "乐评盘点", "244": "音乐教学", "129": "舞蹈", "20": "宅舞", "154": "舞蹈综合", "156": "舞蹈教程", "198": "街舞", "199": "明星舞蹈", "200": "国风舞蹈", "4": "游戏", "17": "单机游戏", "171": "电子竞技", "172": "手机游戏", "65": "网络游戏", "173": "桌游棋牌", "121": "GMV", "136": "音游", "19": "Mugen", "36": "知识", "201": "科学科普", "124": "社科·法律·心理", "228": "人文历史", "207": "财经商业", "208": "校园学习", "209": "职业职场", "229": "设计·创意", "122": "野生技术协会", "188": "科技", "95": "数码", "230": "软件应用", "231": "计算机技术", "232": "科工机械", "233": "极客DIY", "234": "运动", "235": "篮球", "249": "足球", "164": "健身", "236": "竞技体育", "237": "运动文化", "238": "运动综合", "223": "汽车", "245": "赛车", "246": "改装玩车", "247": "新能源车", "248": "房车", "240": "摩托车", "227": "购车攻略", "176": "汽车生活", "160": "生活", "138": "搞笑", "250": "出行", "251": "三农", "239": "家居房产", "161": "手工", "162": "绘画", "21": "日常", "211": "美食", "76": "美食制作", "212": "美食侦探", "213": "美食测评", "214": "田园美食", "215": "美食记录", "217": "动物圈", "218": "喵星人", "219": "汪星人", "221": "野生动物", "222": "小宠异宠", "75": "动物综合", "119": "鬼畜", "22": "鬼畜调教", "26": "音MAD", "126": "人力VOCALOID", "216": "鬼畜剧场", "127": "教程演示", "155": "时尚", "157": "美妆护肤", "252": "仿妆cos", "158": "穿搭", "159": "时尚潮流", "202": "资讯", "203": "热点", "204": "环球", "205": "社会", "206": "综合", "5": "娱乐", "71": "综艺", "241": "娱乐杂谈", "242": "粉丝创作", "137": "明星综合", "181": "影视", "182": "影视杂谈", "183": "影视剪辑", "85": "小剧场", "184": "预告·资讯", "177": "纪录片", "37": "人文·历史", "178": "科学·探索·自然", "179": "军事", "180": "社会·美食·旅行", "23": "电影", "147": "华语电影", "145": "欧美电影", "146": "日本电影", "83": "其他国家", "11": "电视剧", "185": "国产剧", "187": "海外剧"} | 为啥改了我几个标签呢?这种细小的修改是要说明一下的。
我扫了一眼,你把一些“资讯”改成了对应分区的资讯,但是在B站上的这个分区显示的就是资讯,所以我希望和B站保持一致。 |
biliscope | github_2023 | javascript | 58 | gaogaotiantian | gaogaotiantian | @@ -1,3 +1,6 @@
BILIBILI_SPACE_URL = "https://space.bilibili.com/"
BILIBILI_SEARCH_URL = "https://search.bilibili.com/"
-BILIBILI_VIDEO_TYPE_MAP = {"1": "动画", "24": "MAD·AMV", "25": "MMD·3D", "47": "短片·手书·配音", "210": "手办·模玩", "86": "特摄", "253": "动漫杂谈", "27": "综合", "13": "番剧", "51": "资讯", "152": "官方延伸", "32": "完结动画", "33": "连载动画", "167": "国创", "153": "国产动画", "168": "国产原创相关", "169": "布袋戏", "170": "资讯", "195": "动态漫·广播剧", "3": "音乐", "28": "原创音乐", "31": "翻唱", "30": "VOCALOID·UTAU", "59": "演奏", "193": "MV", "29": "音乐现场", "130": "音乐综合", "243": "乐评盘点", "244": "音乐教学", "129": "舞蹈", "20": "宅舞", "154": "舞蹈综合", "156": "舞蹈教程", "198": "街舞", "199": "明星舞蹈", "200": "中国舞", "4": "游戏", "17": "单机游戏", "171": "电子竞技", "172": "手机游戏", "65": "网络游戏", "173": "桌游棋牌", "121": "GMV", "136": "音游", "19": "Mugen", "36": "知识", "201": "科学科普", "124": "社科·法律·心理", "228": "人文历史", "207": "财经商业", "208": "校园学习", "209": "职业职场", "229": "设计·创意", "122": "野生技术协会", "188": "科技", "95": "数码", "230": "软件应用", "231": "计算机技术", "232": "科工机械 ", "233": "极客DIY", "234": "运动", "235": "篮球", "249": "足球", "164": "健身", "236": "竞技体育", "237": "运动文化", "238": "运动综合", "223": "汽车", "245": "赛车", "246": "改装玩车", "247": "新能源车", "248": "房车", "240": "摩托车", "227": "购车攻略", "176": "汽车生活", "160": "生活", "138": "搞笑", "250": "出行", "251": "三农", "239": "家居房产", "161": "手工", "162": "绘画", "21": "日常", "211": "美食", "76": "美食制作", "212": "美食侦探", "213": "美食测评", "214": "田园美食", "215": "美食记录", "217": "动物圈", "218": "喵星人", "219": "汪星人", "220": "大熊猫", "221": "野生动物", "222": "爬宠", "75": "动物综合", "119": "鬼畜", "22": "鬼畜调教", "26": "音MAD", "126": "人力VOCALOID", "216": "鬼畜剧场", "127": "教程演示", "155": "时尚", "157": "美妆护肤", "252": "仿妆cos", "158": "穿搭", "159": "时尚潮流", "202": "资讯", "203": "热点", "204": "环球", "205": "社会", "206": "综合", "165": "广告", "5": "娱乐", "71": "综艺", "241": "娱乐杂谈", "242": "粉丝创作", "137": "明星综合", "181": "影视", "182": "影视杂谈", "183": "影视剪辑", "85": "小剧场", "184": "预告·资讯", "177": "纪录片", "37": "人文·历史", "178": "科学·探索·自然", "179": "军事", "180": "社会·美食·旅行", "23": "电影", "147": "华语电影", "145": "欧美电影", "146": "日本电影", "83": "其他国家", "11": "电视剧", "185": "国产剧", "187": "海外剧"}
+BILIBILI_VIDEO_TYPE_MAP = {"1": "动画", "24": "MAD·AMV", "25": "MMD·3D", "47": "短片·手书·配音", "210": "手办·模玩", "86": "特摄", "253": "动漫杂谈", "27": "综合", "13": "番剧", "51": "番剧资讯", "152": "官方延伸", "32": "完结动画", "33": "连载动画", "167": "国创", "153": "国产动画", "168": "国产原创相关", "169": "布袋戏", "170": "动画资讯", "195": "动态漫·广播剧", "3": "音乐", "28": "原创音乐", "31": "翻唱", "30": "VOCALOID·UTAU", "59": "演奏", "193": "MV", "29": "音乐现场", "130": "音乐综合", "243": "乐评盘点", "244": "音乐教学", "129": "舞蹈", "20": "宅舞", "154": "舞蹈综合", "156": "舞蹈教程", "198": "街舞", "199": "明星舞蹈", "200": "国风舞蹈", "4": "游戏", "17": "单机游戏", "171": "电子竞技", "172": "手机游戏", "65": "网络游戏", "173": "桌游棋牌", "121": "GMV", "136": "音游", "19": "Mugen", "36": "知识", "201": "科学科普", "124": "社科·法律·心理", "228": "人文历史", "207": "财经商业", "208": "校园学习", "209": "职业职场", "229": "设计·创意", "122": "野生技术协会", "188": "科技", "95": "数码", "230": "软件应用", "231": "计算机技术", "232": "科工机械", "233": "极客DIY", "234": "运动", "235": "篮球", "249": "足球", "164": "健身", "236": "竞技体育", "237": "运动文化", "238": "运动综合", "223": "汽车", "245": "赛车", "246": "改装玩车", "247": "新能源车", "248": "房车", "240": "摩托车", "227": "购车攻略", "176": "汽车生活", "160": "生活", "138": "搞笑", "250": "出行", "251": "三农", "239": "家居房产", "161": "手工", "162": "绘画", "21": "日常", "211": "美食", "76": "美食制作", "212": "美食侦探", "213": "美食测评", "214": "田园美食", "215": "美食记录", "217": "动物圈", "218": "喵星人", "219": "汪星人", "221": "野生动物", "222": "小宠异宠", "75": "动物综合", "119": "鬼畜", "22": "鬼畜调教", "26": "音MAD", "126": "人力VOCALOID", "216": "鬼畜剧场", "127": "教程演示", "155": "时尚", "157": "美妆护肤", "252": "仿妆cos", "158": "穿搭", "159": "时尚潮流", "202": "资讯", "203": "热点", "204": "环球", "205": "社会", "206": "综合", "5": "娱乐", "71": "综艺", "241": "娱乐杂谈", "242": "粉丝创作", "137": "明星综合", "181": "影视", "182": "影视杂谈", "183": "影视剪辑", "85": "小剧场", "184": "预告·资讯", "177": "纪录片", "37": "人文·历史", "178": "科学·探索·自然", "179": "军事", "180": "社会·美食·旅行", "23": "电影", "147": "华语电影", "145": "欧美电影", "146": "日本电影", "83": "其他国家", "11": "电视剧", "185": "国产剧", "187": "海外剧"}
+BILIBILI_VIDEO_TYPE_LINK = {"1": "douga", "24": "douga/mad", "25": "douga/mmd", "47": "douga/voice", "210": "douga/garage_kit", "86": "douga/tokusatsu", "253": "douga/acgntalks", "27": "douga/other", "13": "anime", "51": "anime/information", "152": "anime/offical", "32": "anime/finish", "33": "anime/serial", "167": "guochuang", "153": "guochuang/chinese", "168": "guochuang/original", "169": "guochuang/puppetry", "170": "guochuang/information", "195": "guochuang/motioncomic", "3": "music", "28": "music/original", "31": "music/cover", "30": "music/vocaloid", "59": "music/perform", "193": "music/mv", "29": "music/live", "130": "music/other", "243": "music/commentary", "244": "music/tutorial", "129": "dance", "20": "dance/otaku", "154": "dance/three_d", "156": "dance/demo", "198": "dance/hiphop", "199": "dance/star", "200": "dance/china", "4": "game", "17": "game/stand_alone", "171": "game/esports", "172": "game/mobile", "65": "game/online", "173": "game/board", "121": "game/gmv", "136": "game/music", "19": "game/mugen", "36": "knowledge", "201": "knowledge/science", "124": "knowledge/social_science", "228": "knowledge/humanity_history", "207": "knowledge/business", "208": "knowledge/campus", "209": "knowledge/career", "229": "knowledge/design", "122": "knowledge/skill", "188": "tech", "95": "tech/digital", "230": "tech/application", "231": "tech/computer_tech", "232": "tech/industry", "233": "tech/diy", | 这个部分不要换行了,和前面保持一致就行,不是需要人来读的文件。 |
biliscope | github_2023 | javascript | 58 | gaogaotiantian | gaogaotiantian | @@ -228,7 +228,6 @@ function UserProfileCard() {
this.idCardObserver = new MutationObserver((mutationList, observer) => {
this.clearOriginalCard();
})
- | 不要偷偷删掉我的空格~ |
biliscope | github_2023 | javascript | 46 | gaogaotiantian | XDcedar | @@ -104,6 +104,13 @@ function relationClass(data) {
}
}
+function noteDataToDisplay(noteData, mid) {
+ if (noteData && noteData[mid]) {
+ return noteData[mid].split("\n")[0]; | 天哥好,建议这里限制 `split` 的次数,`noteData[mid].split("\n", 1)[0]`,这样只会返回第一次 split 之前的数据 |
biliscope | github_2023 | javascript | 46 | gaogaotiantian | XDcedar | @@ -18,26 +18,38 @@ function getUserIdFromLink(s) {
var noteObserver = new MutationObserver((mutationList, observer) => {
if (window.location.href.startsWith(BILIBILI_SPACE_URL) && noteData != null && document.getElementById("biliscope-profile-note") == null) {
- let userInfoNode = document.getElementsByClassName("section user-info")[0];
+ let userInfoWrapper = document.querySelector("#page-index > div.col-2");
let userNoteNode = document.getElementById("biliscope-profile-note");
let userId = getUserIdFromLink(window.location.href);
- if (userInfoNode && !userNoteNode) {
+ if (userInfoWrapper && !userNoteNode) {
let noteNode = document.createElement("div");
noteNode.id = "biliscope-profile-note"
noteNode.className = "section user-info"
noteNode.innerHTML = `
<p class="user-info-title"><span class="info-title">备注</span></div>
<div class="be-textarea be-input--append">
- <textarea rows="3" type="textarea" maxlength="150" class="be-textarea_inner" id="biliscope-note-textarea">${noteData[userId] || ""}</textarea>
+ <textarea
+ rows="${Math.max(3, (noteData[userId] || "").split("\n").length)}" | 这里的 `rows` 是不会考虑折行的,这个是 intended 的么?
另外,我觉得还需要设置一个上界,不然换行太多导致太长了也不好。`Math.min(20, Math.max(3, (noteData[userId] || "").split("\n").length))`,希望不会显得太累赘 |
biliscope | github_2023 | javascript | 46 | gaogaotiantian | XDcedar | @@ -136,8 +143,8 @@ function getUserProfileCardDataHTML(data) {
</span>
<span class="biliscope-relation ${relationClass(data)}">${relationDisplay(data)}</span>
</div>
- <div class="idc-meta" style="${noteData && noteData[data["mid"]] ? "": "display: none"}">
- <span class="idc-meta-item">${noteData ? noteData[data["mid"]]: ""}</span>
+ <div class="idc-meta" style="${noteDataToDisplay(noteData, data["mid"]) ? "": "display: none"}">
+ <span class="idc-meta-item">${noteDataToDisplay(noteData, data["mid"])}</span> | 天哥我还是建议加一个 `text-overflow: ellipsis;` 再限制一下长度,一行内容也可能很长的 |
biliscope | github_2023 | javascript | 36 | gaogaotiantian | gaogaotiantian | @@ -1,8 +1,10 @@
// Saves options to chrome.storage
function save_options() {
- var enableWordCloud = document.getElementById('enable-word-cloud').checked;
+ const enableWordCloud = document.getElementById('enable-word-cloud').checked;
+ const minSize = document.getElementById('min-number').value;
chrome.storage.sync.set({
- enableWordCloud: enableWordCloud
+ enableWordCloud: enableWordCloud,
+ minSize | 这里是JS的一个专门的写法吧?当key和value一致时候的简写?为了和其他的地方保持一致(主要是我不是很熟悉这个写法),这里我们还是把它写开吧,写成`key:value`的形式。 |
biliscope | github_2023 | javascript | 36 | gaogaotiantian | gaogaotiantian | @@ -17,10 +19,27 @@ function save_options() {
// stored in chrome.storage.
function restore_options() {
chrome.storage.sync.get({
- enableWordCloud: true
+ enableWordCloud: true,
+ minSize: 5
}, function(items) {
document.getElementById('enable-word-cloud').checked = items.enableWordCloud;
+ document.getElementById('min-number').value = items.minSize;
});
}
document.addEventListener('DOMContentLoaded', restore_options);
-document.getElementById('save').addEventListener('click', save_options);
\ No newline at end of file
+document.getElementById('save').addEventListener('click', save_options);
+const decrementBtn = document.getElementById('decrement');
+const incrementBtn = document.getElementById('increment');
+const minNumberInput = document.getElementById('min-number');
+
+decrementBtn.addEventListener('click', function() {
+ const currentValue = parseInt(minNumberInput.value);
+ if (currentValue > 5) {
+ minNumberInput.value = currentValue - 1;
+ }
+});
+
+incrementBtn.addEventListener('click', function() {
+ const currentValue = parseInt(minNumberInput.value);
+ minNumberInput.value = currentValue + 1;
+}); | 这里顺便把newline加上吧。既然都改了它了。 |
biliscope | github_2023 | javascript | 36 | gaogaotiantian | gaogaotiantian | @@ -439,7 +439,7 @@ UserProfileCard.prototype.updateData = function (data) {
backgroundColor: "transparent",
weightFactor: 100 / this.wordCloudMaxCount(),
shrinkToFit: true,
- minSize: 5
+ minSize | 这里直接去读`biliscopeOptions.minSize`比较合适,就不需要额外增加一个全局变量`minSize`了。 |
biliscope | github_2023 | javascript | 36 | gaogaotiantian | gaogaotiantian | @@ -433,13 +427,13 @@ UserProfileCard.prototype.updateData = function (data) {
canvas.height = canvas.offsetHeight;
canvas.parentNode.classList.add("biliscope-canvas-show");
-
+ | 多余的空格删掉这里。 |
biliscope | github_2023 | javascript | 36 | gaogaotiantian | gaogaotiantian | @@ -473,4 +467,4 @@ getGuardInfo(6726252, 245645656).then((data) => {
guardInfo[i] = guardInfo[j];
guardInfo[j] = t;
}
-});
+}); | 这里为啥把我文件最后的空行给删了。。 |
biliscope | github_2023 | javascript | 30 | gaogaotiantian | gaogaotiantian | @@ -116,14 +116,38 @@ function getGuardSupportHTML(data) {
}
let guard = guardInfo[data["mid"] % guardInfo.length];
+ const guardImgs = [
+ // 总督
+ "ffcd832b5d7b84ea851cb8156ec0a71940439511",
+ // 提督
+ "98a201c14a64e860a758f089144dcf3f42e7038c",
+ // 舰长
+ "143f5ec3003b4080d1b5f817a9efdca46d631945",
+ ]
+ const bgImg = guardImgs[guard["guard_level"] - 1];
+ let borderColor = "255, 232, 84"; | 我之前review的时候没注意这里,这里既然叫color,就不要给一个纯数字了,还是把rgb加上,写成`rgb(255, 232, 84)`的形式。我可以理解你是为了尽量减少这里string的重复率,但是单独把这三个数拿出来还是觉得把真正的color给分开了。(linear-gradient那边我感觉稍好一些,起码是两个color看得清)。
另外这里其实你两个color的设置出现了两种形式——一个是先declare variable,然后assign,一个是declare一个default value。我个人是比较喜欢下面的那个形式,我觉得逻辑更清晰。为了统一感觉可以把上面这里也写成
```javascript
let borderColor = "";
if () {
borderColor = "rgb(...)";
} else {
borderColor = "rgb(...)";
}
```
然后我的建议是在image, border和level这三个区块之间都加个空行,这样更清晰。 |
biliscope | github_2023 | javascript | 30 | gaogaotiantian | gaogaotiantian | @@ -116,14 +116,43 @@ function getGuardSupportHTML(data) {
}
let guard = guardInfo[data["mid"] % guardInfo.length];
+ const guardImgs = [
+ // 总督
+ "ffcd832b5d7b84ea851cb8156ec0a71940439511",
+ // 提督
+ "98a201c14a64e860a758f089144dcf3f42e7038c",
+ // 舰长
+ "143f5ec3003b4080d1b5f817a9efdca46d631945",
+ ]
+ const bgImg = guardImgs[guard["guard_level"] - 1];
+
+ let borderColor = "";
+ if (guard["guard_level"] === 3) {
+ borderColor = "rgb(103, 232, 255)";
+ } else {
+ borderColor = "rgb(255, 232, 84)";
+ }
+
+ | 这里多了一个空行,删掉就ok了 |
biliscope | github_2023 | others | 7 | gaogaotiantian | gaogaotiantian | @@ -1,18 +1,19 @@
#biliscope-id-card {
background: #fff;
box-shadow: 0 0 2px rgba(0,0,0,.3);
- border-radius: 4px;
+ border-radius: 8px;
position: absolute;
z-index: 1002;
width: 375px;
line-height: 1.6;
+ overflow: hidden;
}
#biliscope-id-card .idc-theme-img {
- border-radius: 4px 4px 0 0;
+ /* border-radius: 4px 4px 0 0; */ | 这里是留还是不留呢?是相当于在上面overflow的地方处理掉了么? |
biliscope | github_2023 | others | 7 | gaogaotiantian | gaogaotiantian | @@ -1,18 +1,19 @@
#biliscope-id-card {
background: #fff;
box-shadow: 0 0 2px rgba(0,0,0,.3);
- border-radius: 4px;
+ border-radius: 8px;
position: absolute;
z-index: 1002;
width: 375px;
line-height: 1.6;
+ overflow: hidden;
}
#biliscope-id-card .idc-theme-img {
- border-radius: 4px 4px 0 0;
+ /* border-radius: 4px 4px 0 0; */
display: block;
width: 375px;
- height: 120px;
+ height: 100px; | 上面这个image我们暂时保持原状吧,确实上半部分是没有信息量的,但是和评论区的card比,这个template的头像是顶进这个背景一点的,我感觉上面大一点会平衡一些。 |
biliscope | github_2023 | others | 7 | gaogaotiantian | gaogaotiantian | @@ -134,10 +135,32 @@
#biliscope-id-card .biliscope-badge {
color: white;
display: inline-block;
- padding: 2px 10px;
+ padding: 0px 10px;
+ line-height: 24px; /* Fixes some text alignment issue */
+ vertical-align: top; | 这里ok,把那个comment删了吧,那个应该是在commit的时候写的,不需要留在代码里。 |
biliscope | github_2023 | others | 7 | gaogaotiantian | gaogaotiantian | @@ -134,10 +135,32 @@
#biliscope-id-card .biliscope-badge {
color: white;
display: inline-block;
- padding: 2px 10px;
+ padding: 0px 10px;
+ line-height: 24px; /* Fixes some text alignment issue */
+ vertical-align: top;
font-size: 12px;
font-weight: 600;
border-radius: 6px;
background-color: #00a1d6;
margin-right: 5px;
}
+
+#biliscope-id-card .biliscope-badge.muted { | 不需要“无”这个tag,下面细说,这个css拿掉。 |
biliscope | github_2023 | others | 7 | gaogaotiantian | gaogaotiantian | @@ -134,10 +135,32 @@
#biliscope-id-card .biliscope-badge {
color: white;
display: inline-block;
- padding: 2px 10px;
+ padding: 0px 10px;
+ line-height: 24px; /* Fixes some text alignment issue */
+ vertical-align: top;
font-size: 12px;
font-weight: 600;
border-radius: 6px;
background-color: #00a1d6;
margin-right: 5px;
}
+
+#biliscope-id-card .biliscope-badge.muted {
+ background-color: #6d757a;
+}
+
+#word-cloud-canvas-wrapper {
+ height: 0px;
+ overflow: hidden;
+ transition-property: height, opacity;
+ transition-duration: .25s;
+ transition-timing-function: ease;
+}
+
+#word-cloud-canvas-wrapper.show {
+ height: 187.5px; /* 375px / 2 */
+}
+
+/* .user-card-m-exp { | 这里是个什么东西……为啥留在了css里 |
biliscope | github_2023 | javascript | 7 | gaogaotiantian | gaogaotiantian | @@ -64,7 +64,7 @@ function getUserProfileCardHTML(data) {
<div id="biliscope-id-card-data">
${getUserProfileCardDataHTML(data)}
</div>
- <canvas id="word-cloud-canvas" style="width: 100%; height: 0"></canvas>
+ <div id="word-cloud-canvas-wrapper"><canvas id="word-cloud-canvas" style="width: 100%; height: 0"></canvas></div> | html写开,div像上面一样两个tag自己占一行,canvas写到中间。 |
biliscope | github_2023 | javascript | 7 | gaogaotiantian | gaogaotiantian | @@ -96,6 +96,7 @@ UserProfileCard.prototype.disable = function()
let canvas = document.getElementById("word-cloud-canvas");
if (canvas) {
canvas.getContext("2d").clearRect(0, 0, canvas.width, canvas.height);
+ canvas.parentNode.className = ""; | 这里不要直接overwrite `className`,这个操作比较危险。用classList.remove(),别影响其他的class(虽然现在没有,但是未来有了这里会藏雷)。 |
biliscope | github_2023 | javascript | 7 | gaogaotiantian | gaogaotiantian | @@ -177,6 +178,8 @@ UserProfileCard.prototype.drawVideoTags = function()
tagList.appendChild(el);
}
}
+ } else {
+ tagList.innerHTML = `<span class="biliscope-badge muted">无</span>`; | 这里拿掉这个“无”,因为它是个非常奇怪的tag。如果一个用户没有任何的视频,那它的“投稿数”会显示为0,这时候没有tag这一行就是很容易理解的事情。加个“无”反而显得画蛇添足。而且由于网络延迟的原因,在拿到投稿数之前,就是没有tag的状态,这时候从一个tag“无”,变成应该有的tag,是个很怪的transition…… |
biliscope | github_2023 | javascript | 7 | gaogaotiantian | gaogaotiantian | @@ -214,6 +217,11 @@ UserProfileCard.prototype.updateData = function (data)
canvas.style.height = `${canvas.offsetWidth / 2}px`;
canvas.width = canvas.offsetWidth;
canvas.height = canvas.offsetHeight;
+ // if transition is applied directly to canvas,
+ // this needs to change to offsetWidth / 2
+
+ canvas.parentNode.className = "show";
+ | 这里的comment不应该出现,不要comment没有发生的事情。你应该去在css里解释为什么show是一半(如果你想解释),而不是说,如果这件事没发生,应该怎么处理。
还有这里也是变classList。
另外有关这个class name的选择,show有点过于常见了。你不光要考虑到你的css对其它component的影响(你说了因为css被限制在这个card里,所以不会影响到其它的component),你也要考虑到外部css对它的影响啊。如果外面有一个定义到全局的`show` class,你这里就可能出奇怪的很难以发现的bug。所以在css的名字上,也是选择一个不那么容易冲突的名字(可以考虑用一些我们的identifier像`biliscope`去做前缀啥的)。 |
biliscope | github_2023 | others | 7 | gaogaotiantian | gaogaotiantian | @@ -134,10 +134,24 @@
#biliscope-id-card .biliscope-badge {
color: white;
display: inline-block;
- padding: 2px 10px;
+ padding: 0px 10px;
+ line-height: 24px;
+ vertical-align: top;
font-size: 12px;
font-weight: 600;
border-radius: 6px;
background-color: #00a1d6;
margin-right: 5px;
}
+
+#word-cloud-canvas-wrapper {
+ height: 0px;
+ overflow: hidden;
+ transition-property: height, opacity;
+ transition-duration: .25s;
+ transition-timing-function: ease;
+}
+
+#word-cloud-canvas-wrapper.biliscope-canvas-show {
+ height: 187.5px;
+} | 这里要补一个空行,文件结尾加空行是好习惯。 |
openrouter-runner | github_2023 | python | 79 | OpenRouterTeam | louisgv | @@ -0,0 +1,157 @@
+import modal.gpu
+from modal import Secret
+
+from runner.shared.common import stub
+from shared.images import BASE_IMAGE
+from shared.logging import get_logger, get_observability_secrets
+from shared.volumes import (
+ does_model_exist,
+ get_model_path,
+ models_path,
+ models_volume,
+)
+
+logger = get_logger(__name__)
+
+
+quantizer_image = (
+ BASE_IMAGE.apt_install("git")
+ .pip_install("auto-gptq==0.7.1")
+ # Use the barebones hf-transfer package for maximum download speeds. No progress bar, but expect 700MB/s.
+ .pip_install("huggingface_hub==0.20.2")
+ .pip_install("hf-transfer==0.1.4")
+ .pip_install("transformers==4.31.0") | nit: could it work with the latest transformers? https://github.com/huggingface/transformers/releases
|
openrouter-runner | github_2023 | python | 77 | OpenRouterTeam | alexanderatallah | @@ -139,19 +142,33 @@ def __init__(self):
gpu=modal.gpu.A100(count=1, memory=40),
concurrent_inputs=32,
)
+
+# A re-mapping of model names to their respective quantized models. | any way of avoiding code duplication / making the keys in this dict constants that are shared with the other definition? |
openrouter-runner | github_2023 | python | 75 | OpenRouterTeam | louisgv | @@ -91,39 +105,53 @@ def __init__(
timeout=10 * 60,
secrets=[*get_observability_secrets()],
concurrency_limit=max_containers,
+ keep_warm=keep_warm,
)
- return wrap(_VllmContainer)
+ _cls = wrap(_VllmContainer)
+ REGISTERED_CONTAINERS[model_name] = _cls
+ return _cls
+
+# A mapping of model names to their respective container classes.
+REGISTERED_CONTAINERS = {}
VllmContainer_MicrosoftPhi2 = _make_container(
name="VllmContainer_MicrosoftPhi2",
+ model_name="microsoft/phi-2", | Nice! - I wonder... can we just use the model name for the name of the container itself??? |
openrouter-runner | github_2023 | python | 65 | OpenRouterTeam | sambarnes | @@ -84,9 +88,14 @@ def __init__(
# windows of vLLM's batch loading weights into GPU memory.
memory=1024,
gpu=gpu,
+ retries=1,
allow_concurrent_inputs=concurrent_inputs,
- container_idle_timeout=20 * 60,
+ # Timeout for idle containers waiting for inputs to shut down (10 min)
+ container_idle_timeout=10 * 60,
+ # maximum execution time (10 min)
timeout=10 * 60,
+ keep_warm=num_containers, | I thought I remembered this keep_warm kwarg being problematic / not supported by modal for "parameterized classes" that take inputs in their constructor (because modal is not able to determine which specific instances to keep warm, versus the case where it's a single container class with no constructor args)
If ya tested on dev & it works with no weird stack traces thrown, then probs good. I forget if the errors happened at deploy or request time tho |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.