1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 21:28:00 +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")]);
if (!isinstance(node, Ci.nsIDOMDocument) && node.textContent)
names.push([node.textContent,
names.push([node.textContent.trim(),
_("buffer.save.linkText")]);
names.push([decodeURIComponent(url.replace(/.*?([^\/]*)\/*$/, "$1")),

View File

@@ -856,14 +856,18 @@ var Commands = Module("commands", {
/** @property {string} The last executed Ex command line. */
repeat: null,
add: function add() {
add: function add(names, description, action, extra={}, replace=false) {
let { caller } = Components.stack;
let group = this.builtin;
if (!util.isDactyl(Components.stack.caller)) {
if (!util.isDactyl(caller)) {
deprecated.warn(add, "commands.add", "group.commands.add");
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 }),
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: [
["all", "Accept all 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],
setter: function (val) {