Get query string parameter using JavaScript

Following code will help in fetching the value of a query string parameter.

Usage:

If URL is http://server/page.html?id=1

Then usage would be GetQueryStringParameters(“id”) which would return 1

Change new item text in SharePoint

The following script changes the “new item” link button in SharePoint view form to whatever we desire.

Add either of the script to content editor web part.

Plain JavaScript version: (This code assumes that there is only one “new item” text in the entire page.)

jQuery version: (This code can replace any number of “new item” text)

Source: sharepoint.stackexchange.com

Hide SharePoint list column

Sometimes we need to hide specific SharePoint columns in a list view webpart. The following code will help with that.
Make sure this code is placed in a JS file and referenced using JSLink webpart property.
Just replace the HideColumn function’s array parameters [“Title”, “Created By”]¬†with necessary column’s display names.