1var ment_settings = { 2 at: "@", 3 searchKey: "text", 4 displayTpl: "<li>${text}</li>", 5 insertTpl: '${atwho-at}"${text}"', 6 startWithSpace: true, 7 maxLen: maxnamelength, 8 callbacks: { 9 matcher: function(flag, subtext) { 10 var match, matched, regexp; 11 regexp = new XRegExp('(\\s+|^)' + flag + '([\\p{L}|\\p{N}]+)$', 'gi'); 12 match = regexp.exec(subtext); 13 if (match) { 14 matched = match[2]; 15 } 16 return matched; 17 }, 18 remoteFilter: function(query, callback) { 19 if (query.length > 2) { 20 $.getJSON('xmlhttp.php?action=get_users', {query: query}, function(data) { 21 callback(data); 22 }); 23 } 24 else { 25 callback([]); 26 } 27 } 28 } 29} 30function automentionck( local ) { 31 $(local).atwho('setIframe').atwho(ment_settings); 32 $(local).atwho(ment_settings); 33} 34$(document).ready(function() { 35 if (typeof $.fn.sceditor !== 'undefined') { 36 if($('#message, #signature').sceditor("instance")) { 37 $($('#message, #signature').sceditor("instance").getBody()).atwho('setIframe').atwho(ment_settings); 38 $($('#message ~ div.sceditor-container textarea, #signature ~ div.sceditor-container textarea')[0]).atwho(ment_settings); 39 } 40 else { 41 $('#message, #signature').atwho(ment_settings); 42 } 43 ($.fn.on || $.fn.live).call($(document), 'click', '.quick_edit_button', function () { 44 ed_id = $(this).attr('id'); 45 var pid = ed_id.replace( /[^0-9]/g, ''); 46 qse_area = 'quickedit_'+pid; 47 setTimeout(function() { 48 if ($('#'+qse_area+'').sceditor("instance")) { 49 $($('#'+qse_area+'').sceditor("instance").getBody()).atwho('setIframe').atwho(ment_settings); 50 $($('#'+qse_area+' ~ div.sceditor-container textarea')[0]).atwho(ment_settings); 51 } 52 else { 53 $('#'+qse_area+'').atwho(ment_settings); 54 } 55 },600); 56 }); 57 } 58 else { 59 $('#message, #signature').atwho(ment_settings); 60 ($.fn.on || $.fn.live).call($(document), 'click', '.quick_edit_button', function () { 61 ed_id = $(this).attr('id'); 62 var pid = ed_id.replace( /[^0-9]/g, ''); 63 qse_area = 'quickedit_'+pid; 64 $('#'+qse_area+'').atwho(ment_settings); 65 }); 66 } 67});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.