Browse Source

Changed scale on ios devices

pull/57/head
Jure Šorn 4 years ago
parent
commit
e6b0122bb1
3 changed files with 10 additions and 0 deletions
  1. 1
      index.html
  2. 8
      web/script_2.js
  3. 1
      web/template.html

1
index.html

@ -14,6 +14,7 @@
<meta name="twitter:description" content="Exhaustive, simple, beautiful and concise. A truly pythonic cheat sheet about Python programming language.">
<meta name="twitter:image" content="https://gto76.github.io/python-cheatsheet/web/image_twitter_card_2.jpeg">
<meta name="google-site-verification" content="w3rvuG0D1kUm_w20qsJecSEZh59Am8jK4eSPVU83e_M" />
<meta name="viewport" content="initial-scale=1" id="viewport-meta">
</head>
<style>

8
web/script_2.js

@ -38,6 +38,14 @@ const TOC_MOBILE =
' <a href="#image">Image</a>, <a href="#audio">Audio</a>, <a href="#pygame">Pygame</a>]\n' +
'}\n';
var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
if (iOS) {
var viewport_meta = document.getElementById('viewport-meta');
viewport_meta.setAttribute('content', "initial-scale=0.55");
}
var isMobile = false;
// Device detection:
if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)

1
web/template.html

@ -14,6 +14,7 @@
<meta name="twitter:description" content="Exhaustive, simple, beautiful and concise. A truly pythonic cheat sheet about Python programming language.">
<meta name="twitter:image" content="https://gto76.github.io/python-cheatsheet/web/image_twitter_card_2.jpeg">
<meta name="google-site-verification" content="w3rvuG0D1kUm_w20qsJecSEZh59Am8jK4eSPVU83e_M" />
<meta name="viewport" content="initial-scale=1" id="viewport-meta">
</head>
<style>

Loading…
Cancel
Save