CB Menu generator

A web form where you can add urls to go generate a custom button for menus.

Is it possible to drop a bookmark folder into a textarea ?
Form test (drop a bookmark folder or links into the textarea)

Add and Remove Elements with JavaScript (reprise)

Generate an icon for the button in data: URI format

 


Example button:

Comments

example code

var apps,srcUrl,MItem,mPop;
srcUrl='http://www.google.com';

//------menu items--------
apps=new Array;
apps.push(['Search','http://www.quickmacros.com/forum/search.php']);
apps.push(['QM & Forum Info','http://www.quickmacros.com/forum/viewforum.php?f=7']);
apps.push(['General','http://www.quickmacros.com/forum/viewforum.php?f=1']);
apps.push(['Programming','http://www.quickmacros.com/forum/viewforum.php?f=4']);
apps.push(['Resources','http://www.quickmacros.com/forum/viewforum.php?f=2']);
apps.push(['Wish List','http://www.quickmacros.com/forum/viewforum.php?f=3']);
apps.push(['Computer World','http://www.quickmacros.com/forum/viewforum.php?f=9']);
apps.push(['separator']);
apps.push(['Quickmacros Home','http://www.quickmacros.com/']);
apps.push(['Quickmacros Online Help','http://www.quickmacros.com/help/index.php']);

//------/menu items-------

MItem=function(label,path){
var mItem=document.createElement('menuitem');
mItem.setAttribute('label',label);
mItem.id = path;
mItem.value = path;
mItem.tooltipText = path;
return mItem;
}
this.onMouseOver = function() {
var homePage = gHomeButton.getHomePage();
homePage = homePage.replace(/\|/g,', ');
this.tooltipText = "Quickmacros";
}

//this.orient="vertical";
mPop=document.createElement('menupopup');
for (var i=0;i if (apps[i] =='separator'){
mPop.appendChild(document.createElement('menuseparator'));
}else{
if (!apps[i] [2]) apps[i] [2]=srcUrl;
mPop.appendChild(MItem(apps[i] [0],apps[i] [1]));
}
}

this.setAttribute("onmouseover", "this.onMouseOver()");
this.setAttribute("ondragover", "nsDragAndDrop.dragOver(event, homeButtonObserver)");
this.setAttribute("ondragdrop", "nsDragAndDrop.drop(event, homeButtonObserver)");
this.setAttribute("ondragexit", "nsDragAndDrop.dragExit(event, homeButtonObserver)");
this.appendChild(mPop);
this.type = "menu-button";