Skip to content

Instantly share code, notes, and snippets.

@to
Created February 11, 2011 16:17
Show Gist options
  • Save to/822577 to your computer and use it in GitHub Desktop.
Save to/822577 to your computer and use it in GitHub Desktop.
(function(){
function hash(s){
return s.split('').join('\u200E');
}
QuickPostForm.descriptionContextMenus.push({
name : 'No Searchable',
execute : function(elmText, description){
var text = elmText.value.slice(elmText.selectionStart, elmText.selectionEnd);
text?
description.replaceSelection(hash(text)) :
elmText.value = hash(elmText.value);
},
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment