monster.util.getUrlVars()

Syntax

monster.util.getUrlVars([key]);

Parameters

If specified, will return the value of a specific parameter (key).

Return

This method returns an Object of all the parameters by default. If a parameter (key) is specified, it will return its value or undefined

Description

This method returns the different URL GET parameters of the window.

Examples

Page URL: http://mycompany.com/monster?test=documentation&date=142109383929

monster.util.getUrlVars(); // returns { test: 'documentation', date: '142109383929' }
monster.util.getUrlVars('test'); // returns 'documentation'
monster.util.getUrlVars('nope'); // returns undefined

Edit this page here