I am writing a JavaScript code where I want to allow user to provide star ratings to a particular article. This code will be in the form of widget. SO I want to first check if the Rating is enabled for a given sharepoint list. So, if the Rating is enabled then execute Rating related code.
I know we can do this by checking if Rating, AverageRating columns are present in a list. However I don't want to go that way because there might be a possibility where user has created those columns manually and Rating setting is disabled.
Can anyone provide a sample JS code for this?