Skip to content
This repository has been archived by the owner on Jun 17, 2023. It is now read-only.

Commit

Permalink
fix: 回复没有引用时,导出图片报错的问题;JSON引用缺少tabindex的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
gantrol committed Feb 15, 2023
1 parent 92e40ee commit fc7a2f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions uitls/bingPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export class Page {

static handleRefs = (ansFrame: HTMLElement, setFontWeight=true, returnJSON=false) => {
// ansFrame's css selector is cib-message[type="text"]
if (ansFrame === null) return;
const refsBlock = ansFrame
.shadowRoot
.querySelector("cib-message-attributions");
Expand All @@ -37,6 +38,7 @@ export class Page {
}
if (returnJSON) {
return {
index: linkElm.getAttribute("tabindex"),
title: linkElm.getAttribute("title"),
href: linkElm.getAttribute("href")
};
Expand Down
1 change: 0 additions & 1 deletion uitls/visitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export class DownloadVisitor {

static forJSON = () => {
const result = Page.getQAsJSON();
console.log(result);
const dataStr = "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(result));
const downloadAnchorNode = document.createElement('a');
downloadAnchorNode.setAttribute("href", dataStr);
Expand Down

0 comments on commit fc7a2f3

Please sign in to comment.