Skip to content

Instantly share code, notes, and snippets.

@purtuga
purtuga / parseParams.js
Last active December 19, 2015 06:39 — forked from can3p/gist:1787188
URL param parsing as generated by jQuery.param. Supports both "legacy" style (ex. foo=bar&foo=bar2&bar=foo) as well as new style (ex. foo[]=bar&foo[]=bar2&bar[]=foo). Original fork did not support legacy style where the key had multiple values. When wanting to parse the document's url, remember to only pass in the document.location.search or doc…
(function(factory){
if (typeof define === "function" && define.amd) {
// AMD. Request jQuery and then run the plugin
define(factory );
} else {
// Global jQuery
window.parseParams = factory();
}
}(function() {
@purtuga
purtuga / SPAddIdToFormTable.js
Created January 12, 2013 19:16
A jQuery addon function for displaying the ID of a List Item in SharePoint on the EDIT (EditForm.aspx) or DISPLAY (DispForm.aspx) pages. See this blog post for more information: http://wp.me/p2kCXW-2u
/**
* @fileOverview A jQuery addon function for displaying the ID of a
* List Item in SharePoint on the EDIT (EditForm.aspx) or DISPLAY (DispForm.aspx) pages.
*
* @author Paul Tavares, www.purtuga.com, paultavares.wordpress.com
* @see http://wp.me/p2kCXW-2u
* @license Dual License support under MIT or GPL. User can pick whichever one applies
* best for their project and does'nt not have to contact me.
*
*/