If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Trying to fix a Firefox extension - Linky. Help is very needed.

Hello.

I have used the Firefox extension Linky for a very long time, it is one of my most used extensions bar none. However, one of the most attractive features of it broke somewhere in the updating from Firefox 3-4, as far as i know. I didn't find out about it until recently, due to never bothering to update past Firefox 3 until just a little while ago. industrial clay

This feature was the 'Select already visited links' option, which also works in reverse, letting you unselect all links to pages you've already visited. (Or rather, have listed in your browser history)

Now, i am a complete noob when it comes to JavaScript, and i have very little knowledge about this type of programming, so i have no chance to fix this myself. This, is the reason i came here. I hope someone will be able to take a quick look at this code, and maybe tell me how to fix it, or make a workaround, or something. I really want to get it working again.

I am almost certain that the problem lies in this section of the code:
Code:
LinkySelect.prototype.checkVisited = function() {
var gGlobalHistory = opener.Components.classes["@mozilla.org/browser/global-history;1"].getService(Components.interfaces.nsIGlobalHistory);
var cbox = this.getChecked(document.getElementById("cvbox"));
var selectlinks = document.getElementById("selectlinks");
var last = selectlinks.getRowCount();
for (var i = 0; i < last; i++) {
var tmp = selectlinks.getItemAtIndex(i);
if (gGlobalHistory.isVisited(tmp.getAttribute("value"))) {
tmp.setAttribute("checked", this.setChecked(cbox));
}
}
this.updateInfo();
}
Also, the Error Console reports this;
Code:
Error: opener.Components.classes['@mozilla.org/browser/global-history;1'] is undefined
Source File: chrome://linky/content/select-links.js
Line: 28
I hope that will tell someone something. I almost feels like it tells me something, but it's been years and years since i last tried to study this type of programming.