close

Press It! bookmarklet with Opera « WordPress Support

The thing wouldn't work in Opera, so I took a look at the javascript for the bookmarklet and compared it to the one for Blogger. Cut, paste, and the thing works like a charm!

The original WP script is:
javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(btw=window.open('http://www.gypsyresort.com/re_new/wp-admin/bookmarklet.php?text='encodeURIComponent(Q) '&popupurl=' encodeURIComponent(location.href) '&popuptitle='encodeURIComponent(document.title),'bookmarklet','scrollbars=yes,width=600,height=440,left=100,top=150,status=yes'));btw.focus();

I put the WP address part in the Blogger wrapping and got this:
javascript:popw='';Q='';x=document;y=window;if(x.selection) {Q=x.selection.createRange().text;} else if (y.getSelection) {Q=y.getSelection();} else if (x.getSelection) {Q=x.getSelection();}popw = y.open('http://www.gypsyresort.com/re_new/wp-admin/bookmarklet.php?text=' encodeURIComponent(Q) '&popupurl=' encodeURIComponent(location.href) '&popuptitle=' encodeURIComponent(document.title),'bookmarklet','scrollbars=yes,width=600,height=440,left=100,top=150,status=yes');if (!document.all) T = setTimeout('popw.focus()',50);void(0);

This is Opera 7.5. Don't know whether it would be needed or work in the new 8.0 as I haven't upgraded yet.

Be sure to change the url in the script to the one for your blog.

Update: Sorry, that code didn't come through right the first time.

arrow
arrow
    全站熱搜

    閻王殿主 發表在 痞客邦 留言(0) 人氣()