code refactoring
This commit is contained in:
parent
5a93cb9b86
commit
6c188e779b
@ -29,7 +29,6 @@
|
||||
<script>
|
||||
const views = document.getElementById("views-count");
|
||||
const likes = document.getElementById("likes-count");
|
||||
const comments = document.getElementsByClassName("remark42__counter");
|
||||
const postLikesAndViews = document.getElementById("likes-views");
|
||||
|
||||
postLikesAndViews.style.display = "none";
|
||||
@ -47,9 +46,6 @@
|
||||
if(Number(views.innerText) !== NaN){
|
||||
postDetails.views = Number(views.innerText);
|
||||
}
|
||||
if(Number(comments.innerText) !== NaN){
|
||||
postDetails.comments = Number(comments.innerText);
|
||||
}
|
||||
ajax(serviceUrl + "/CreatePost", "POST", postDetails)
|
||||
.then(function (result) {
|
||||
if(result != "N/A"){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user