1/** 2 * Script for plugin_xfortune 3 * 4 * Fetches a new cookie 5 * 6 * @author Andreas Gohr <andi@splitbrain.org> 7 */ 8 9jQuery(function () { 10 jQuery('div.plugin_xfortune').each(function () { 11 var $self = jQuery(this); 12 if(!$self.data('time')) return; 13 if(!$self.data('cookie')) return; 14 15 window.setInterval(function () { 16 jQuery.post( 17 DOKU_BASE + 'lib/exe/ajax.php', 18 { 19 call: 'plugin_xfortune', 20 cookie: $self.data('cookie') 21 }, 22 function (data) { 23 $self.html(data) 24 } 25 ) 26 }, $self.data('time') * 1000); 27 }); 28}); 29 30