'; var str_fb = '
-'; var str_ln = '
LINEで送る';var str_ml = '
メール';$('#twshare0').html(str_tw); $('#twshare1').html(str_tw); $('#fbshare0').html(str_fb); $('#fbshare1').html(str_fb); $('#lnshare0').html(str_ln); $('#lnshare1').html(str_ln); $('#mlshare0').html(str_ml); $('#mlshare1').html(str_ml); get_social_count_facebook(canonicalurl,'.like');}function count_twshare() { wniutil.count.log(pagekey + "_twshare"); var share_url_tw = encodeURIComponent(canonicalurl + "?fm=tw0"); var share_title_tw = encodeURIComponent(document.title); var twurl = 'https://twitter.com/share?url=' + share_url_tw + '&text=' + share_title_tw; if(smart_webview == "webview"){ location.href = twurl; }else{ window.open(twurl,'_blank','width=550, height=450, personalbar=0, toolbar=0, scrollbars=1, resizable=!'); }}function count_fbshare() { wniutil.count.log(pagekey + "_fbshare"); var share_url_fb = encodeURIComponent(canonicalurl + "?fm=fb0"); var fburl = 'https://www.facebook.com/sharer.php?u=' + share_url_fb; if(smart_webview == "webview"){ location.href = fburl; }else{ window.open(fburl,'_blank','width=550, height=450, personalbar=0, toolbar=0, scrollbars=1, resizable=!'); }}function count_lineshare() { wniutil.count.log(pagekey + "_lineshare"); var lnurl = document.title + " " + canonicalurl + "?fm=ln0"; lnurl = encodeURIComponent(lnurl); location.href = 'https://line.naver.jp/R/msg/text/?' + lnurl; //location.href = 'opensafari://line.naver.jp/R/msg/text/?' + lnurl;}function count_mailshare() { wniutil.count.log(pagekey + "_mailshare"); var share_url_ml = encodeURIComponent(canonicalurl + "?fm=ml0"); var share_title_ml = encodeURIComponent(document.title); if(smart_webview == "webview" && smart_platform == "android" ){ location.href = 'opensafari://weathernews.jp/s/topics/mailto.html?subject=' + share_title_ml + '&body=' + share_title_ml + '%0D%0A' + share_url_ml; } else { location.href = 'mailto:?subject=' + share_title_ml + '&body=' + share_title_ml + '%0D%0A' + share_url_ml; } }function get_social_count_facebook(url, selector) {$.getJSON("https://graph.facebook.com/?callback=?",{"id":url}) .done(function(p){if(p.share) { $(selector).text( p.share.share_count || 0 );}else{ $(selector).text('0');} }) .fail(function(){ $(selector).text('0'); })}// Search reportsfunction tpsearch(q){ query = document.getElementById('query').value; qoffs = document.getElementById('qoffs').value; if(tquery != query){ document.getElementById('qoffs').value = 0; qoffs = 0; tquery = query; } if(argv.debug){console.log('query : ' + query);} if(argv.debug){console.log('qoffs : ' + qoffs);}query = encodeURI(query); location.href = searchurl + '?query=' + query;// $.getJSON(searchurl,{"q":query,"offs":qoffs},SCappend_main);}function send_ga() { var links = document.getElementsByTagName('link'); //for (var i = 0; i < links.length; i++) { //if (links[i].getAttribute('rel') == 'canonical') { //canonicalurl = links[i].getAttribute('href'); //} //} var referrer = document.referrer; if (referrer.match(/smartnews/)) {argv['fm'] = 'SMN';} if (argv['akey']) { ga('set', 'dimension1', 'prem'); } if (argv['fm']) { ga('set', 'dimension2', argv['fm']); } if (canonicalurl) { var canonicalPath = canonicalurl.substring(canonicalurl.indexOf('/', 8), canonicalurl.length); ga('send', 'pageview', {'page': canonicalPath }); } else { ga('send', 'pageview'); }} function disp_recommend(p) { var cnt = 0; var h = ""; for (var i=0; i