summaryrefslogtreecommitdiff
path: root/common/content/buffer.js
diff options
context:
space:
mode:
authorMartin Stubenschrott <stubenschrott@vimperator.org>2009-06-01 13:36:54 +0200
committerMartin Stubenschrott <stubenschrott@vimperator.org>2009-06-01 14:45:57 +0200
commit7e9fcf8d0546191edf1de07104ef9741d63ae399 (patch)
treec646c2a1d98cc0af1da20c8563bbb64491e5867e /common/content/buffer.js
parent0c5fde8ebfdc3b24cf0db3a25e209146510808ee (diff)
downloadpentadactyl-7e9fcf8d0546191edf1de07104ef9741d63ae399.tar.gz
Move 'encoding' option to vimperator, since PlacesUtils is supported on firefox anyway
Diffstat (limited to 'common/content/buffer.js')
-rw-r--r--common/content/buffer.js41
1 files changed, 0 insertions, 41 deletions
diff --git a/common/content/buffer.js b/common/content/buffer.js
index 282472c9..762b0e10 100644
--- a/common/content/buffer.js
+++ b/common/content/buffer.js
@@ -149,47 +149,6 @@ function Buffer() //{{{
////////////////////// OPTIONS /////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
- function getWebNav()
- {
- function call(val, fn)
- {
- try
- {
- return fn(val);
- }
- catch (e)
- {
- return val
- }
- }
- return [
- function () getBrowser().webNavigation,
- function (webNav) webNav.sessionHistory.QueryInterface(Ci.nsIWebNavigation)
- ].reduce(call, null);
- }
-
- options.add(["encoding", "enc"],
- "Sets the current buffer's character encoding",
- "string", "UTF-8",
- {
- scope: options.OPTION_SCOPE_LOCAL,
- getter: function () getBrowser().docShell.QueryInterface(Ci.nsIDocCharset).charset,
- setter: function (val)
- {
- // Stolen from browser.jar/content/browser/browser.js, more or
- // less.
- try
- {
- var docCharset = getBrowser().docShell.QueryInterface(Ci.nsIDocCharset).charset = val
- PlacesUtils.history.setCharsetForURI(getWebNavigation().currentURI, val);
- getWebNav().reload(Ci.nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE);
- }
- catch (e) { liberator.reportError(e); }
- },
- completer: function (context) completion.charset(context),
- validator: Option.validateCompleter
- });
-
// FIXME: Most certainly belongs elsewhere.
options.add(["fullscreen", "fs"],
"Show the current window fullscreen",