mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 22:08:00 +01:00
get rid of Cc/Ci, as that's thunderbird incompatible
This commit is contained in:
1
Donators
1
Donators
@@ -2,6 +2,7 @@
|
||||
<b>Note:</b> 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user