1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 23:47:58 +01:00

Support modified third-party cookie behavior. Closes issue #60.

This commit is contained in:
Kris Maglione
2015-06-12 23:50:04 -07:00
parent 1b965147ff
commit 07928ba263
3 changed files with 10 additions and 5 deletions

View File

@@ -1572,7 +1572,7 @@ var Buffer = Module("Buffer", {
_("buffer.save.altText")]); _("buffer.save.altText")]);
if (!isinstance(node, Ci.nsIDOMDocument) && node.textContent) if (!isinstance(node, Ci.nsIDOMDocument) && node.textContent)
names.push([node.textContent, names.push([node.textContent.trim(),
_("buffer.save.linkText")]); _("buffer.save.linkText")]);
names.push([decodeURIComponent(url.replace(/.*?([^\/]*)\/*$/, "$1")), names.push([decodeURIComponent(url.replace(/.*?([^\/]*)\/*$/, "$1")),

View File

@@ -856,14 +856,18 @@ var Commands = Module("commands", {
/** @property {string} The last executed Ex command line. */ /** @property {string} The last executed Ex command line. */
repeat: null, repeat: null,
add: function add() { add: function add(names, description, action, extra={}, replace=false) {
let { caller } = Components.stack;
let group = this.builtin; let group = this.builtin;
if (!util.isDactyl(Components.stack.caller)) { if (!util.isDactyl(caller)) {
deprecated.warn(add, "commands.add", "group.commands.add"); deprecated.warn(add, "commands.add", "group.commands.add");
group = this.user; group = this.user;
} }
return apply(group, "_add", arguments); const { contexts } = this.modules;
extra.definedAt = contexts.getCaller(caller);
return apply(group, "add", arguments);
}, },
addUserCommand: deprecated("group.commands.add", { get: function addUserCommand() this.user.bound._add }), addUserCommand: deprecated("group.commands.add", { get: function addUserCommand() this.user.bound._add }),
getUserCommands: deprecated("iter(group.commands)", function getUserCommands() iter(this.user).toArray()), getUserCommands: deprecated("iter(group.commands)", function getUserCommands() iter(this.user).toArray()),

View File

@@ -709,7 +709,8 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
values: [ values: [
["all", "Accept all cookies"], ["all", "Accept all cookies"],
["samesite", "Accept all non-third-party cookies"], ["samesite", "Accept all non-third-party cookies"],
["none", "Accept no cookies"] ["none", "Accept no cookies"],
["visited", "Accept cookies from visited sites"]
], ],
getter: function () (this.values[prefs.get(this.PREF)] || ["all"])[0], getter: function () (this.values[prefs.get(this.PREF)] || ["all"])[0],
setter: function (val) { setter: function (val) {