Skip to content

Instantly share code, notes, and snippets.

@andrewconnell
Created October 22, 2013 13:36
Show Gist options
  • Save andrewconnell/7100911 to your computer and use it in GitHub Desktop.
Save andrewconnell/7100911 to your computer and use it in GitHub Desktop.
SharePoint REST script library for obtaining common paths in client-side SharePoint 2013 development.
(function() {
var module = {
getAppAbsoluteUrl: getAppAbsoluteUrl,
getAppRelativeUrl: getAppRelativeUrl,
getAppODataApiUrl: getAppODataApiUrl
};
return module;
function getAppAbsoluteUrl() {
return _spPageContextInfo.webAbsoluteUrl;
};
function getAppRelativeUrl() {
return _spPageContextInfo.webServerRelativeUrl;
};
function getAppODataApiUrl() {
return getAppAbsoluteUrl() + "/_api";
};
});
NotifyScriptLoadedAndExecuteWaitingJobs("spAppUtils.js");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment