updated device.js

i attempted to use window.device to load device information in which
did not work so i resorted back to device.element