[wp-hackers] Press It "bug" in Firefox 0.9

Carthik Sharma carthik at gmail.com
Sat Jun 19 17:06:30 UTC 2004


I may have got the error because I clicked the Press It bookmarklet
when viewing a page in a Tab, or for some other obscure reason.
In any case, I could not get it to work and I found the message I
related earlier, using  the Tools -> Javascript console option in
Firefox.

I don't know enough Javascript to know if  document.getSelection() is
indeed deprecated, but I did find the same problem related in the
following articles:
http://philringnalda.com/blog/2002/11/mt_bookmarklet_xhtml_11_applicationxhtmlxml.php
http://glot.mit.edu/mtblog/archives/000086.php

and so I guess it is a generic problem.

Carthik.

On Sat, 19 Jun 2004 11:53:04 -0500, Matt Mullenweg <m at mullenweg.com> wrote:
> 
> Press It seems to work fine for me in FF .9.
> 
> 
> Carthik Sharma wrote:
> 
> > Hi,
> >
> > While trying to use the Press It! bookmarklet with FireFox 0.9, I got
> > the following error :
> >
> > Deprecated method document.getSelection() called.  Please use
> > window.getSelection() instead.
> >
> > So I fixed the bookmarklet to be :
> >
> > javascript:if(navigator.userAgent.indexOf('Safari') >=
> > 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:window.getSelection();}void(window.open('http://blog.carthik.net/wp-admin/bookmarklet.php?text='+escape(Q)+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'WordPress
> > bookmarklet','scrollbars=yes,width=600,height=460,left=100,top=150,status=yes'));
> >
> > (changed document.getSelection() to window.getSelection() )
> >
> > to get everything working fine again.
> >
> > Thought I'd let y'all know.
> >
> > Carthik.
> >
> >
> >
> >
> 
> -- 
> Matt Mullenweg
>   http://photomatt.net | http://wordpress.org
> http://pingomatic.com | more soon...
> 
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
> 


-- 
Carthik Sharma
Ph.D. Fellow
University of Central Florida
Homepage: http://carthik.net



More information about the hackers mailing list