-
Notifications
You must be signed in to change notification settings - Fork 849
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
38ab90b
commit 84eb269
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
(function($, window) { | ||
console.log("this is details.js"); | ||
class App extends window.NexusPHPCommon { | ||
init() { | ||
this.initButtons(); | ||
// 设置当前页面 | ||
PTService.pageApp = this; | ||
} | ||
/** | ||
* 初始化按钮列表 | ||
*/ | ||
initButtons() { | ||
this.initDetailButtons(); | ||
} | ||
|
||
/** | ||
* 获取下载链接 | ||
*/ | ||
getDownloadURL() { | ||
let query = $("div.download a[href*='/torrents/download/']"); | ||
let url = ""; | ||
if (query.length > 0) { | ||
url = query.attr("href"); | ||
} | ||
|
||
if (!url) { | ||
return ""; | ||
} | ||
|
||
return `${location.origin}${url}`; | ||
} | ||
|
||
/** | ||
* 获取当前种子标题 | ||
*/ | ||
getTitle() { | ||
let title = $("header.panel-heading h2").text().trim(); | ||
return title; | ||
} | ||
} | ||
new App().init(); | ||
})(jQuery, window); |