Skip to content

Instantly share code, notes, and snippets.

Adam Roberts strawsnake

Block or report user

Report or block strawsnake

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
strawsnake / gist:c392fcdaf6f975f75b3be004b8253558
Last active Apr 11, 2017
Resetting rating for the current page SP2013
View gist:c392fcdaf6f975f75b3be004b8253558
function ResetRating(){
var context = new SP.ClientContext(_spPageContextInfo.webServerRelativeUrl);
var list = context.get_web().get_lists().getById(_spPageContextInfo.pageListId);
var pageID = _spPageContextInfo.pageItemId;
var item = list.getItemById(pageID);
context.load(item, "RatingCount", "AverageRating");
context.executeQueryAsync(RetrievedListID, ExecutionFailed);
View Removing Likes from a SharePoint List Item
var siteUrl = '/sites/;
function updateListItem() {
var clientContext = new SP.ClientContext(siteUrl);
var oList = clientContext.get_web().get_lists().getByTitle('LIST');
this.oListItem = oList.getItemById(*ID of item*);
oListItem.set_item('LikesCount', 0);
strawsnake / Simple JSON grabber for SP
Created Apr 30, 2016
This is a really simple call for items in a list,
View Simple JSON grabber for SP
var SiteName = //Name of your SP site
var ListName = //Name of your SP list
$.getJSON(SiteName + “/_vti_bin/ListData.svc/” + ListName, function (data) {
$(data.d.results).each(function (index, value) {
View gist:c3367924b2074680e7d2
<script type="text/javascript" src=""></script>
<div id="embedded-feed" style="height:800px;width:1000px;"></div>
container: "#embedded-feed",
feedType: "open-graph",
config: {
promptText: "Comment on this customer"
You can’t perform that action at this time.