°F+°C Weather - google

Shows the current °F and °C weather temperature at the same time on google.

Stan na 14-04-2022. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         °F+°C Weather - google
// @namespace    https://greasyfork.org/en/users/670188-hacker09?sort=daily_installs
// @version      2
// @description  Shows the current °F and °C weather temperature at the same time on google.
// @author       hacker09
// @include      *://www.google.*
// @icon         https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=http://www.google.com&size=64
// @run-at       document-end
// @grant        none
// @noframes
// ==/UserScript==

(function() {
  'use strict';
  var c = document.querySelectorAll('div.vk_bk.TylWce.SGNhVe > span,#wob_tm')[0].innerText; //Save the current temperature value
  var f = document.querySelectorAll('div.vk_bk.TylWce.SGNhVe > span:nth-child(1),#wob_ttm')[0].innerText; //Save the hidden temperature value

  document.querySelector("div.vk_bk.wob-unit,div.wob_uctr").style.display = 'none'; //Hide the default °C °F google text

  if (document.querySelector("div.vk_bk.wob-unit > span,div.wob_uctr > span").innerText === '°F') //If the current temperature is in °F
  { //Starts the if condition
    document.querySelector("div.vk_bk.TylWce.SGNhVe,div.vk_bk.wob_tuctr").innerText = c + '°F ' + f + '°C'; //Show °F °C
  } //Finishes the if condition
  else //If the current temperature is in °C
  { //Starts the else condition
    document.querySelector("div.vk_bk.TylWce.SGNhVe,div.vk_bk.wob_tuctr").innerText = c + '°C ' + f + '°F'; //Show °C °F
  } //Finishes the else condition
})();