diff --git a/ui/lib/jli.js b/ui/lib/jli.js index 6b3500f3..62301329 100755 --- a/ui/lib/jli.js +++ b/ui/lib/jli.js @@ -728,6 +728,39 @@ function makeDeferredsQ(first){ /**************************************************** JS utilities ***/ + +// Get screen dpi... +// +// This will calculate the value and save it to screen.dpi +// +// if force is true this will re-calculate the value. +// +// NOTE: this needs the body loaded to work... +// NOTE: this may depend on page zoom... +// NOTE: yes, this is a hack, but since we have no other reliable way to +// do this... +function getDPI(force){ + if(screen.dpi == null || force){ + var e = $('