Greasy Fork 还支持 简体中文。

Forecast.io – auto-show today’s outlook

Automatically expand the detailed forecast for today when visiting Forecast.io

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        Forecast.io – auto-show today’s outlook
// @namespace   roryokane.com
// @description Automatically expand the detailed forecast for today when visiting Forecast.io
// @include     http://forecast.io/
// @include     http://forecast.io/#*
// @version     1.0.1
// @grant       none
// ==/UserScript==


// jQuery waitUntilExists plugin
// copied directly from https://gist.githubusercontent.com/PizzaBrandon/5709010/raw/57edca8e8aba3954551397167039a049a572018c/jquery.waituntilexists.min.js
// for the unminified version, see https://gist.github.com/PizzaBrandon/5709010/e539a6f16c10465eb948b9ef6b0fe1d4c17a7c3e#file-jquery-waituntilexists-js
// Why include this inline instead of using @require? To satisfy [Greasy Fork’s policy](https://greasyfork.org/help/external-scripts).
// I can’t find this plugin or any equivalent on a whitelisted site, even though it fits Greasy Fork’s three criteria for external scripts.
// ========== START included plugin ==========
(function(e,f){var b={},g=function(a){b[a]&&(f.clearInterval(b[a]),b[a]=null)};e.fn.waitUntilExists=function(a,h,j){var c=this.selector,d=e(c),k=d.not(function(){return e(this).data("waitUntilExists.found")});"remove"===a?g(c):(k.each(a).data("waitUntilExists.found",!0),h&&d.length?g(c):j||(b[c]=f.setInterval(function(){d.waitUntilExists(a,h,!0)},500)));return d}})(jQuery,window);
// ========== END included plugin ==========


var todayPanelSelected = jQuery('#outlook .day.panel:first .top');
todayPanelSelected.waitUntilExists(function(matchIndex, todayPanel) {
	todayPanel.click();
});