Skip to content

Commit

Permalink
移动端适配:精简大量按钮
Browse files Browse the repository at this point in the history
  • Loading branch information
LiarOnce committed Feb 3, 2019
1 parent 9fa0036 commit c3572ec
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions hook/footer_js_after.htm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
$agent = strtolower($_SERVER['HTTP_USER_AGENT']);
$is_iphone = (strpos($agent, 'iphone'));
$is_android = (strpos($agent, 'android'));
$is_pc = (strpos($agent, 'windows nt'));
$is_mac = (strpos($agent, 'mac os'));
$is_ipad = (strpos($agent, 'ipad'));
?>

<script>
Expand Down Expand Up @@ -61,6 +64,16 @@
tex: <?php echo $editor_md_config['tex'];?>,
flowChart: <?php echo $editor_md_config['flowChart'];?>,
sequenceDiagram: <?php echo $editor_md_config['sequenceDiagram'];?>,
<?php if($is_pc||$is_mac||$is_ipad){?>
toolbarIcons : function() {
return editormd.toolbarModes[full];
},
<?php }?>
<?php if($is_iphone||$is_android){?>
toolbarIcons : function() {
return ["undo", "redo", "|", "link", "image", "code", "|", "preview", "clear", "search"]
},
<?php }?>
pageBreak: <?php echo $editor_md_config['pageBreak'];?>
});
});
Expand Down

0 comments on commit c3572ec

Please sign in to comment.