The bookmarklets can be found at the following webnote page. one is for
new window, another is for current window:
http://www.aypwip.org/webnote/load.py?name=yubnub.bookmarklet&time=2006-09-20+16%3A20%3A39
The difference from Brian Armknecht's bookmarklet is that it uses
URIComponent instead of escape. it should have less encoding problem
for foreign language query.
ref: "yubnub search tools & korean encoding issue"
http://groups.google.com/group/YubNub/browse_thread/thread/a203578f62165b48/e143d98a075ceece
tested in Opera 9, IE 6, Firefox 1.5.
bookmarklet codes
yubnub bookmarklet (URIComponent)(open in new window)
javascript:(function(){
var w=window,d=document,gS='getSelection',r;
// cross-browser way to get selection
var
se=''+(w[gS]?w[gS]():d[gS]?d[gS]():d.selection.createRange().text);
// trim selection
se=se.replace(/(^\s+|\s+$)/g,'');
// yub('ls google') will return a yubnub url that parses 'ls google'.
function yub(s){
return('http://yubnub.org/parser/parse?command='+
encodeURIComponent(s).replace(/\%20/g,'+'))
}
if(r=prompt('search-word: '+se+'\ntype yubnub command:'))
open(yub(se.length?(r+' '+se):r));
})();
yubnub bookmarklet (URIComponent)(open in current window)
replace the last line (open...) with
location=yub(se.length?(r+' '+se):r);
I added a comment to the original YubNub blog post to mention your
bookmarklets:
http://yubnub.blogspot.com/2005/11/yubnub-bookmarklet-by-brian-armknecht.html#comments
Brian