I never thought that I at times the wealth of Firefox extensions do not think that's right.
Just planned my Firefox was a little "clean up" and can be called important bookmarks on the left sidebar by an icon. Finished plugin fail indication!
After some research I did then but finally found a way to realize my plans.
This is how Evan Rowals in his blog how to use the " All-In-One Sidebar "extension and" Custom Buttons ² "extension can be built on such a Lesezeichenbar.
Since its example code for the button but can call AddingAPTInternetsources nicthmehr, I've tinkered with the help of the Custom Buttons Forum own solution.
var button = this;
function create button (button, name, img, code, Icode)
{
var nowButton = button;
var = nowButtonNum custombuttons.getNumber (nowButton.id);
var values = getButtonParameters (name, img, code, Icode);var toolbar = nowButton.parentNode;
var newNum custombuttons.min_button_number = ();
var = NewButton custombuttons.createButton (newNum, values);
var = newButton2 custombuttons.createButton (newNum, values);
var = newButtonId newButton.id;/ / Â äîáàâëÿåì range
custombuttons.addToPalette (newButton2);/ / Â toolbar
var = aBefore nowButton.nextSibling;
custombuttons.insertToToolbar (toolbar, NewButton aBefore);/ / Èñïðàâëÿåì currentSet äëÿ toolbar
var ar = toolbar.getAttribute ('currentset'). split (',');
var z = 1;
for (var j = 0; j
if (ar [j] == nowButton.id) {
z = j +1;
break;
}
}
ar.splice (z, 0, newButtonId);
/ / Èçáàâëÿåìñÿ îò ñ ãëþêà ñàìîïðîèçâîëüíûì ðàçìíîæåíèåì êíîïîê
newset var = ";
var temp = {};
for (var i = 0; i
if ((ar [i] into temp)) {
temp [ar [i]] = true;
newset + = ar [i];
if (i +1
}
}
toolbar.setAttribute ('currentset' newset);
document.persist (toolbar.id, 'currentset');/ / T-áñéè ýòî toolbar, òî â èñïðàâëÿåì àòðèáóòû ToolbarSet ...
var index = toolbar.getAttribute custom ('custom index');
if (index T> 0) {
var attrName = 'toolbar' T + index;
var ToolbarSet = document.getElementById ('custom toolbars');
var = oldset toolbarSet.getAttribute (attrName);
newset oldSet.substring = (0, (':')+ oldSet.indexOf 1) + newset;
toolbarSet.setAttribute (newset attrName);
document.persist ('custom toolbars', attrName);
}
/ / Èñïðàâëåíèÿ äëÿ AIOS
if (document.getElementById ('aiostbx-belowtabs-sidebar'))
persistCurrentSets ();
custombuttons.saveButtonsToProfile ();
}
getButtonParameters function (name, img, code, Icode) {
var ar = new Array;
ar.push (name);
ar.push (img);
ar.push (code);
ar.push (Icode);
return {
'Name': ar [0 ]||",
'Image': ar [1 ]||",
'Code': ar [2 ]||",
'Code init': ar [3] | | "
};
}this.create_image = function (img)
{
this.CB = window.custombuttons;
var img = aURL;
kIOContractID var = "@ mozilla.org / network / io-service; 1";
var kIOIID = Components. interfaces. nsIIOService;
var IOSVC = Components. classes [kIOContractID]. getService (kIOIID);
var chan = IOSVC. newChannel (aURL, null, null);
var listener = new this.CB.imageLoadListener (chan);
. chan notificationCallbacks = listener;
listener.callBackFunction = this.setImageURL;
. chan asyncOpen (listener, null);
}
this.setImageURL = function (img)
{
var name = content.document.title;
var code = "";
Icode var = "var link =" "+ content.document.location.href +" "; nvar label =" "+ name +" "; nthis.quot = function (evt) {nif (evt.shiftKey) {nthis.showPopup ( this); nreturn;} n nn nswitch (evt.button) nn {case 0: n loadURI (link); n break; nn case 2: n = gBrowser.selectedTab gBrowser.addTab (link); nbreak; n nn}} nthis.showPopup = function (node) {n var popup = document.getElementById ('custom buttons-context popup'); n var x = node.boxObject.x; n var y = + node.boxObject.y node.boxObject.height; document.popupNode n = node; popup.showPopup n (node, x, y, 'popup', null, null);} n nn this.setAttribute ('onclick', 'this.quot (event );'); n this.setAttribute ('context', "); this.tooltipText n = label,";CreateButton (button, name, img, code, Icode);
}
this.bkmrk = function (evt) {var favicon = document.getElementById ("page-proxy-favicon") src.;
if (document.getElementById ("page-proxy-favicon"). src) {
favicon = prompt ('! This site has no favicon n If you would like to specify one, do please as follows: For nnnn files use, "and the file :///" locationnnOr use a URL instead', 'file: / / / ',' Specify a favicon ');
if ((favicon.match ('file :///.')) | | (favicon.match (' http:// '))) {
this.create_image (favicon);
return;
}
if (favicon == null) {
return;
}
else {
favicon = "chrome: / / custom buttons / skin / button.png ';
this.create_image (favicon);
}
}
else {
this.create_image (favicon);
}
}this.setAttribute ("homepage", "http://custombuttons.phpbbnow.com/viewtopic.php?t=167");
By clicking on the star as now created a button which opens with a left-click the saved page and in the current tab when you right click in a new one. Shift + right-click the Custom button opens the menu for editing.
Much fun;)




[...] Firefox: Icon Sidebar (Update) Body-Snatch 16.06.2009 No comment Print The everyday surfers, Collected Works More about: Bookmarks sidebar with icons [...]