1/** 2 * trg_frontend.js 3 * 4 * @package Total_Recipe_Generator_El 5 * @version 2.8.0 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(trg_localize.prnt_header); 34 win.document.write(data); 35 win.document.write(trg_localize.prnt_footer); 36 win.document.write('</body></html>'); 37 win.document.close(); 38 win.focus(); 39 setTimeout(function(){win.print();},1000); 40 //win.close(); 41 return true; 42 } 43 44 function trg_el_share_window() { 45 $('.trg-sharing li:not(.no-popup,.trg-print) a').on('click', function (e) { 46 e.preventDefault(); 47 var href = $(this).attr('href'); 48 window.open(href, '_blank', 'width=600,height=400,menubar=0,resizable=1,scrollbars=0,status=1', true); 49 }); 50 } 51 trg_el_share_window(); 52});
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.