Во, всё заработало:
chrome.runtime.onMessage.addListener
(
function(request, sender, sendResponse)
{
switch(request.id)
{
case 4: // Получить значение localStorage
{
var sid = request.sid
sendResponse({sid: sid, value: localStorage[sid]})
return false
break
}
case 6: // Гн
{
var l = localStorage['mercenary_guild']
if(l != undefined && l > Math.round(Date.now() / 1000)) break
alert('запрос')
GetHttpRequest(request.href, {rid: request.rid, response: sendResponse})
break
}
}
return true
}
)