Thread Closed

#1
what is the java code'initialization code' for a custom button to one of your bookmarks, I forgot it..
The auto button makers work but with an
awful lot of code.. I cant figure out what half
of it is for....just want the simple link code..
thanks

Edited by edoc999 on Jan. 7, 2008, 3:32 a.m.

ReportQuote
#2
If your talking about 'initialization code' you have got the wrong Extensions/Website. Your looking for info on how to use https://addons.mozilla.org/en-US/firefox/addon/2707 or https://addons.mozilla.org/en-US/firefox/addon/5066 neither of which are mine, and neither do I use them so I am not an expert on them. But this is the code I use to open links in a new tab.

var url = 'http://the.site.com/';
var newPage = getBrowser().addTab(url); getBrowser().selectedTab = newPage;

or if you just want to replace the current page
var url = 'http://the.site.com/';
loadURI(url);

or you can put the two together and make it only open in a new tab if you 'middle click' the button.
	var url = 'http://the.site.com/';
	if(event.button == 1) {
	  var newPage = getBrowser().addTab(url); getBrowser().selectedTab = newPage;
	} else {
	 loadURI(url);
	}

Have I helped you? Do you like my add-ons?
Would you consider donating to show your appreciation for my efforts?

/images/paypal.png
ReportQuote
#3
what I meant is ,I have a bookmark to yahoo finance,,I use it alot so I wanted a custom button....I use to have one..
it was just one or 2 lines of java that opened it,, forget the initial. code...
I was confused..... just a button.
ReportQuote
#4
I don't have such a button in my extension Toolbar Buttons. And don't plan to add it, thought it would be possible to say use the Favorite Page button that it does have.

By the way, it is JavaScript not Java you want I would think. There is a big difference between the two.

Have I helped you? Do you like my add-ons?
Would you consider donating to show your appreciation for my efforts?

/images/paypal.png
ReportQuote
#5
your link code works good.. I'll use that
ReportQuote

Thread Closed