1jQuery(document).ready(function($) { 2 3 /** 4 * For anchors, that has parameter named "queryArgName" in HREF, changes target to "targetName". 5 * @param string targnetName Frame name, or special name as '_blank', '_self' etc. 6 * @param string queryArgName When empty, all anchors will be opened in new string 7 * @returns void 8 */ 9 function changeLinkTargetClass(targetName, queryArgName) { 10 $('body').on('click', 'a', function(event){ 11 var anchor = $(this); 12 var href = anchor.prop('href'); 13 14 if (href.match(new RegExp("[?&]+"+queryArgName+"="))) { 15 anchor.prop('target', targetName); 16 } 17 }); 18 } 19 20 var changeLinkTarget = new changeLinkTargetClass(changeLinkTargetVars.targetName, changeLinkTargetVars.queryArgName); 21});
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.