1(function( $ ) { 2 'use strict'; 3 4 /** 5 * All of the code for your public-facing JavaScript source 6 * should reside in this file. 7 * 8 * Note: It has been assumed you will write jQuery code here, so the 9 * $ function reference has been prepared for usage within the scope 10 * of this function. 11 * 12 * This enables you to define handlers, for when the DOM is ready: 13 * 14 * $(function() { 15 * 16 * }); 17 * 18 * When the window is loaded: 19 * 20 * $( window ).load(function() { 21 * 22 * }); 23 * 24 * ...and/or other possibilities. 25 * 26 * Ideally, it is not considered best practise to attach more than a 27 * single DOM-ready or window-load handler for a particular page. 28 * Although scripts in the WordPress core, Plugins and Themes may be 29 * practising this, we should strive to set a better example in our own work. 30 */ 31 32 33 34})( jQuery ); 35 36function loadOnlineEdition(publication, edition, section, linkurl, memberid, instanceid, size) { 37 //alert('sup'); 38 if (publication !== undefined) { 39 var publication = String(publication); 40 var edition = String(edition); 41 var section = String(section); 42 var instanceid = String(instanceid); 43 var size = String(size || 'standard'); 44 45 jQuery.ajax({ 46 url: "https://ws.iadsnetwork.com/editions.svc/Getedition", 47 data: { "publicationid": publication, "editionid": edition, "sectionid": section, "memberid": memberid }, 48 dataType: "json", 49 type: "GET", 50 contentType: "application/json; charset=utf-8", 51 success: function (data) { 52 if (data.d != null) { 53 var dtOnlineEdition = data.d; 54 for (i = 0; i < dtOnlineEdition.length; i++) { 55 var imageurl = dtOnlineEdition[i].imageurl; 56 57 if (size === 'large') { 58 imageurl = imageurl.replace(/(\/resized\/)440_/, '$11600_'); 59 } 60 61 if (linkurl == '') { 62 if (section == '') { 63 section = '0'; 64 } 65 linkurl = 'https://' + memberid + '.newstogo.us/editionviewer/?Edition=' + dtOnlineEdition[i].guid + '&Section=' + section; 66 } 67 jQuery("#webads-online-edition-" + instanceid).append('<img class="fl-photo-img" src="' + imageurl + '" alt="frontpage" itemprop="image">'); 68 jQuery("#webads-online-edition-" + instanceid).attr('href', linkurl); 69 } 70 } 71 }, 72 error: function (d) { 73 //alert("Error"); 74 } 75 }); 76 77 } 78}
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.