diff options
Diffstat (limited to 'public/javascripts/iframe.js')
-rw-r--r-- | public/javascripts/iframe.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/public/javascripts/iframe.js b/public/javascripts/iframe.js new file mode 100644 index 0000000..e3296be --- /dev/null +++ b/public/javascripts/iframe.js @@ -0,0 +1,14 @@ +const getURLOfUser = require('./getURLOfUser') + +const self = {} + +self._nodes = { + iframe: document.querySelector('iframe') +} + +self.viewItem = function (offset, selectedUser) { + const url = getURLOfUser(offset, selectedUser.type, selectedUser.index + 1) + self._nodes.iframe.src = url +} + +module.exports = self |