You currently have Javascript disabled, to use some of the features (such as the login) you must enable it for this site
Bookmarklet in "Adv. Home Button"? | Custom Buttons²

Bookmarklet in "Adv. Home Button"?

Make Button Requests & Get Coding Assistance with Buttons You Are Working On

Postby 222fbj on Thu Aug 28, 2008 6:52 pm

I'd like to add a few Bookmarklets to the "Advanced Home Button" button. The code(for a link) in this button is
Code: Select all
apps.push([0,'Woot','http://www.woot.com/Default.aspx',Img]);

As an example - How/Can I add a the 'Links in new window' bookmarklet as a menu item?
Code: Select all
javascript:function c6pHL6RrF(w){var i,k,T,L;for(i=0;i<w.length;i++)c6pHL6RrF(w.frames[i]);L=w.document.links;for(k=0;k<L.length;k++){T=L[k].target;if(!T||T=='_self'||T=='_top'||T==w.name||T=='Special')L[k].target='_blank'}};c6pHL6RrF(top)

thanks
222fbj
Registered User
Registered User
 
Posts: 6
Joined: Sun Dec 02, 2007 5:19 pm

Postby nicholas on Wed Sep 03, 2008 11:34 am

Just a guess, but how about:
Code: Select all
apps.push([0,'Links in New Tab',"javascript:function c6pHL6RrF(w){var i,k,T,L;for(i=0;i<w.length;i++)c6pHL6RrF(w.frames[i]);L=w.document.links;for(k=0;k<L.length;k++){T=L[k].target;if(!T||T=='_self'||T=='_top'||T==w.name||T=='Special')L[k].target='_blank'}};c6pHL6RrF(top)",Img]);


Please notice the use of double quotes instead of single quotes. This is because the bookmarklet has single quotes in it. If I use single quotes it will break.
Custom Buttons²: v.2.0.7.7
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.4) Gecko/2008111318 Ubuntu/8.04 (hardy) Firefox/3.0.4
User avatar
nicholas
Admin
Admin
 
Posts: 1152
Joined: Thu Jun 14, 2007 6:30 pm
Location: Atlanta, GA USA


Return to Button Requests & Coding Assistance

Who is online

Users browsing this forum: • Registered: 0 and 0 guests