aboutsummaryrefslogtreecommitdiffstats
path: root/js/asset-viewer.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/asset-viewer.js')
-rw-r--r--js/asset-viewer.js21
1 files changed, 8 insertions, 13 deletions
diff --git a/js/asset-viewer.js b/js/asset-viewer.js
index 1d88459..0185ff1 100644
--- a/js/asset-viewer.js
+++ b/js/asset-viewer.js
@@ -23,25 +23,20 @@
'use strict';
-/******************************************************************************/
-
(function() {
-
- var onAssetContentReceived = function(details) {
+ let onAssetContentReceived = function (details) {
document.getElementById('content').textContent =
details && (details.content || '');
};
- var q = window.location.search;
- var matches = q.match(/^\?url=([^&]+)/);
- if ( !matches || matches.length !== 2 ) {
+ let q = window.location.search;
+ let matches = q.match(/^\?url=([^&]+)/);
+ if (!matches || matches.length !== 2) {
return;
}
- vAPI.messaging.send(
- 'asset-viewer.js',
- { what : 'getAssetContent', url: matches[1] },
- onAssetContentReceived
- );
-
+ vAPI.messaging.send('asset-viewer.js', {
+ what : 'getAssetContent',
+ url: matches[1]
+ }, onAssetContentReceived);
})();