Skip to content
Snippets Groups Projects
Commit f65cf05b authored by Stephen D's avatar Stephen D
Browse files

Fixed window size problem in i3

parent 9a3aa42d
No related branches found
No related tags found
No related merge requests found
......@@ -7,17 +7,17 @@ var is_desktop = true;
window.addEventListener('resize', resize);
document.addEventListener('turbolinks:load', function() {
is_desktop = window.screen.width < 800;
is_desktop = window.innerWidth < 800;
resize();
});
function resize() {
if(window.screen.width < 800 && is_desktop)
if(window.innerWidth < 800 && is_desktop)
{
is_desktop = false;
go_mobile();
}
else if(window.screen.width >= 800 && !is_desktop)
else if(window.innerWidth >= 800 && !is_desktop)
{
is_desktop = true;
go_desktop();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment