зеркало из https://github.com/mozilla/gecko-dev.git
18 строки
358 B
JavaScript
18 строки
358 B
JavaScript
/* eslint-env mozilla/frame-script */
|
|
|
|
"use strict";
|
|
|
|
let cs = Cc["@mozilla.org/cookiemanager;1"].getService(Ci.nsICookieManager);
|
|
|
|
addMessageListener("getCookieCountAndClear", () => {
|
|
let count = 0;
|
|
for (let cookie of cs.cookies) {
|
|
++count;
|
|
}
|
|
cs.removeAll();
|
|
|
|
sendAsyncMessage("getCookieCountAndClear:return", { count });
|
|
});
|
|
|
|
cs.removeAll();
|