(function(){ try{ template = document.createElement('div'); template.innerHTML = ''; document.head.appendChild(template); // JavaScript source code queryly.related.batchSize = 8; queryly.related.fromTop = -1; queryly.jquery = jQuery; queryly.QuerylyRelatedCallback = function (related) { if (related == null || related.items == null || related.items.length == 0) { return; } // Desktop if (queryly.jquery('.related-queryly--desktop').length > 0){ if (queryly.jquery('.related-queryly--middle').length > 0 || queryly.jquery('.related-queryly--footer').length > 0 ) { var relateditemhtml = ''; for (var relateditemcount = 0; relateditemcount < 4; relateditemcount++) { try { queryly.relateddata = related.items[relateditemcount]; if (queryly.relateddata.image.indexOf("-1200-") > 0){ queryly.relateddata.image = queryly.relateddata.image.substring(0,queryly.relateddata.image.indexOf("-1200-")) + "-1200-300x300." + queryly.relateddata.image.substr(queryly.relateddata.image.length - 3); } if (queryly.relateddata.image.indexOf("http://") == 0){ queryly.relateddata.image = queryly.relateddata.image.replace("http://","https://"); } var url = new URL(queryly.relateddata.link); queryly.relateddata.link = url.pathname; relateditemhtml = relateditemhtml + queryly.util.tmpl('queryly_related_template', queryly.relateddata); } catch (e) {console.log('error log'); } } if (relateditemhtml != '') { relateditemhtml = "
"; if (queryly.jquery('.related-queryly--middle').length > 0){ queryly.jquery('.related-queryly--middle').html(relateditemhtml); } } var relateditemhtml = ''; for (var relateditemcount = 4; relateditemcount < related.items.length; relateditemcount++) { try { queryly.relateddata = related.items[relateditemcount]; if (queryly.relateddata.image.indexOf("-1200-") > 0){ queryly.relateddata.image = queryly.relateddata.image.substring(0,queryly.relateddata.image.indexOf("-1200-")) + "-1200-300x300." + queryly.relateddata.image.substr(queryly.relateddata.image.length - 3); } if (queryly.relateddata.image.indexOf("http://") == 0){ queryly.relateddata.image = queryly.relateddata.image.replace("http://","https://"); } var url = new URL(queryly.relateddata.link); queryly.relateddata.link = url.pathname; relateditemhtml = relateditemhtml + queryly.util.tmpl('queryly_related_template', queryly.relateddata); } catch (e) {console.log('error log'); } } if (relateditemhtml != '') { relateditemhtml = " "; if (queryly.jquery('.related-queryly--footer').length > 0){ queryly.jquery('.related-queryly--footer').html(relateditemhtml); } } queryly.related.hookRelatedEvent(queryly.jquery('a', '#queryly_related')); } else { setTimeout(queryly.QuerylyRelatedCallback(related), 1000); } // Mobile }else{ if (queryly.jquery('#related-queryly').length > 0 ) { var relateditemhtml = ''; for (var relateditemcount = 0; relateditemcount < related.items.length; relateditemcount++) { try { queryly.relateddata = related.items[relateditemcount]; if (queryly.relateddata.image.indexOf("-1200-") > 0){ queryly.relateddata.image = queryly.relateddata.image.substring(0,queryly.relateddata.image.indexOf("-1200-")) + "-1200-300x300." + queryly.relateddata.image.substr(queryly.relateddata.image.length - 3); } if (queryly.relateddata.image.indexOf("http://") == 0){ queryly.relateddata.image = queryly.relateddata.image.replace("http://","https://"); } var url = new URL(queryly.relateddata.link); queryly.relateddata.link = url.pathname; relateditemhtml = relateditemhtml + queryly.util.tmpl('queryly_related_template', queryly.relateddata); } catch (e) {console.log(e); } } if (relateditemhtml != '') { relateditemhtml = " "; if (queryly.jquery('#related-queryly').length > 0){ queryly.jquery('#related-queryly').html(relateditemhtml); } } queryly.related.hookRelatedEvent(queryly.jquery('a', '#queryly_related')); } else { setTimeout(queryly.QuerylyRelatedCallback(related), 1000); } } queryly.jquery("#queryly_related > div:gt(2)").hide(); } queryly.jquery(".related-posts").on("click", "#queryly_show_all", function(){ queryly.jquery("#queryly_related > div").slideDown(); queryly.jquery(this).hide(); });; var relatedurl = '//related.queryly.com/json.aspx?queryly_key=' + queryly.QuerylyKey + '&callback=queryly.QuerylyRelatedCallback' + '&pageurl=' + encodeURIComponent('https://sloanreview.mit.edu/') + '&batchsize=' + queryly.related.batchSize + '&decay=' + queryly.related.decay + "&extendedDataFields=" + encodeURIComponent(queryly.extendedDataFields); if (typeof queryly.related.title != 'undefined' && queryly.related.title != ''){ var relatedurl = '//related.queryly.com/json.aspx?queryly_key=' + queryly.QuerylyKey + '&callback=queryly.QuerylyRelatedCallback' + '&batchsize=' + queryly.related.batchSize + '&decay=' + queryly.related.decay + "&extendedDataFields=" + encodeURIComponent(queryly.extendedDataFields) + '&title=' + encodeURIComponent(queryly.related.title); if (typeof queryly.related.text != 'undefined' && queryly.related.text != ''){ if (queryly.related.text.length < 512){ relatedurl = relatedurl + '&text=' + encodeURIComponent(queryly.related.text); } else{ relatedurl = relatedurl + '&text=' + encodeURIComponent(queryly.related.text.substring(0,512)); } } } if (queryly.related.feednames != ''){ relatedurl = relatedurl + '&feednames=' + encodeURIComponent(queryly.related.feednames) } if (typeof queryly.related.facetedkey != 'undefined' && typeof queryly.related.facetedvalue != 'undefined'){ relatedurl = relatedurl + '&facetedkey=' + encodeURIComponent(queryly.related.facetedkey) + "&facetedvalue=" + encodeURIComponent(queryly.related.facetedvalue); } queryly.util.loadScript(relatedurl, function () { }); } catch(e){} })();