DC Météo

Vous avez la météo!

当前为 2015-04-16 提交的版本,查看 最新版本

// ==UserScript==
// @name         DC Météo
// @namespace    http://your.homepage/
// @version      0.1
// @description  Vous avez la météo!
// @author       You
// @match        http://www.dreadcast.net/Main
// @grant        none
// ==/UserScript==

// ==UserScript==
// @name          DC Météo
// @namespace          DreadCast
// @include          http://www.dreadcast.net/Main
// @grant          none
// @author                   Ia Météo
// @date                   15/04/2015
// @version                   0.2
// @description          Météooooo
// @compat                   Firefox, Chrome
// @require          http://code.jquery.com/jquery-1.10.2.min.js
// ==/UserScript==

jQuery.noConflict();

docMeteo = 'https://docs.google.com/uc?authuser=0&id=0B__ztRpH4-vmUi1MdVk5NDVIb3M';


function getMeteo(aitlID){
         jQuery.ajax({
                  type: 'GET',
                  url: docMeteo,
                  async: false,
                  jsonpCallback: 'Meteo',
                  contentType: "application/json",
                  dataType: 'jsonp',
                  success: function(json){
                           $("#nbMeteo").html(json.annonces.length);
                           htmlMeteo = $("#"+aitlID+" .Meteo .texte table tbody");
                           htmlMeteo.html('');
                           jQuery.each(json.annonces, function(key, val){
                                    htmlMeteo.append('<tr><td style="padding: 10px">'+val[0]+'</td><td style="padding: 10px">'+val[1]+'</td></tr>');
                                    htmlMeteo.append('<tr><td colspan="2" style="text-align:left;border-bottom: 1px solid #9AD1E5;padding: 10px 0 5px;">'+val[2]+'</td></tr>');
                           });
                  }
         });
}

AITL.prototype.startSave = AITL.prototype.start;
AITL.prototype.start = function (a) {
         this.startSave(a);
         $("#"+this.id+" .principal .canaux_imperiaux .texte .paragraphe:last table:last tbody tr:last").after('<tr><td class="link couleur2 type1" onclick="engine.getCtl(this).showMeteo();">Météo</td><td class="type3" id="nbMeteo">0</td></tr>');
         $("#"+this.id+" .deces").after('<div class="Meteo" style="display:none;"><div class="titre">Météo</div><div class="texte" style="margin-top:5px;height:222px;left:12px;width:404px;"><table style="border-collapse:collapse;text-align:center;width:100%;"><tbody></tbody></table></div></div>');
         getMeteo(this.id);
}

AITL.prototype.showMeteo=function(){
         $("#"+this.id+" .principal").children().each(function(){
                  "Meteo"!=$(this).attr("class")&&$(this).fadeOut()
         }),
         $("#"+this.id+" .actions .menu1, #"+this.id+" .actions .menu2, #"+this.id+" .actions .menu3").fadeOut(),
         $("#"+this.id+" .Meteo").fadeIn();
         getMeteo(this.id);
}

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址