Files
moodle/lib/flashdetect/flashdetect.js
T
2009-12-17 05:26:28 +00:00

26 lines
603 B
JavaScript

/*
* Javascript library for flash detection
*/
/*
* This function build POST parameter for the YUI asynchrequest call
*/
function build_flashquerystring(obj) {
if (typeof obj !== 'object') {
return null;
}
var list = [];
for(var k in obj) {
k = encodeURIComponent(k);
var value = obj[k];
if(obj[k] instanceof Array) {
for(var i in value) {
list.push(k+'[]='+encodeURIComponent(value[i]));
}
} else {
list.push(k+'='+encodeURIComponent(value));
}
}
return list.join('&');
}