1(function ($) { 2 $.dnnSF = function (moduleId) { 3 var base = this; 4 base.getServiceRoot = function (moduleName) { 5 var serviceRoot = dnn.getVar("sf_siteRoot", "/"); 6 serviceRoot += "API/" + moduleName + "/"; 7 return serviceRoot; 8 }; 9 base.getTabId = function () { 10 return dnn.getVar("sf_tabId", -1); 11 }; 12 base.getModuleId = function () { 13 return moduleId; 14 }; 15 base.setModuleHeaders = function (xhr) { 16 var tabId = base.getTabId(); 17 if (tabId > -1) { 18 xhr.setRequestHeader("ModuleId", base.getModuleId()); 19 xhr.setRequestHeader("TabId", tabId); 20 } 21 var afValue = base.getAntiForgeryValue(); 22 if (afValue) { 23 xhr.setRequestHeader("RequestVerificationToken", afValue); 24 } 25 }; 26 base.getAntiForgeryKey = function () { 27 return "__RequestVerificationToken"; 28 }; 29 base.getAntiForgeryValue = function () { 30 return $('[name="__RequestVerificationToken"]').val(); 31 }; 32 return base; 33 }; 34 $.ServicesFramework = function (moduleId) { 35 return new $.dnnSF(moduleId); 36 }; 37})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.