Bunpro: Egg Timer

Times your review session.

2018/06/30のページです。最新版はこちら

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Bunpro: Egg Timer
// @namespace    http://tampermonkey.net/
// @version      0.2.2
// @description  Times your review session.
// @author       Kumirei
// @include      https://bunpro.jp/*
// @require      https://greasyfork.org/scripts/5392-waitforkeyelements/code/WaitForKeyElements.js?version=115012
// @grant        none
// ==/UserScript==

(function() {
				var elapsed = 0;
		waitForKeyElements('#study-page', function() {
				$('.help-button').after('<div id="egg-timer" class="help-button" style="left: 60px;">00:00</div>');
				setInterval(function() {
						elapsed++;
						var seconds = String(elapsed % 60);
						if (seconds < 10) seconds = '0' + seconds;
						var minutes = String(Math.floor(elapsed/60));
						if (minutes < 10) minutes = '0' + minutes;
						else minutes = minutes % 60;
						var hours = '';
						if (elapsed/60 > 59) {
								hours = String(Math.floor(elapsed/3600));
								if (hours < 10) hours = '0' + hours;
								hours += ':';
						}
						var timestamp = hours + minutes + ':' + seconds;
						$('#egg-timer')[0].innerText = timestamp;
				}, 1000);
		});
})();