mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-08 16:05:05 -04:00
Merge 9203ac2362
into dc2448d0e1
This commit is contained in:
commit
0e186c8d58
2 changed files with 10 additions and 8 deletions
|
@ -85,6 +85,11 @@ function OUTER(gscope)
|
|||
var doesWrap = true;
|
||||
var hasLineNumbers = true;
|
||||
var isStyled = true;
|
||||
|
||||
// check for mobile os presence
|
||||
var ua = navigator.userAgent.toLowerCase();
|
||||
var isAndroid = ua.indexOf("android") > -1;
|
||||
var isMobileSafari = ua.indexOf("mobile") > -1;
|
||||
|
||||
// space around the innermost iframe element
|
||||
var iframePadLeft = MIN_LINEDIV_WIDTH + LINE_NUMBER_PADDING_RIGHT + EDIT_BODY_PADDING_LEFT;
|
||||
|
@ -1105,6 +1110,8 @@ function OUTER(gscope)
|
|||
else if (k == "showslinenumbers")
|
||||
{
|
||||
hasLineNumbers = !! value;
|
||||
// disable line numbers on mobile devices
|
||||
if(isAndroid || isMobileSafari) hasLineNumbers = false;
|
||||
setClassPresence(sideDiv, "sidedivhidden", !hasLineNumbers);
|
||||
fixView();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue