jQuery(function() { function w3tc_cookiegroups_clear() { if (!jQuery('#cookiegroups li').size()) { jQuery('#cookiegroups_empty').show(); } else { jQuery('#cookiegroups_empty').hide(); } } jQuery('#w3tc_cookiegroup_add').click(function() { var group = prompt('Enter group name (only "0-9", "a-z", "_" symbols are allowed).'); if (group !== null) { group = group.toLowerCase(); group = group.replace(/[^0-9a-z_]+/g, '_'); group = group.replace(/^_+/, ''); group = group.replace(/_+$/, ''); if (group) { var exists = false; jQuery('.cookiegroup_name').each(function() { if (jQuery(this).html() == group) { alert('Group already exists!'); exists = true; return false; } }); if (!exists) { var li = jQuery('
| Group name: | ' + '' + ' ' + ' | ' + '
|---|---|
| ' + ' | ' + ' | ' + '
| ' + ' | ' + ' |
| ' + ' | ' + 'Specify the cookies for this group. Values like \'cookie\', \'cookie=value\', and cookie[a-z]+=value[a-z]+are supported. Remember to escape special characters like spaces, dots or dashes with a backslash. Regular expressions are also supported. |