Need help? Check out our Support site, then


Open "Press It" Bookmarklet in a New Tab?

  1. When I use the "Press It" Bookmarklet it opens the new post in my current tab. Can I change it to open in a new tab instead? I'd like to refer to the original page that I'm posting about.

  2. Into a new tab? No since it's not supported in javascript as far as I and a ten minute search on Google can tell. We could probably do a new window if needbe.

    After you make your post, it should be returning you to the original site anyway.

    I don't even think there's a HTML tag for a new tab.

  3. Thanks for your reply and help drmike. I'm still getting used to WordPress. When I used posting bookmarklets at Blogger and Typepad they would open a new tab and leave the original site open.

    I guess I can always work around it by using a duplicate tab before "Press It".

    Here's what the TypePad QuickPost bookmarklet looks like:

    javascript:d=document;w=window;t='';if(d.selection){t=d.selection.createRange().text}else%20if(w.getSelection){t=w.getSelection()}else%20if(d.getSelection){t=d.getSelection()}wo=w.open('http://www.typepad.com/t/app/weblog/post?is_qp=1&v=2&qp_show=ca,ew&__mode=edit_entry&qp_title='+encodeURIComponent(d.title)+'&qp_href='+encodeURIComponent(d.location.href)+'&qp_text='+encodeURIComponent(t),'_blank','scrollbars=yes,width=600,height=540,status=yes,resizable=yes,scrollbars=yes');if(wo)wo.focus();void(0);

    (Sorry it doesn't wrap!) I think it does ask for a new window, but I have my options set to force opening in new tabs instead.

  4. Yeah, that's new window. I found examples of that many places.

    See that '_blank' bit? That has to worked into the javascript. The coffee shop I'm at is closing for the night shortly. If no one else hits it tonight, I'll work it out for you in the morning.

  5. Duh me - I figured it out. I was up 48 hours before getting any sleep yesterday and just too tired to think. After I posted the TypePad example, I thought hmmm ... well, this works like a charm. All I had to do was add the d=document;w=window;t=''; before if.

    javascript:d=document;w=window;t='';if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}location.href='http://cherylfree.wordpress.com/wp-admin/post-new.php?text='+encodeURIComponent(Q)+'&popupurl='+encodeURIComponent(location.href)+'&popuptitle='+encodeURIComponent(document.title);

  6. Darn! I could swear when I last posted that the bookmarklet opened in a new window (well tab, mine are forced) when I pressed it :( That was the only time. Now I have to open a duplicate tab before pushing "Press It" if I want to see the original site at the same time I'm posting.

    Can I get some help again please?

Topic Closed

This topic has been closed to new replies.

About this Topic