Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated minified file too

  • Loading branch information...
commit 1366177691da95d4bb81430bc323902f600a9972 1 parent 3e0e000
@trimentor authored
Showing with 2 additions and 25 deletions.
  1. +2 −25 jquery.highlightText.min.js
View
27 jquery.highlightText.min.js
@@ -1,25 +1,2 @@
-/*
-* jQuery highlightText plugin 0.1.0
-*
-* Copyright (c) 2011 Kjel Delaey
-*
-* Permission is hereby granted, free of charge, to any person obtaining
-* a copy of this software and associated documentation files (the
-* "Software"), to deal in the Software without restriction, including
-* without limitation the rights to use, copy, modify, merge, publish,
-* distribute, sublicense, and/or sell copies of the Software, and to
-* permit persons to whom the Software is furnished to do so, subject to
-* the following conditions:
-*
-* The above copyright notice and this permission notice shall be
-* included in all copies or substantial portions of the Software.
-*
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-(function(a){a.fn.highlightText=function(e,c){var d={cssClass:"mark",ignoreCase:true};var b={innerHighlight:function(i,k){var h=0;if(3==i.nodeType){var j=b._ignoreCase()?k.toUpperCase():k;var f=b._ignoreCase()?i.data.toUpperCase():i.data;var g=f.indexOf(j);if(g>=0){b._replaceNodeContent(i,k,g);h=1}}else{if(b._possibleTextNode(i)){b._lookupTextNodes(i,k)}}return h},_ignoreCase:function(){return d&&d.ignoreCase},_possibleTextNode:function(f){return(1==f.nodeType&&f.childNodes&&!/(script|style)/i.test(f.tagName))},_lookupTextNodes:function(g,h){for(var f=0;f<g.childNodes.length;f++){f+=b.innerHighlight(g.childNodes[f],h)}},_replaceNodeContent:function(j,l,i){var g=document.createElement("span");var h=j.splitText(i);var k=h.splitText(l.length);var f=h.cloneNode(true);g.className=d.cssClass;g.appendChild(f);h.parentNode.replaceChild(g,h)}};return this.each(function(){if(c){a.extend(d,c)}b.innerHighlight(this,e)})}})(jQuery);
+/*! jQuery highlightText v1.0.0 | (c) 2011, 2013 Kjel Delaey | https://raw.github.com/trimentor/jquery-highlightText/master/LICENSE
+*/(function(a){a.fn.highlightText=function(e,c){var d={cssClass:"mark",ignoreCase:true};var b={innerHighlight:function(i,k){var h=0;if(3==i.nodeType){var j=b._ignoreCase()?k.toUpperCase():k;var f=b._ignoreCase()?i.data.toUpperCase():i.data;var g=f.indexOf(j);if(g>=0){b._replaceNodeContent(i,k,g);h=1}}else{if(b._possibleTextNode(i)){b._lookupTextNodes(i,k)}}return h},_ignoreCase:function(){return d&&d.ignoreCase},_possibleTextNode:function(f){return(1==f.nodeType&&f.childNodes&&!/(script|style)/i.test(f.tagName))},_lookupTextNodes:function(g,h){for(var f=0;f<g.childNodes.length;f++){f+=b.innerHighlight(g.childNodes[f],h)}},_replaceNodeContent:function(j,l,i){var g=document.createElement("span");var h=j.splitText(i);var k=h.splitText(l.length);var f=h.cloneNode(true);g.className=d.cssClass;g.appendChild(f);h.parentNode.replaceChild(g,h)}};return this.each(function(){if(c){a.extend(d,c)}b.innerHighlight(this,e)})}})(jQuery);
Please sign in to comment.
Something went wrong with that request. Please try again.