Browse Source

Revert "search hashtags"

This reverts commit b72c3d438b.
master
Hedgehog 11 years ago
parent
commit
8c9a69b267
  1. 20
      js/twister_following.js

20
js/twister_following.js

@ -355,28 +355,12 @@ function closeSearchDialog()
} }
function userSearchKeypress(item) { function userSearchKeypress(item) {
var partialName = $(".userMenu-search-field").val().toLowerCase(), var partialName = $(".userMenu-search-field").val().toLowerCase();
prefix = partialName.substr( 0, 1 );
if ( prefix == '@' || prefix == '#') { if ( partialName.substr( 0, 1 ) == '@' ) {
partialName = partialName.substr( 1 ); partialName = partialName.substr( 1 );
} }
var keyCode = item.keyCode || item.which;
if (keyCode == 13) {
// Enter pressed
var dummy = $('<a></a>');
if (prefix == '#') { // hashtag
dummy.attr('href', $.MAL.hashtagUrl(partialName));
dummy.text('#' + partialName);
openHashtagModal.call(dummy.get(0), item);
} else { // username
dummy.attr('href', $.MAL.userUrl(partialName));
openProfileModal.call(dummy.get(0), item);
}
return false;
}
//var partialName = item.val(); //var partialName = item.val();
if( !partialName.length ) { if( !partialName.length ) {

Loading…
Cancel
Save