I have made some changes to make the site more secure and easier...

intersexs profile photo

I have made some changes to make the site more secure and easier to use. First of all, I added CSRF forms to the Like, Follow and Cancel buttons so those are more secure now. I also added jQuery to make the like buttons keep you on the same page when you press them, instead of redirecting to a new page. This makes the experience smoother and wasn't too tricky to accomplish. I have posted the code I used below, which simply loops through all of the like form elements on the page, prevents the default (redirect), toggles the button class to change the color, and changes the text/icon. After this, it submits the form without redirecting the page. Try liking a post to see how it works!


@intersex, likes this,

Pinterest logo

https://uglek.com/post/253/ -


© Uglek, 2021

Terms of Use and Privacy Policy