diff options
author | Noah Loomans <noahloomans@gmail.com> | 2016-12-08 21:23:19 +0100 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2016-12-08 21:23:19 +0100 |
commit | 3a9bdee97f9d05cbdb10f7530d4e94cf28d99602 (patch) | |
tree | 2c63824a80ae7a6602abbbcb166f269f31a8cb38 /public/javascripts/iframe.js | |
parent | c6aee6e370fe88909d462a2e10e45b72d20196f7 (diff) |
did some more work
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 |