mirror of https://github.com/rancher/ui.git
19 lines
432 B
JavaScript
19 lines
432 B
JavaScript
export function initialize(/* application*/) {
|
|
// Add 'touch' or 'no-touch' to the <body> so CSS can depend on the device type.
|
|
|
|
var body = $('BODY'); // eslint-disable-line
|
|
|
|
if ('ontouchstart' in document.documentElement) {
|
|
// Has touch, like an iPad
|
|
body.addClass('touch');
|
|
} else {
|
|
// Does not have touch, like a desktop
|
|
body.addClass('no-touch');
|
|
}
|
|
}
|
|
|
|
export default {
|
|
name: 'touch',
|
|
initialize
|
|
};
|