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

Carthik Sharma carthik at gmail.com
Sat Jun 19 16:02:18 UTC 2004


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.




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



More information about the hackers mailing list