...

View Full Version : Trying to fix a Firefox extension - Linky. Help is very needed.



hlcsky
12-23-2011, 07:42 AM
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 (http://industrial-clay.com)

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.

Any help with this is appreciated. Thanks in advance for your time.

sunfighter
12-23-2011, 11:06 PM
This is what I read:
Version 3.0.0 Released February 22, 2010 24.6 KB Works with Firefox 0.7 - 11.0a1, SeaMonkey 2.0 - 2.8a1

and FF is now ver 9.0.1

So Linky 3.0.0 should work https://addons.mozilla.org/en-US/firefox/addon/linky/#detail-relnotes



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum