b374k
m1n1 1.01
Apache
Linux webd001.cluster107.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
uid=2234(oyaide) gid=100(users) groups=100(users)
server ip : 213.186.33.18 | your ip : 216.73.216.136
safemode OFF
 >  / home / oyaide / www / moycompany.com / piwigo2 / plugins / GrumPluginClasses / js /
Filename/home/oyaide/www/moycompany.com/piwigo2/plugins/GrumPluginClasses/js/ui.download.js
Size1.61 kb
Permissionrw----r--
Owneroyaide : users
Create time11-Mar-2016 09:47
Last modified04-Sep-2012 15:15
Last accessed04-Sep-2012 15:15
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
/**
* -----------------------------------------------------------------------------
* file: ui.download.js
* file version: 1.0.0
* date: 2012-09-04
*
* A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses"
*
* -----------------------------------------------------------------------------
* Author : Grum
* email : grum@piwigo.com
* website : http://www.grum.fr
*
* << May the Little SpaceFrog be with you ! >>
* -----------------------------------------------------------------------------
*
*
*
*
* :: HISTORY ::
*
* | release | date |
* | 1.0.0 | 2012/09/04 | first release
* | | |
* | | |
* | | |
* | | |
* | | |
* | | |
*
*/



/**
* Allows to download a file without having to open/refresh a page
*
* $.download(url)
* => download file with the given url
*
* @param String url: a valid url
*/
$.download = function (url)
{
var timer=null,
hif=null,

/**
* initialise the context
*/
init = function (url)
{
hif=$('<iframe/>',
{
id:'hif',
style:'display:none;',
src:url
}
).load(startDownload);
$('body').append(hif);
},

/**
* start file download
*/
startDownload = function ()
{
timer=window.setInterval(
function ()
{
window.clearInterval(timer);
$(hif).remove();
}, 1500
);
};


init(url);
} // $.downloadUrl