// ==UserScript== // @name DC - AITL Libre // @namespace DreadCast // @include http://www.dreadcast.net/Main // @grant none // @author La plume // @date 08/02/2015 // @version 0.2 // @description Pour un AITL Libre! Non à la censure! // @compat Firefox, Chrome // @require http://code.jquery.com/jquery-1.10.2.min.js // @downloadURL none // ==/UserScript== jQuery.noConflict(); docAnnoncesForAITLLibre = 'http://docs.google.com/uc?export=download&id=0B-Av7SO5FgugbXdnV3ZnWUVNUW8'; function getAnnoncesForAITLLibre(aitlID){ jQuery.ajax({ type: 'GET', url: docAnnoncesForAITLLibre, async: false, jsonpCallback: 'AnnoncesForAITLLibre', contentType: "application/json", dataType: 'jsonp', success: function(json){ $("#nbAnnoncesAITLLibre").html(json.annonces.length); htmlAnnoncesForAITLLibre = $("#"+aitlID+" .AnnoncesForAITLLibre .texte table tbody"); htmlAnnoncesForAITLLibre.html(''); jQuery.each(json.annonces, function(key, val){ htmlAnnoncesForAITLLibre.append(''+val[0]+''+val[1]+''); htmlAnnoncesForAITLLibre.append(''+val[2]+''); }); } }); } 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('La plume libre0'); $("#"+this.id+" .deces").after(''); getAnnoncesForAITLLibre(this.id); } AITL.prototype.showAnnoncesForAITLLibre=function(){ $("#"+this.id+" .principal").children().each(function(){ "AnnoncesForAITLLibre"!=$(this).attr("class")&&$(this).fadeOut() }), $("#"+this.id+" .actions .menu1, #"+this.id+" .actions .menu2, #"+this.id+" .actions .menu3").fadeOut(), $("#"+this.id+" .AnnoncesForAITLLibre").fadeIn(); getAnnoncesForAITLLibre(this.id); }