1/** 2 * trg_frontend.js 3 * 4 * @package Total_Recipe_Generator 5 * @version 2.3.3 6 */ 7jQuery(function ($) { 8 'use strict'; 9 $(window).on('load', function () { 10 var share_img = $('img.trg-img').attr('src'), 11 recipe_summary = $('.recipe-summary').text(); 12 // Modify OG tags dynamically 13 if(share_img) { 14 $("meta[property='og:image']").attr('content', share_img); 15 } 16 if(recipe_summary) { 17 $("meta[property='og:description']").attr('content', recipe_summary); 18 } 19 // Print button 20 $('#trg-print-btn').on('click', function (e) { 21 e.preventDefault(); 22 var data = $('.trg-recipe').html(); 23 trg_print_recipe(data); 24 }); 25 }); 26 27 function trg_print_recipe(data) { 28 var win = window.open('', 'Print', 'height=400,width=600'), 29 css_url = trg_localize.plugins_url + '/assets/css/trg_print.css'; 30 win.document.write('<html><head><title></title>'); 31 win.document.write('<link rel="stylesheet" href="' + css_url + '" type="text/css" media="all" />');
32 win.document.write('</head><body >'); 33 win.document.write(data); 34 win.document.write('</body></html>'); 35 win.document.close(); 36 win.focus(); 37 setTimeout(function(){win.print();},1000); 38 //win.close(); 39 return true; 40 } 41});
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.