Skip to content

Commit

Permalink
add auto-refreshing page function
Browse files Browse the repository at this point in the history
  • Loading branch information
Chang Sun authored and Chang Sun committed Sep 8, 2023
1 parent 090196a commit f0a18d3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/main.js

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1573,7 +1573,9 @@ function respondToRequest(answer_btns, requestContentList) {
const fetchParticipateRequestId = selectedRequest.url;

fetchRequestURL(fetchParticipateRequestId).then(fetchedRequestListRef => {
change_participation(fetchedRequestListRef, fetchParticipateRequestId, "http://www.w3.org/ns/dpv#consented").then(()=> {}); //alert('You have accepted the request!')
change_participation(fetchedRequestListRef, fetchParticipateRequestId, "http://www.w3.org/ns/dpv#consented").then(()=> {
if(!alert('You have accepted the request!')){window.location.reload(); }
}); //
});


Expand All @@ -1582,14 +1584,18 @@ function respondToRequest(answer_btns, requestContentList) {
const fetchParticipateRequestId = selectedRequest.url;

fetchRequestURL(fetchParticipateRequestId).then(fetchedRequestListRef => {
change_participation(fetchedRequestListRef, fetchParticipateRequestId, "http://www.w3.org/ns/dpv#declined").then(()=> {}); //alert('You have declined the request!')
change_participation(fetchedRequestListRef, fetchParticipateRequestId, "http://www.w3.org/ns/dpv#declined").then(()=> {
if(!alert('You have declined the request!')){window.location.reload(); }
}); //alert('You have declined the request!')
});
}
else if (style.contains('cancel')) { //sendFeedback
const fetchParticipateRequestId = selectedRequest.url;

fetchRequestURL(fetchParticipateRequestId).then(fetchedRequestListRef => {
change_participation(fetchedRequestListRef, fetchParticipateRequestId, "http://www.w3.org/ns/dpv#open").then(()=> {}); //alert('You have declined the request!')
change_participation(fetchedRequestListRef, fetchParticipateRequestId, "http://www.w3.org/ns/dpv#open").then(()=> {
if(!alert('You have withdrawed the decision!')){window.location.reload(); }
}); //alert('You have declined the request!')
});


Expand Down

0 comments on commit f0a18d3

Please sign in to comment.