mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
添加脚本Dev版本
This commit is contained in:
1538
PtToPtools-Dev.js
Normal file
1538
PtToPtools-Dev.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -162,8 +162,11 @@ async function getSite() {
|
||||
console.log(res.msg)
|
||||
resolve(false)
|
||||
}
|
||||
console.log('站点信息获取成功!', res.data)
|
||||
resolve(res.data)
|
||||
},
|
||||
onerror: function (response) {
|
||||
console.log('服务器连接失败!')
|
||||
reject(false)
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -185,7 +188,10 @@ async function getCookie() {
|
||||
async function getData() {
|
||||
var site_info = await getSite()
|
||||
console.log(site_info)
|
||||
if (site_info === false) return;
|
||||
if (site_info === false) {
|
||||
alert('ptools服务器连接失败!')
|
||||
return;
|
||||
}
|
||||
console.log(site_info.uid_xpath)
|
||||
//获取cookie与useragent
|
||||
let user_agent = window.navigator.userAgent
|
||||
@@ -295,9 +301,8 @@ async function action() {
|
||||
wrap.innerHTML = `<img src="${ptools}static/logo4.png" style="width: 100%;"><br>
|
||||
<div class="btn-group-vertical btn-block action">
|
||||
<button type="button" class="btn btn-outline-warning btn-sm btn-block text-nowrap" style="font-size: 12px;" id="sync_cookie">同步Cookie</button>
|
||||
<button type="button" class="btn btn-outline-warning btn-sm btn-block text-nowrap" style="font-size: 12px;" id="copy_link">复制链接</button>
|
||||
</div>`
|
||||
// '<button type="button" class="btn btn-outline-warning btn-sm btn-block text-nowrap" style="font-size: 12px;" id="copy_link">复制链接</button>\n'
|
||||
// '<button type="button" class="btn btn-outline-warning btn-sm btn-block text-nowrap" style="font-size: 12px;" id="download_all">下载所有</button>\n'
|
||||
wrap.className = 'wrap'
|
||||
var wraphtml = document.body.insertBefore(wrap, first);
|
||||
let downloader_list = await getDownloaders()
|
||||
|
||||
Reference in New Issue
Block a user