mirror of
https://github.com/neocities/neocities.git
synced 2025-08-03 00:02:00 +02:00
streamline CSS, remove google font/cdn dep
This commit is contained in:
parent
ab6abc637e
commit
47344e8bdc
186 changed files with 31689 additions and 1655 deletions
15
public/js/news/site.js
Normal file
15
public/js/news/site.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
var Site = {
|
||||
toggleFollow: function(siteId, csrfToken) {
|
||||
var link = $('a#followLink')
|
||||
var span = $('a#followLink span')
|
||||
$.post('/site/'+siteId+'/toggle_follow', {csrf_token: csrfToken}, function(res) {
|
||||
if(res.result == "followed") {
|
||||
span.text('Unfollow')
|
||||
link.removeClass('follow')
|
||||
} else if(res.result == 'unfollowed') {
|
||||
span.text('Follow')
|
||||
link.addClass('follow')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue