Widget:Sandbox: Difference between revisions
Jump to navigation
Jump to search
Matt Pijoan (talk | contribs) No edit summary |
Matt Pijoan (talk | contribs) No edit summary |
||
Line 600: | Line 600: | ||
}, | }, | ||
score : function(){ | score : function(){ | ||
var api = new mw.Api(); | |||
api.get({ | |||
action : 'wbrgetrating', | |||
question : page, | |||
format : 'json' | |||
}, { | |||
ok : function (res) { | |||
return res.wbrgetrating.difficulty; | |||
} | |||
}); | |||
}, | }, | ||
hints : ['Very Poor', 'Poor', 'Average', 'Good', 'Very Good'] | hints : ['Very Poor', 'Poor', 'Average', 'Good', 'Very Good'] |