diff --git a/Donators b/Donators index 8ffd474a..52b74c8a 100644 --- a/Donators +++ b/Donators @@ -2,6 +2,7 @@ Note: If you don't wish to appear on this list when making a donation, please tell me. 2008: +* Ovidiu Curcan * Ivo-Jose Jimenez-Ramos * Andrew Pantyukhin * Kurtis Rader diff --git a/content/commands.js b/content/commands.js index 6849bb59..303d533f 100644 --- a/content/commands.js +++ b/content/commands.js @@ -2281,7 +2281,8 @@ vimperator.Commands = function () //{{{ if (args) { - var ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore); + var ss = Components.classes["@mozilla.org/browser/sessionstore;1"]. + getService(Components.interfaces.nsISessionStore); var undoItems = eval("(" + ss.getClosedTabData(window) + ")"); for (var i = 0; i < undoItems.length; i++) { @@ -2299,7 +2300,8 @@ vimperator.Commands = function () //{{{ completer: function (filter) { // get closed-tabs from nsSessionStore - var ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore); + var ss = Components.classes["@mozilla.org/browser/sessionstore;1"]. + getService(Components.interfaces.nsISessionStore); var undoItems = eval("(" + ss.getClosedTabData(window) + ")"); var completions = []; for (var i = 0; i < undoItems.length; i++) @@ -2328,7 +2330,8 @@ vimperator.Commands = function () //{{{ return; } - var ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore); + var ss = Components.classes["@mozilla.org/browser/sessionstore;1"]. + getService(Components.interfaces.nsISessionStore); var undoItems = eval("(" + ss.getClosedTabData(window) + ")"); for (var i = 0; i < undoItems.length; i++) undoCloseTab(); // doesn't work with i as the index to undoCloseTab diff --git a/content/events.js b/content/events.js index 40378d52..82b03923 100644 --- a/content/events.js +++ b/content/events.js @@ -405,7 +405,8 @@ vimperator.Events = function () //{{{ function waitForPageLoaded() { dump("start waiting in loaded state: " + vimperator.buffer.loaded + "\n"); - var mainThread = Cc["@mozilla.org/thread-manager;1"].getService(Ci.nsIThreadManager).mainThread; + var mainThread = Components.classes["@mozilla.org/thread-manager;1"]. + getService(Components.interfaces.nsIThreadManager).mainThread; while (mainThread.hasPendingEvents()) // clear queue mainThread.processNextEvent(true); diff --git a/content/ui.js b/content/ui.js index 7e0ea3d1..90ee8aa5 100644 --- a/content/ui.js +++ b/content/ui.js @@ -307,7 +307,8 @@ vimperator.CommandLine = function () //{{{ { // if we are modifing the GUI while we are not in the main thread // Firefox will hang up - var threadManager = Cc["@mozilla.org/thread-manager;1"].getService(Ci.nsIThreadManager); + var threadManager = Components.classes["@mozilla.org/thread-manager;1"]. + getService(Components.interfaces.nsIThreadManager); if (!threadManager.isMainThread) return false; diff --git a/content/util.js b/content/util.js index 396b33de..418d5af9 100644 --- a/content/util.js +++ b/content/util.js @@ -109,30 +109,6 @@ vimperator.util = { //{{{ continue; } -// Disabled for now, use gu and GU or O and change the last part -// var newURL = vimperator.buffer.URL; -// // FIXME: not really that good (doesn't handle .. in the middle) -// // check for ./ and ../ (or even .../) to go to a file in the upper directory -// if (matches = urls[url].match(/^(?:\.$|\.\/(\S*))/)) -// { -// var tail = matches[1] || ""; -// urls[url] = newURL.replace(/(.+\/)[^\/]*/, "$1" + tail); // NOTE: escape / in character sets so as not to break Vim syntax highlighting -// continue; -// } -// else if (matches = urls[url].match(/^(?:\.\.$|\.\.\/(\S*))/)) -// { -// var tail = matches[1] || ""; -// urls[url] = newURL.replace(/(.+\/)[^\/]*/, "$1../" + tail); -// continue; -// } -// else if (matches = urls[url].match(/^(?:\.\.\.$|\.\.\.\/(\S*))/)) -// { -// var location = window.content.document.location; -// var tail = matches[1] || ""; -// urls[url] = location.protocol + "//" + location.host + "/" + tail; -// continue; -// } - // if the string doesn't look like a valid URL (i.e. contains a space // or does not contain any of: .:/) try opening it with a search engine // or keyword bookmark diff --git a/content/vimperator.js b/content/vimperator.js index 37032965..3fdd4445 100644 --- a/content/vimperator.js +++ b/content/vimperator.js @@ -416,7 +416,8 @@ const vimperator = (function () //{{{ run: function (program, args, blocking) { - var file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile); + var file = Components.classes["@mozilla.org/file/local;1"]. + createInstance(Components.interfaces.nsILocalFile); const WINDOWS = navigator.platform == "Win32"; if (!args) @@ -454,7 +455,8 @@ const vimperator = (function () //{{{ return -1; } - var process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess); + var process = Components.classes["@mozilla.org/process/util;1"]. + createInstance(Components.interfaces.nsIProcess); process.init(file); var ec = process.run(blocking, args, args.length); @@ -721,7 +723,8 @@ const vimperator = (function () //{{{ sleep: function (ms) { - var threadManager = Cc["@mozilla.org/thread-manager;1"].getService(Ci.nsIThreadManager); + var threadManager = Components.classes["@mozilla.org/thread-manager;1"]. + getService(Components.interfaces.nsIThreadManager); var mainThread = threadManager.mainThread; var then = new Date().getTime(), now = then;