刚才我用@回复的时候,有两个自动提示,一个是Userscript,一个好像是V2EX原生支持的。
@Livid
@Livid
5
shinwood Nov 21, 2014
代码当中有:
$("#reply_content").textcomplete([{ match: /(^|\s)@(\w*)$/, search: function (term, callback) { term = term.toLowerCase(); var words = ['Just1n', 'Mihuwa', 'yautou']; callback($.map(words, function (word) { return word.toLowerCase().indexOf(term) === 0 ? word : null; })); }, replace: function (value) { return '$1@' + value + ' ';; } }]); 肯定是原生支持了。 |
6
0x142857 Nov 21, 2014
Nice.
|