/usr/share/perl5/auto/share/dist/Jifty-Plugin-Chart/web/static/js/chart_img_behaviour.js is in libjifty-plugin-chart-perl 1.01+dfsg-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | /*
* chart_behaviour.js
*
* Helper to make charts more designer friendly.
*/
Behaviour.register({
'img.chart': function(e) {
var dim = Element.getDimensions(e);
var url = e.src;
var path = url;
var query = new Hash();
if (url.indexOf('?') >= 0) {
var path_and_query = url.split('?');
path = path_and_query[0];
var query_params = path_and_query[1].split('&');
for (var query_param in query_params) {
var key_and_value = query_param.split('=');
query.set(key_and_value[0], key_and_value[1]);
}
}
query.set('width', dim.width + 'px');
query.set('height', dim.height + 'px');
url = path + '?' + query.toQueryString();
e.src = url;
}
});
|