Hey guys, sorry for the late heads-up. I had this problem solved some time ago and forgot to inform the author about it.
TheQuicksilver’s solution works just fine indeed (thanks for that!). I believe I’ve found a more efficient solution tho, that doesn’t require any additional jQuery and actually even reduces some lines of code.
Just set localStorage.setItem(itemName, true) before the Ajax request, this will avoid that it gets initiated multiple times before calling the Ajax request.
Also, var itemName = “thumbsrating” + ID is not needed, as it is already created at the very beginning of the file.
Here is the modified general.js: https://pastebin.com/jWn5F5Ut
Please note that the actual solution was suggested by @ocean90 (thank you!).
Cheers