Skip to content

Commit

Permalink
fix: hda自身的一些异常导致的搜索显示问题
Browse files Browse the repository at this point in the history
一些站点移除了这个失效功能入口,一些站点这个设置不起效,更新了下NexusPHP\getSearchResult.js脚本
#1146
  • Loading branch information
ted423 committed Oct 24, 2022
1 parent 9adc5f4 commit 9827b44
Show file tree
Hide file tree
Showing 2 changed files with 229 additions and 218 deletions.
8 changes: 4 additions & 4 deletions resource/schemas/NexusPHP/getSearchResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@

let cells = row.find(">td");

let title = this.getTitle(row);
let title = this.getTitle(row,cells,fieldIndex);

// 没有获取标题时,继续下一个
if (title.length == 0) {
Expand Down Expand Up @@ -307,10 +307,10 @@
/**
* 获取标题
*/
getTitle(row) {
getTitle(row, cells, fieldIndex) {
let title =
Searcher.getFieldValue(this.site, row, "title") ||
row.find("a[href*='hit'][title]").first();
this.getFieldValue(row, cells, fieldIndex, "title", true) ||
row.find("a[href*='hit'][title]:not(a[href*='comment'])").first();

if (typeof title === "string") {
return title;
Expand Down
Loading

0 comments on commit 9827b44

Please sign in to comment.