mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-27 13:34:30 -04:00
Refactor API.
This commit is contained in:
parent
e31028f5a9
commit
7c4f9d574c
5 changed files with 53 additions and 36 deletions
|
@ -20,14 +20,16 @@ modulejs.define('ext/preview-img', ['_', '$', 'core/event', 'core/server', 'core
|
|||
}
|
||||
|
||||
server.request({
|
||||
action: 'getThumbHref',
|
||||
type: 'img',
|
||||
href: href,
|
||||
width: settings.size,
|
||||
height: 0
|
||||
action: 'get',
|
||||
thumbs: [{
|
||||
type: 'img',
|
||||
href: href,
|
||||
width: settings.size,
|
||||
height: 0
|
||||
}]
|
||||
}, function (json) {
|
||||
|
||||
callback(json && json.href ? json.href : null);
|
||||
callback(json && json.thumbs && json.thumbs[0] ? json.thumbs[0] : null);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue