PageSourceSearch

https://www.ocr.org.uk/assets/js/vendor/jquery.clickable/jquery.clickable.min.js

js ocr.org.uk collected 2026-10-01 11:30:48 UTC 2,443 bytes, 11 lines download raw bytes

1/*!
2 * jQuery.clickable
3 *
4 * Designed to make other elements clickable/tapable/pressable based on a sibling or child links!
5 * 
6 * @version: 1.1.0
7 * @url: https://github.com/lawlesscreation/jquery.clickable
8 * @author: @lawlesscreation
9 * @license: licenced under MIT - http://opensource.org/licenses/mit-license.php
10 */
11;(function(e,c,a,g){var d="jqueryClickable",f={clickable_child:null,select_link:null,clickable_class:"clickable",hover_class:"clickable-hover",focus_class:"clickable-focus",url_prefixes:["http://","https://","www."]};function b(i,h){this.element=i;this.options=e.extend({},f,h);this._defaults=f;this._name=d;this.init()}b.prototype={init:function(){var h=this;return e(this.element).each(function(){var i=null,j={};if(e(this).find("a[href]").length>1){var k=e(this).find("a[href]");if(h.identicalHref(h,k)){j=h.getAttrs(k.get(0))}else{if(h.options.select_link){i=h.options.select_link;if(i){j=h.getAttrs(k.get(0))}}}}else{if(e(this).find("a[href]").length===1){j=h.getAttrs(e(this).find("a[href]"))}}if(j.href!==g){e(this).addClass(h.options.clickable_class);h.bindLink(h,e(this),j)}})},identicalHref:function(k,l){var j=this.getTrimmedUrl(k,l.get(0)),i=null,h=true;e.each(l,function(){i=k.getTrimmedUrl(k,e(this));if(i!==j){h=false}});return h},getTrimmedUrl:function(i,h){return this.trimUrl(i,e(h).attr("href"))},trimUrl:function(j,h){h=e.trim(h);if(j.options.url_prefixes){for(var i in j.options.url_prefixes){if(h.indexOf(j.options.url_prefixes[i])===0){h=h.substring(j.options.url_prefixes[i].length)}}}return h},bindLink:function(k,i,h){var j;if(k.options.clickable_child&&e(i).find(k.options.clickable_child).length>0){j=e(i).find(k.options.clickable_child)}else{j=i}if(h.target==="_blank"){j.on("click",function(l){l.preventDefault();c.open(h.href)})}else{j.on("click",function(l){l.preventDefault();c.location.href=h.href})}j.hover(function(){e(j).addClass(k.options.hover_class)},function(){j.removeClass(k.options.hover_class)});j.find("a").focus(function(){j.addClass(k.options.focus_class)});j.find("a").blur(function(){j.removeClass(k.options.focus_class)})},getAttrs:function(j){var k=e(j).text(),h,i;if(e(j).attr("href")!==""){h=e(j).attr("href")}else{h=null}if(e(j).attr("target")!==""){i=e(j).attr("target")}else{i=null}return{href:h,target:i,text:k}}};e.fn[d]=function(h){return this.each(function(){if(!e.data(this,"plugin_"+d)){e.data(this,"plugin_"+d,new b(this,h))}})}})(jQuery,window,document);

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.