Changeset 6308
- Timestamp:
- 06/18/15 08:23:38 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vlo/trunk/vlo-web-app/src/main/js/eu/clarin/cmdi/vlo/wicket/pages/searchhi.js
r5261 r6308 7 7 /* Modified 20120112 to use the URL instead of referrer */ 8 8 /* Modified 20140522 <twan@clarin.eu> replaced unescape() with decodeURIComponent() */ 9 /* Modified 20150618 <twan@clarin.eu> added list of terms to exclude from highlighting */ 10 11 // list of words to exclude from highlighting (must be lower case) 12 var excludeWords = [ 13 "and", 14 "or", 15 "not" 16 ]; 9 17 10 18 searchhi = { … … 76 84 var words = wordstring.split(/\s+/); 77 85 for (w = 0; w < words.length; w++) { 78 searchhi.highlightWord(document.getElementsByTagName("body")[0], words[w]); 86 if(excludeWords.indexOf(words[w].toLowerCase()) < 0) { 87 searchhi.highlightWord(document.getElementsByTagName("body")[0], words[w]); 88 89 } 79 90 } 80 91 if (searchhi.found === 0) {
Note: See TracChangeset
for help on using the changeset viewer.