2 * Script for plugin_xfortune
6 * @author Andreas Gohr <andi@splitbrain.org>
9 function plugin_xfortune(){
10 if(!document.getElementById){
13 var obj = document.getElementById('plugin_xfortune');
18 // We use SACK to do the AJAX requests
19 var ajax = new sack(DOKU_BASE+'lib/plugins/xfortune/ajax.php');
20 ajax_qsearch.sack.AjaxFailedAlert = '';
21 ajax_qsearch.sack.encodeURIString = false;
24 ajax.onCompletion = function(){
25 var data = this.response;
26 if(data === ''){ return; }
27 var out = document.getElementById('plugin_xfortune');
29 out.style.visibility = 'hidden';
31 out.style.visibility = 'visible';
34 window.setTimeout("plugin_xfortune()",plugin_xfortune_time);
37 ajax.runAJAX('cookie='+encodeURI(plugin_xfortune_cookie));