javascript - Google weather widget on my website -


I want to show weather on my website. I saw all weather widgets that I could find online, none of them Google's Not as good (when I search for the weather for my city) and I did not find any documents to embed it on my website.

I would like to know that if there is any way I can do the exact Google widget plugin on my website. (When I search for the weather)

The service is calling and there is another option to create a whole widget, I have some APIs and it seems like a lot of work (Yahoo) APIs 30 different states give to the states.) It is for educational purposes and therefore I do not intend to spend so much time on this.

If anyone has used Google's weather widget, please let me know. The Google Weather Info Box is part of the search results page and so can not be obtained independently (AAAIIAC).

It is possible to remove information from the results page. It can be done on a web server, or in the browser (JavScript or Extensions / Plugins). It is possible to embed a Google page in another (), and then delete everything except weather data here and there is a little javascript for the weather box:

  var script = document.createElement ( 'script'); script.src = "https://ajax.googleapis.com/ajax/ libs/JQuery/2.0.0/jquery.min.js"; document.getElementsByTagName ('head') [0] .appendChild (script); .... $ ('# Wob_wc') show () parentsUntil ('body') andSelf () brother (sister) hide () .;   

Both of these rows can be run in the JavaScript console (tested in Firefox). The box is slightly offset from the top and left page edges.

Two rows can be used as a bookmarklet (a link that runs from the top line on the current page), however, I < > Javascript: (function () {var script = document.createElement ('script'); script.src = "https://ajax.googleapis.com/ajax/libs/jquery /2.2.0/jquery.min.js "; document getElementsByTagName [0] .appendBild (script); function defer () {if (window.jQuery) method (); else setTimeout (function) {Defer (method)}, 50);} function method () {$ ('# wob_wc') show (). ParentsUntil ('body') and self (.) Siblings (). Get ();} defer ();}) ();

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -