mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 00:08:39 +09:00
DevTools - gcli commands - cookie
https://github.com/MoonchildProductions/moebius/pull/55
This commit is contained in:
parent
7afe591820
commit
208282c5c5
1 changed files with 13 additions and 9 deletions
|
|
@ -100,7 +100,7 @@ exports.items = [
|
|||
|
||||
let cookies = [];
|
||||
while (enm.hasMoreElements()) {
|
||||
let cookie = enm.getNext().QueryInterface(Ci.nsICookie);
|
||||
let cookie = enm.getNext().QueryInterface(Ci.nsICookie2);
|
||||
if (isCookieAtHost(cookie, host)) {
|
||||
cookies.push({
|
||||
host: cookie.host,
|
||||
|
|
@ -108,9 +108,10 @@ exports.items = [
|
|||
value: cookie.value,
|
||||
path: cookie.path,
|
||||
expires: cookie.expires,
|
||||
secure: cookie.secure,
|
||||
httpOnly: cookie.httpOnly,
|
||||
sameDomain: cookie.sameDomain
|
||||
isDomain: cookie.isDomain,
|
||||
isHttpOnly: cookie.isHttpOnly,
|
||||
isSecure: cookie.isSecure,
|
||||
isSession: cookie.isSession,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -169,11 +170,14 @@ exports.items = [
|
|||
for (let cookie of cookies) {
|
||||
cookie.expires = translateExpires(cookie.expires);
|
||||
|
||||
let noAttrs = !cookie.secure && !cookie.httpOnly && !cookie.sameDomain;
|
||||
cookie.attrs = (cookie.secure ? "secure" : " ") +
|
||||
(cookie.httpOnly ? "httpOnly" : " ") +
|
||||
(cookie.sameDomain ? "sameDomain" : " ") +
|
||||
(noAttrs ? l10n.lookup("cookieListOutNone") : " ");
|
||||
let noAttrs = !cookie.isDomain && !cookie.isHttpOnly &&
|
||||
!cookie.isSecure && !cookie.isSession;
|
||||
cookie.attrs = ((cookie.isDomain ? "isDomain " : "") +
|
||||
(cookie.isHttpOnly ? "isHttpOnly " : "") +
|
||||
(cookie.isSecure ? "isSecure " : "") +
|
||||
(cookie.isSession ? "isSession " : "") +
|
||||
(noAttrs ? l10n.lookup("cookieListOutNone") : ""))
|
||||
.trim();
|
||||
}
|
||||
|
||||
return context.createView({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue