What is a bookmarklet? Usually, it is a piece of JavaScript that is meant to be pasted into your browser's url bar. Instead of cutting-n-pasting it every time, it is useful to create a bookmark (or favourite) containing the code. That is, instead of making a bookmark pointing to, for instance, http://en.wiktionary.org, point it to any of the following codes. For them to work, make sure JavaScript is enabled in your browser.
This does two things:
For Internet Explorer:
javascript:(function(){q=document.selection.createRange().text;if(!q)q=prompt('Wiktionary:',''); if(q)location.href='http://en.wiktionary.org/w/wiki.phtml?search='+escape(q);})()
For Mozilla Firefox:
javascript:(function(){q=window.getSelection().toString();if(!q)q=prompt('Wiktionary:'); if(q)location.href='http://en.wiktionary.org/w/wiki.phtml?search='+encodeURI(q);})()
For Safari:
javascript:void(q=prompt('Wiktionary:',getSelection())); if(q)void(location.href='http://en.wiktionary.org/w/wiki.phtml?search='+escape(q))
NB: a browser-agnostic version can and should be derived from the code at http://en.wikipedia.orghttps://dictious.com/en/Bookmarklet#Example instead.
On Wiktionary, the following bookmarklets will change all wikilinks on a page to any of the variants in the url. These should work in most browsers.
Example: will change a link language to language?action=edit.
javascript:(function(){var x,i; x=document.links;for(i=0;i<x.length;++i) { if (https://dictious.com/en/.test(x.href)) {z=x.href.match(/+$/);x.href=%22https://dictious.com/en/%22+z+%22?action=edit%22; };}})();
Example: will change a link language to language?action=history.
javascript:(function(){var x,i; x=document.links;for(i=0;i<x.length;++i) { if (https://dictious.com/en/.test(x.href)) {z=x.href.match(/+$/);x.href=%22https://dictious.com/en/%22+z+%22?action=history%22; };}})();
Example: will change a link language to language?action=watch.
javascript:(function(){var x,i; x=document.links;for(i=0;i<x.length;++i) { if (https://dictious.com/en/.test(x.href)) {z=x.href.match(/+$/);x.href=%22https://dictious.com/en/%22+z+%22?action=watch%22; };}})();
Example: will change a link language to language?action=delete.
javascript:(function(){var x,i; x=document.links;for(i=0;i<x.length;++i) { if (https://dictious.com/en/.test(x.href)) {z=x.href.match(/+$/);x.href=%22https://dictious.com/en/%22+z+%22?action=delete%22; };}})();
Example: will change a link language to language?action=protect.
javascript:(function(){var x,i; x=document.links;for(i=0;i<x.length;++i) { if (https://dictious.com/en/.test(x.href)) {z=x.href.match(/+$/);x.href=%22https://dictious.com/en/%22+z+%22?action=protect%22; };}})();