MCPcopy Create free account
hub / github.com/ActiveState/code / GetCookie

Function GetCookie

recipes/JavaScript/578517_Music_player/recipe-578517.js:145–162  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

143}
144
145function GetCookie(name)
146{
147 var arg=name+"=";
148 var alen=arg.length;
149 var clen=document.cookie.length;
150 var i=0;
151 while(i<clen)
152 {
153 var j=i+alen;
154 if(document.cookie.substring(i,j)==arg)
155 {
156 return getCookieVal(j);
157 }
158 i=document.cookie.indexOf(" ",i)+1;
159 if(i==0) break;
160 }
161 return ""; // instead of null
162}
163
164function getCookieVal(offset)
165{

Callers 2

load_playlistFunction · 0.85
load_feedback_valuesFunction · 0.85

Calls 1

getCookieValFunction · 0.85

Tested by

no test coverage detected