Trim Countdown

Removes all unnessesary data from timeanddate.com countdown.

スクリプトをインストールするには、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         Trim Countdown
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Removes all unnessesary data from timeanddate.com countdown.
// @copyright    2018, Santeri Hetekivi (https://github.com/SanteriHetekivi)
// @license      Apache-2.0
// @author       Santeri Hetekivi
// @match        https://www.timeanddate.com/countdown/*
// @grant        none
// @require      https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
// ==/UserScript==

(function() {
    'use strict';
    // Query for minutes.
    var minutes_query = "#el_m1";
    // Query for seconds.
    var seconds_query = "#el_s1";
    // Query for minutes and seconds.
    var minutes_or_seconds_query = minutes_query+", "+seconds_query;
    // If minutes and seconds are found.
    if($(minutes_or_seconds_query).length === 2)
    {
        // Adding minutes and seconds to end of body.
        $(minutes_or_seconds_query).appendTo("body");
        // Remove all other elements from body.
        $("body > :not("+minutes_or_seconds_query+")").remove();
        // Removing all classes from minutes and seconds.
        $(minutes_or_seconds_query).removeClass();
        // Setting font-size for minutes and seconds to 70% of viewport.
        $(minutes_or_seconds_query).css("font-size", "70vw");
    }
})();