User:User587668/common.js

var apiUrl = '/w/api.php';

$.ajax({ url: apiUrl,  type: "POST",  dataType: 'json',  data: { format: 'json',         action: 'query',         prop: 'imageinfo',         titles: 'File:Example.jpg',         iiprop: 'size,timestamp,user,url'        },  success: function (data) {    //console.log( data );    obj = data.query.pages;    console.log( obj );  } });