make your bookmarklets work in frames javascript:function x(p){...};var f=top.frames;if(f.length==0){x(self)}else{for(i=0;i