File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change 22// https://github.com/bgrins/devtools-snippets
33// Shows all cookies stored in document.cookies in a console.table
44
5- ( function ( ) {
5+ ( function ( ) {
6+ window . viewCookies = function ( ) {
7+ var rawCookies = document . cookie . split ( ';' ) , cookies = [ ] ;
68
7- var rawCookies = document . cookie . split ( ';' ) ,
8- cookies = [ ] ;
9-
10- rawCookies . forEach ( function ( cookie ) {
11- var parsedCookie = cookie . split ( '=' ) ,
12- cookieData = { } ;
13- cookies . push ( { 'key' : parsedCookie . shift ( ) , 'value' : decodeURIComponent ( parsedCookie . join ( '=' ) ) } ) ;
14- } ) ;
15-
16- console . table ( cookies ) ;
17-
18- } ) ( )
9+ rawCookies . forEach ( function ( cookie ) {
10+ var parsedCookie = cookie . split ( '=' ) , cookieData = { } ;
11+ cookies . push ( {
12+ 'key' : parsedCookie . shift ( ) ,
13+ 'value' : decodeURIComponent ( parsedCookie . join ( '=' ) )
14+ } ) ;
15+ } ) ;
16+ console . table ( cookies ) ;
17+ } ;
18+ } ) ( ) ;
You can’t perform that action at this time.
0 commit comments