// ==UserScript== // @name nico weather news // @namespace http://web.zgo.jp/ // @description ニコニコ動画再生ページの天気情報を表示 // @include http://www.nicovideo.jp/watch/* // ==/UserScript== (function(){ const weather1 = unsafeWindow.so.variables.weather1; const conjunction = unsafeWindow.so.variables.conjunction; const weather2 = unsafeWindow.so.variables.weather2; const highest_temperature = unsafeWindow.so.variables.highest_temperature; const lowest_temperature = unsafeWindow.so.variables.lowest_temperature; const chance_of_rain = unsafeWindow.so.variables.chance_of_rain; weather1 = (weather1) ? weather1 : ""; conjunction = (conjunction) ? conjunction : ""; weather2 = (weather2) ? weather2 : ""; var Chighest_temperature = (highest_temperature) ? " \u6700\u9ad8:"+highest_temperature : ""; var Clowest_temperature = (lowest_temperature) ? " \u6700\u4f4e:"+lowest_temperature : ""; var Cchance_of_rain = (chance_of_rain) ? " \u964d\u6c34\u78ba\u7387:"+chance_of_rain : ""; var temp = "" + Chighest_temperature + "/" + Clowest_temperature + ""; var weather_news = weather1 + conjunction + weather2 + temp + Cchance_of_rain; //GM_log(weather_news); var weatherbox = document.createElement("div"); weatherbox.innerHTML = decodeURI(weather_news); document.getElementById("WATCHHEADER").appendChild(weatherbox); })();