cannot get next fav/flw/fler
This commit is contained in:
parent
9d0f4096f8
commit
3f95e755b5
|
@ -87,6 +87,7 @@
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
height: calc(100% - 3.4rem);
|
height: calc(100% - 3.4rem);
|
||||||
|
padding-bottom: 60px;
|
||||||
}
|
}
|
||||||
#my-data-nav .btn {
|
#my-data-nav .btn {
|
||||||
width: 10.7rem;
|
width: 10.7rem;
|
||||||
|
|
|
@ -1246,7 +1246,6 @@ function userparse(obj, auth, acct_id, tlid, popup) {
|
||||||
} else if (auth == 'request') {
|
} else if (auth == 'request') {
|
||||||
var ftxt = lang.lang_parse_request
|
var ftxt = lang.lang_parse_request
|
||||||
}
|
}
|
||||||
console.log(auth, ftxt)
|
|
||||||
if (popup > 0 || popup == -1 || notf) {
|
if (popup > 0 || popup == -1 || notf) {
|
||||||
var notftext = ftxt + '<br>'
|
var notftext = ftxt + '<br>'
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -154,7 +154,7 @@ function flw(user, more, acct_id) {
|
||||||
if (localStorage.getItem("mode_" + domain) == "misskey") {
|
if (localStorage.getItem("mode_" + domain) == "misskey") {
|
||||||
var req = { i: at }
|
var req = { i: at }
|
||||||
if (more) {
|
if (more) {
|
||||||
var sid = $("#his-follow-list .cvo")
|
var sid = $("#his-follow-list .cusr")
|
||||||
.last()
|
.last()
|
||||||
.attr("user-id")
|
.attr("user-id")
|
||||||
req.maxId = sid
|
req.maxId = sid
|
||||||
|
@ -170,9 +170,7 @@ function flw(user, more, acct_id) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (more) {
|
if (more) {
|
||||||
var sid = $("#his-follow-list .cvo")
|
var sid = $("#his-follow-list-contents").attr('max-id')
|
||||||
.last()
|
|
||||||
.attr("user-id")
|
|
||||||
var plus = "?max_id=" + sid
|
var plus = "?max_id=" + sid
|
||||||
} else {
|
} else {
|
||||||
var plus = ""
|
var plus = ""
|
||||||
|
@ -185,6 +183,40 @@ function flw(user, more, acct_id) {
|
||||||
Authorization: "Bearer " + at
|
Authorization: "Bearer " + at
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
var httpreq = new XMLHttpRequest()
|
||||||
|
httpreq.open("GET", start, true)
|
||||||
|
httpreq.setRequestHeader('Content-Type', 'application/json')
|
||||||
|
httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
|
||||||
|
httpreq.responseType = 'json'
|
||||||
|
httpreq.send()
|
||||||
|
httpreq.onreadystatechange = function () {
|
||||||
|
if (httpreq.readyState === 4) {
|
||||||
|
var json = httpreq.response
|
||||||
|
if (localStorage.getItem("mode_" + domain) == "misskey") {
|
||||||
|
var templete = misskeyUserparse(json, "", acct_id)
|
||||||
|
} else {
|
||||||
|
var templete = userparse(json, "", acct_id)
|
||||||
|
}
|
||||||
|
if (templete == "") {
|
||||||
|
templete = lang.lang_details_nodata + "<br>"
|
||||||
|
}
|
||||||
|
var linkHeader = httpreq.getResponseHeader("link")
|
||||||
|
let link
|
||||||
|
if (linkHeader) {
|
||||||
|
console.log(linkHeader)
|
||||||
|
link = linkHeader.match(/[?&]{1}max_id=([0-9]+)/)[1]
|
||||||
|
console.log(link)
|
||||||
|
}
|
||||||
|
$("#his-follow-list-contents").attr('max-id', link)
|
||||||
|
if (more) {
|
||||||
|
$("#his-follow-list-contents").append(templete)
|
||||||
|
} else {
|
||||||
|
$("#his-follow-list-contents").html(templete)
|
||||||
|
}
|
||||||
|
jQuery("time.timeago").timeago()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
fetch(start, i)
|
fetch(start, i)
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
|
@ -231,7 +263,7 @@ function fer(user, more, acct_id) {
|
||||||
if (localStorage.getItem("mode_" + domain) == "misskey") {
|
if (localStorage.getItem("mode_" + domain) == "misskey") {
|
||||||
var req = { i: at }
|
var req = { i: at }
|
||||||
if (more) {
|
if (more) {
|
||||||
var sid = $("#his-follower-list .cvo")
|
var sid = $("#his-follow-list .cusr")
|
||||||
.last()
|
.last()
|
||||||
.attr("user-id")
|
.attr("user-id")
|
||||||
req.maxId = sid
|
req.maxId = sid
|
||||||
|
@ -247,9 +279,7 @@ function fer(user, more, acct_id) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (more) {
|
if (more) {
|
||||||
var sid = $("#his-follower-list .cvo")
|
var sid = $("#his-followr-list-contents").attr('max-id')
|
||||||
.last()
|
|
||||||
.attr("user-id")
|
|
||||||
var plus = "?max_id=" + sid
|
var plus = "?max_id=" + sid
|
||||||
} else {
|
} else {
|
||||||
var plus = ""
|
var plus = ""
|
||||||
|
@ -262,6 +292,40 @@ function fer(user, more, acct_id) {
|
||||||
Authorization: "Bearer " + at
|
Authorization: "Bearer " + at
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
var httpreq = new XMLHttpRequest()
|
||||||
|
httpreq.open("GET", start, true)
|
||||||
|
httpreq.setRequestHeader('Content-Type', 'application/json')
|
||||||
|
httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
|
||||||
|
httpreq.responseType = 'json'
|
||||||
|
httpreq.send()
|
||||||
|
httpreq.onreadystatechange = function () {
|
||||||
|
if (httpreq.readyState === 4) {
|
||||||
|
var json = httpreq.response
|
||||||
|
if (localStorage.getItem("mode_" + domain) == "misskey") {
|
||||||
|
var templete = misskeyUserparse(json, "", acct_id)
|
||||||
|
} else {
|
||||||
|
var templete = userparse(json, "", acct_id)
|
||||||
|
}
|
||||||
|
if (templete == "") {
|
||||||
|
templete = lang.lang_details_nodata + "<br>"
|
||||||
|
}
|
||||||
|
var linkHeader = httpreq.getResponseHeader("link")
|
||||||
|
let link
|
||||||
|
if (linkHeader) {
|
||||||
|
console.log(linkHeader)
|
||||||
|
link = linkHeader.match(/[?&]{1}max_id=([0-9]+)/)[1]
|
||||||
|
console.log(link)
|
||||||
|
}
|
||||||
|
$("#his-follower-list-contents").attr('max-id', link)
|
||||||
|
if (more) {
|
||||||
|
$("#his-follower-list-contents").append(templete)
|
||||||
|
} else {
|
||||||
|
$("#his-follower-list-contents").html(templete)
|
||||||
|
}
|
||||||
|
jQuery("time.timeago").timeago()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
fetch(start, i)
|
fetch(start, i)
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
|
@ -286,6 +350,14 @@ function fer(user, more, acct_id) {
|
||||||
if (templete == "") {
|
if (templete == "") {
|
||||||
templete = lang.lang_details_nodata + "<br>"
|
templete = lang.lang_details_nodata + "<br>"
|
||||||
}
|
}
|
||||||
|
var linkHeader = httpreq.getResponseHeader("link")
|
||||||
|
let link
|
||||||
|
if (linkHeader) {
|
||||||
|
console.log(linkHeader)
|
||||||
|
link = linkHeader.match(/[?&]{1}max_id=([0-9]+)/)[1]
|
||||||
|
console.log(link)
|
||||||
|
}
|
||||||
|
$("#his-follower-list-contents").attr('max-id', link)
|
||||||
if (more) {
|
if (more) {
|
||||||
$("#his-follower-list-contents").append(templete)
|
$("#his-follower-list-contents").append(templete)
|
||||||
} else {
|
} else {
|
||||||
|
@ -305,9 +377,7 @@ function showFav(more, acct_id) {
|
||||||
var at = localStorage.getItem("acct_" + acct_id + "_at")
|
var at = localStorage.getItem("acct_" + acct_id + "_at")
|
||||||
if (localStorage.getItem("mode_" + domain) != "misskey") {
|
if (localStorage.getItem("mode_" + domain) != "misskey") {
|
||||||
if (more) {
|
if (more) {
|
||||||
var sid = $("#his-fav-list .cvo")
|
var sid = $("#his-fav-list-contents").attr('max-id')
|
||||||
.last()
|
|
||||||
.attr("toot-id")
|
|
||||||
var plus = "?max_id=" + sid
|
var plus = "?max_id=" + sid
|
||||||
} else {
|
} else {
|
||||||
var plus = ""
|
var plus = ""
|
||||||
|
@ -320,6 +390,35 @@ function showFav(more, acct_id) {
|
||||||
Authorization: "Bearer " + at
|
Authorization: "Bearer " + at
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
var httpreq = new XMLHttpRequest()
|
||||||
|
httpreq.open("GET", start, true)
|
||||||
|
httpreq.setRequestHeader('Content-Type', 'application/json')
|
||||||
|
httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
|
||||||
|
httpreq.responseType = 'json'
|
||||||
|
httpreq.send()
|
||||||
|
httpreq.onreadystatechange = function () {
|
||||||
|
if (httpreq.readyState === 4) {
|
||||||
|
var json = httpreq.response
|
||||||
|
var linkHeader = httpreq.getResponseHeader("link")
|
||||||
|
let link
|
||||||
|
if (linkHeader) {
|
||||||
|
console.log(linkHeader)
|
||||||
|
link = linkHeader.match(/[?&]{1}max_id=([0-9]+)/)[1]
|
||||||
|
console.log(link)
|
||||||
|
}
|
||||||
|
var template = parse(json, "", acct_id, "user")
|
||||||
|
if (!json[0]) {
|
||||||
|
template = lang.lang_details_nodata + "<br>"
|
||||||
|
}
|
||||||
|
$("#his-fav-list-contents").attr('max-id', link)
|
||||||
|
if (more) {
|
||||||
|
$("#his-fav-list-contents").append(template)
|
||||||
|
} else {
|
||||||
|
$("#his-fav-list-contents").html(template)
|
||||||
|
}
|
||||||
|
jQuery("time.timeago").timeago()
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
var req = { i: at }
|
var req = { i: at }
|
||||||
if (more) {
|
if (more) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user