diff options
author | Jesús <heckyel@hyperbola.info> | 2019-12-30 15:55:13 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2019-12-30 15:55:13 -0500 |
commit | 288df6a7bf8b933e2dc499e38f4915fcf974c14b (patch) | |
tree | 77bba994f260c064d3ee7f76c427ddfaa4f91710 /js/asset-viewer.js | |
parent | a2c9deaa145b780722e93b3899600f287c8094a4 (diff) | |
download | ematrix-288df6a7bf8b933e2dc499e38f4915fcf974c14b.tar.lz ematrix-288df6a7bf8b933e2dc499e38f4915fcf974c14b.tar.xz ematrix-288df6a7bf8b933e2dc499e38f4915fcf974c14b.zip |
backport
- Flush caches on upgrade
- Properly handle FrameModule's unloading
- Use the new module and remove the old implementation
Diffstat (limited to 'js/asset-viewer.js')
-rw-r--r-- | js/asset-viewer.js | 21 |
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); })(); |