User:ItsPlantseed/common.js

$('.ns-0 #simpleSearch #searchInput').click( ':', searchNamespace ); $('.ns-10000 #simpleSearch #searchInput').click( 'Dungeons:', searchNamespace ); $('.ns-10002 #simpleSearch #searchInput').click( 'Earth:', searchNamespace ); function searchNamespace(namespace) { $(this).val(namespace.data+$(this).val); $(this).off('click'); }