No changes
This commit is contained in:
parent
8680a02b13
commit
b6b398f5bf
17374 changed files with 2475441 additions and 0 deletions
21
ControlPanel/modules/tickets/js/helpers.js
Normal file
21
ControlPanel/modules/tickets/js/helpers.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
window.getParameterByName = function(name) {
|
||||
url = window.location.href;
|
||||
name = name.replace(/[\[\]]/g, "\\$&");
|
||||
|
||||
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
|
||||
results = regex.exec(url);
|
||||
|
||||
if (!results) return null;
|
||||
if (!results[2]) return '';
|
||||
|
||||
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
||||
}
|
||||
|
||||
window.getCookie = function(name) {
|
||||
match = document.cookie.match(new RegExp(name + '=([^;]+)'));
|
||||
if (match) return match[1];
|
||||
}
|
||||
|
||||
window.deleteCookie = function(name) {
|
||||
document.cookie = name +'=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue