1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 05:27:59 +01:00

Backed out changeset ccb7eca3e069

This commit is contained in:
Kris Maglione
2011-08-23 23:17:52 -04:00
parent 435f30f7eb
commit e70cd8934d
7 changed files with 188 additions and 279 deletions

View File

@@ -1887,16 +1887,14 @@ var Buffer = Module("buffer", {
mappings.add([modes.NORMAL], ["]]", "<next-page>"],
"Follow the link labeled 'next' or '>' if it exists",
function (args) {
buffer.findLink("next", options.get("nextpattern").get(buffer.focusedFrame),
(args.count || 1) - 1, true);
buffer.findLink("next", options["nextpattern"], (args.count || 1) - 1, true);
},
{ count: true });
mappings.add([modes.NORMAL], ["[[", "<previous-page>"],
"Follow the link labeled 'prev', 'previous' or '<' if it exists",
function (args) {
buffer.findLink("previous", options.get("previouspattern").get(buffer.focusedFrame),
(args.count || 1) - 1, true);
buffer.findLink("previous", options["previouspattern"], (args.count || 1) - 1, true);
},
{ count: true });
@@ -2054,23 +2052,19 @@ var Buffer = Module("buffer", {
"The current buffer's character encoding",
"string", "UTF-8",
{
scope: Option.SCOPE_BUFFER,
getter: function (val, context) util.docShell(context.content).QueryInterface(Ci.nsIDocCharset).charset,
setter: function (val, context) {
scope: Option.SCOPE_LOCAL,
getter: function () config.browser.docShell.QueryInterface(Ci.nsIDocCharset).charset,
setter: function (val) {
if (options["encoding"] == val)
return val;
// Stolen from browser.jar/content/browser/browser.js, more or less.
try {
let docShell = util.docShell(context.content).QueryInterface(Ci.nsIDocCharset);
docShell.charset = val;
PlacesUtils.history.setCharsetForURI(docShell.currentURI, val);
docShell.reload(docShell.LOAD_FLAGS_CHARSET_CHANGE);
}
catch (e) {
dactyl.reportError(e);
config.browser.docShell.QueryInterface(Ci.nsIDocCharset).charset = val;
PlacesUtils.history.setCharsetForURI(getWebNavigation().currentURI, val);
window.getWebNavigation().reload(Ci.nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE);
}
catch (e) { dactyl.reportError(e); }
return null;
},
completer: function (context) completion.charset(context)
@@ -2139,12 +2133,8 @@ var Buffer = Module("buffer", {
"Show current website without styling defined by the author",
"boolean", false,
{
scope: Option.SCOPE_TAB,
setter: function (value, context) {
if (context.browser)
context.browser.markupDocumentViewer.authorStyleDisabled = value
},
getter: function (value, context) context.browser && context.browser.markupDocumentViewer.authorStyleDisabled
setter: function (value) config.browser.markupDocumentViewer.authorStyleDisabled = value,
getter: function () config.browser.markupDocumentViewer.authorStyleDisabled
});
}
});