Commit e8c5a706 by xcoder

Add click handler for google play block; change svg block for ru and en

1 parent 1f2758c1
This diff could not be displayed because it is too large.
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="249px" height="96px" viewBox="0 0 248 96" version="1.1">
<defs>
<linearGradient id="linear0" gradientUnits="userSpaceOnUse" x1="31.8" y1="183.29" x2="15.02" y2="166.51" gradientTransform="matrix(1.6,0,0,-1.6,0,323.2)">
<stop offset="0" style="stop-color:rgb(0%,62.745098%,100%);stop-opacity:1;"/>
<stop offset="0.01" style="stop-color:rgb(0%,63.137255%,100%);stop-opacity:1;"/>
<stop offset="0.26" style="stop-color:rgb(0%,74.509804%,100%);stop-opacity:1;"/>
<stop offset="0.51" style="stop-color:rgb(0%,82.352941%,100%);stop-opacity:1;"/>
<stop offset="0.76" style="stop-color:rgb(0%,87.45098%,100%);stop-opacity:1;"/>
<stop offset="1" style="stop-color:rgb(0%,89.019608%,100%);stop-opacity:1;"/>
</linearGradient>
<linearGradient id="linear1" gradientUnits="userSpaceOnUse" x1="43.83" y1="172" x2="19.64" y2="172" gradientTransform="matrix(1.6,0,0,-1.6,0,323.2)">
<stop offset="0" style="stop-color:rgb(100%,87.843137%,0%);stop-opacity:1;"/>
<stop offset="0.41" style="stop-color:rgb(100%,74.117647%,0%);stop-opacity:1;"/>
<stop offset="0.78" style="stop-color:rgb(100%,64.705882%,0%);stop-opacity:1;"/>
<stop offset="1" style="stop-color:rgb(100%,61.176471%,0%);stop-opacity:1;"/>
</linearGradient>
<linearGradient id="linear2" gradientUnits="userSpaceOnUse" x1="34.83" y1="169.7" x2="12.07" y2="146.95" gradientTransform="matrix(1.6,0,0,-1.6,0,323.2)">
<stop offset="0" style="stop-color:rgb(100%,22.745098%,26.666667%);stop-opacity:1;"/>
<stop offset="1" style="stop-color:rgb(76.470588%,6.666667%,38.431373%);stop-opacity:1;"/>
</linearGradient>
<linearGradient id="linear3" gradientUnits="userSpaceOnUse" x1="17.3" y1="191.82" x2="27.46" y2="181.66" gradientTransform="matrix(1.6,0,0,-1.6,0,323.2)">
<stop offset="0" style="stop-color:rgb(19.607843%,62.745098%,44.313725%);stop-opacity:1;"/>
<stop offset="0.07" style="stop-color:rgb(17.647059%,65.490196%,44.313725%);stop-opacity:1;"/>
<stop offset="0.48" style="stop-color:rgb(8.235294%,81.176471%,45.490196%);stop-opacity:1;"/>
<stop offset="0.8" style="stop-color:rgb(2.352941%,90.588235%,45.882353%);stop-opacity:1;"/>
<stop offset="1" style="stop-color:rgb(0%,94.117647%,46.27451%);stop-opacity:1;"/>
</linearGradient>
<filter id="alpha" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
<feColorMatrix type="matrix" in="SourceGraphic" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
</filter>
<mask id="mask0">
<g filter="url(#alpha)">
<rect x="0" y="0" width="248" height="96" style="fill:rgb(0%,0%,0%);fill-opacity:0.2;stroke:none;"/>
</g>
</mask>
<clipPath id="clip1">
<rect x="0" y="0" width="248" height="96"/>
</clipPath>
<g id="surface5" clip-path="url(#clip1)">
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 59.199219 54.609375 L 36.015625 67.808594 C 35.066406 68.515625 33.765625 68.515625 32.816406 67.808594 L 32.703125 67.921875 L 32.816406 68.03125 C 33.761719 68.746094 35.070312 68.746094 36.015625 68.03125 L 59.390625 54.753906 Z M 59.199219 54.609375 "/>
</g>
<mask id="mask1">
<g filter="url(#alpha)">
<rect x="0" y="0" width="248" height="96" style="fill:rgb(0%,0%,0%);fill-opacity:0.121569;stroke:none;"/>
</g>
</mask>
<clipPath id="clip2">
<rect x="0" y="0" width="248" height="96"/>
</clipPath>
<g id="surface8" clip-path="url(#clip2)">
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 32.703125 67.710938 C 32.183594 67.085938 31.917969 66.285156 31.96875 65.472656 L 31.96875 65.710938 C 31.917969 66.523438 32.183594 67.328125 32.703125 67.953125 L 32.816406 67.839844 Z M 67.199219 50.078125 L 59.199219 54.609375 L 59.34375 54.753906 L 67.199219 50.304688 C 68.105469 49.878906 68.71875 49 68.800781 48 C 68.617188 48.902344 68.027344 49.671875 67.199219 50.078125 Z M 67.199219 50.078125 "/>
</g>
<mask id="mask2">
<g filter="url(#alpha)">
<rect x="0" y="0" width="248" height="96" style="fill:rgb(0%,0%,0%);fill-opacity:0.25098;stroke:none;"/>
</g>
</mask>
<clipPath id="clip3">
<rect x="0" y="0" width="248" height="96"/>
</clipPath>
<g id="surface11" clip-path="url(#clip3)">
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 36.015625 28.191406 L 67.199219 45.921875 C 68.027344 46.328125 68.617188 47.097656 68.800781 48 C 68.71875 47 68.105469 46.121094 67.199219 45.695312 L 36.015625 27.96875 C 33.777344 26.703125 31.953125 27.761719 31.953125 30.320312 L 31.953125 30.558594 C 32 27.984375 33.792969 26.929688 36.015625 28.191406 Z M 36.015625 28.191406 "/>
</g>
</defs>
<g id="surface1">
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 24 16 L 224 16 C 228.417969 16 232 19.582031 232 24 L 232 72 C 232 76.417969 228.417969 80 224 80 L 24 80 C 19.582031 80 16 76.417969 16 72 L 16 24 C 16 19.582031 19.582031 16 24 16 Z M 24 16 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(65.098039%,65.098039%,65.098039%);fill-opacity:1;" d="M 224 17.28125 C 227.710938 17.28125 230.71875 20.289062 230.71875 24 L 230.71875 72 C 230.71875 75.710938 227.710938 78.71875 224 78.71875 L 24 78.71875 C 20.289062 78.71875 17.28125 75.710938 17.28125 72 L 17.28125 24 C 17.28125 20.289062 20.289062 17.28125 24 17.28125 L 224 17.28125 M 224 16 L 24 16 C 19.582031 16 16 19.582031 16 24 L 16 72 C 16 76.417969 19.582031 80 24 80 L 224 80 C 228.417969 80 232 76.417969 232 72 L 232 24 C 232 19.582031 228.417969 16 224 16 Z M 224 16 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 125.023438 50.800781 C 121.273438 50.816406 118.246094 53.871094 118.257812 57.621094 C 118.269531 61.371094 121.316406 64.40625 125.066406 64.398438 C 128.816406 64.394531 131.855469 61.351562 131.855469 57.601562 C 131.882812 55.78125 131.171875 54.03125 129.882812 52.75 C 128.59375 51.46875 126.839844 50.765625 125.023438 50.800781 Z M 125.023438 61.726562 C 123.332031 61.847656 121.742188 60.917969 121.011719 59.390625 C 120.28125 57.859375 120.558594 56.039062 121.714844 54.796875 C 122.867188 53.558594 124.664062 53.148438 126.242188 53.765625 C 127.820312 54.386719 128.859375 55.90625 128.863281 57.601562 C 128.917969 58.660156 128.539062 59.695312 127.816406 60.472656 C 127.089844 61.25 126.085938 61.703125 125.023438 61.726562 Z M 110.128906 50.800781 C 106.375 50.808594 103.339844 53.855469 103.34375 57.609375 C 103.351562 61.363281 106.394531 64.402344 110.148438 64.398438 C 113.902344 64.398438 116.945312 61.351562 116.945312 57.601562 C 116.96875 55.78125 116.257812 54.03125 114.96875 52.75 C 113.683594 51.46875 111.929688 50.765625 110.113281 50.800781 Z M 110.128906 61.726562 C 108.4375 61.851562 106.839844 60.929688 106.105469 59.402344 C 105.367188 57.875 105.644531 56.050781 106.796875 54.804688 C 107.949219 53.5625 109.746094 53.148438 111.324219 53.765625 C 112.90625 54.382812 113.949219 55.902344 113.953125 57.601562 C 114.003906 58.660156 113.625 59.695312 112.902344 60.472656 C 112.179688 61.25 111.171875 61.703125 110.113281 61.726562 Z M 92.382812 52.894531 L 92.382812 55.777344 L 99.296875 55.777344 C 99.1875 57.132812 98.625 58.414062 97.695312 59.40625 C 96.296875 60.832031 94.363281 61.597656 92.367188 61.519531 C 88.125 61.519531 84.6875 58.082031 84.6875 53.839844 C 84.6875 49.597656 88.125 46.160156 92.367188 46.160156 C 94.316406 46.128906 96.199219 46.871094 97.601562 48.222656 L 99.632812 46.191406 C 97.71875 44.253906 95.105469 43.175781 92.382812 43.199219 C 88.511719 43.050781 84.863281 45.03125 82.882812 48.363281 C 80.902344 51.695312 80.902344 55.84375 82.882812 59.175781 C 84.863281 62.507812 88.511719 64.488281 92.382812 64.335938 C 95.15625 64.460938 97.84375 63.382812 99.761719 61.375 C 101.4375 59.535156 102.332031 57.113281 102.257812 54.625 C 102.261719 54.019531 102.207031 53.410156 102.097656 52.816406 Z M 164.878906 55.136719 C 164.027344 52.621094 161.707031 50.898438 159.054688 50.800781 C 157.285156 50.796875 155.59375 51.527344 154.382812 52.8125 C 153.171875 54.101562 152.546875 55.835938 152.65625 57.601562 C 152.617188 59.40625 153.3125 61.152344 154.585938 62.433594 C 155.859375 63.71875 157.601562 64.425781 159.40625 64.398438 C 161.679688 64.414062 163.808594 63.28125 165.070312 61.390625 L 162.753906 59.792969 C 162.046875 60.964844 160.777344 61.683594 159.40625 61.679688 C 157.988281 61.734375 156.683594 60.914062 156.113281 59.617188 L 165.214844 55.855469 Z M 155.601562 57.40625 C 155.535156 56.410156 155.875 55.425781 156.542969 54.679688 C 157.210938 53.929688 158.152344 53.484375 159.152344 53.441406 C 160.207031 53.371094 161.203125 53.9375 161.679688 54.878906 Z M 148.207031 64 L 151.199219 64 L 151.199219 44 L 148.207031 44 Z M 143.3125 52.320312 L 143.199219 52.320312 C 142.289062 51.300781 140.984375 50.71875 139.617188 50.71875 C 135.984375 50.894531 133.128906 53.890625 133.128906 57.527344 C 133.128906 61.164062 135.984375 64.160156 139.617188 64.335938 C 140.988281 64.359375 142.300781 63.773438 143.199219 62.734375 L 143.296875 62.734375 L 143.296875 63.710938 C 143.296875 66.320312 141.902344 67.710938 139.664062 67.710938 C 138.136719 67.675781 136.785156 66.722656 136.238281 65.296875 L 133.632812 66.382812 C 134.636719 68.828125 137.023438 70.414062 139.664062 70.398438 C 143.167969 70.398438 146.0625 68.335938 146.0625 63.3125 L 146.0625 51.199219 L 143.3125 51.199219 Z M 139.886719 61.726562 C 137.75 61.539062 136.109375 59.746094 136.109375 57.601562 C 136.109375 55.453125 137.75 53.660156 139.886719 53.472656 C 140.921875 53.523438 141.890625 53.992188 142.574219 54.769531 C 143.257812 55.546875 143.597656 56.566406 143.519531 57.601562 C 143.609375 58.636719 143.269531 59.664062 142.578125 60.445312 C 141.890625 61.222656 140.910156 61.6875 139.871094 61.726562 Z M 178.894531 44 L 171.742188 44 L 171.742188 64 L 174.734375 64 L 174.734375 56.414062 L 178.910156 56.414062 C 181.234375 56.582031 183.460938 55.4375 184.671875 53.449219 C 185.886719 51.457031 185.886719 48.957031 184.671875 46.96875 C 183.460938 44.976562 181.234375 43.832031 178.910156 44 Z M 178.894531 53.601562 L 174.71875 53.601562 L 174.71875 46.785156 L 178.960938 46.785156 C 180.855469 46.785156 182.390625 48.320312 182.390625 50.214844 C 182.390625 52.113281 180.855469 53.648438 178.960938 53.648438 Z M 197.34375 50.71875 C 195.117188 50.585938 193.023438 51.789062 192.015625 53.777344 L 194.671875 54.878906 C 195.207031 53.894531 196.273438 53.316406 197.390625 53.40625 C 198.160156 53.320312 198.929688 53.539062 199.53125 54.023438 C 200.132812 54.507812 200.515625 55.214844 200.59375 55.984375 L 200.59375 56.191406 C 199.632812 55.683594 198.558594 55.417969 197.472656 55.425781 C 194.609375 55.425781 191.710938 57.023438 191.710938 59.921875 C 191.769531 61.167969 192.328125 62.339844 193.261719 63.167969 C 194.195312 63.996094 195.425781 64.410156 196.671875 64.320312 C 198.207031 64.429688 199.679688 63.695312 200.511719 62.398438 L 200.609375 62.398438 L 200.609375 64 L 203.488281 64 L 203.488281 56.304688 C 203.488281 52.800781 200.832031 50.769531 197.425781 50.769531 Z M 196.976562 61.679688 C 196 61.679688 194.640625 61.183594 194.640625 59.984375 C 194.640625 58.382812 196.335938 57.855469 197.839844 57.855469 C 198.789062 57.832031 199.730469 58.066406 200.558594 58.527344 C 200.351562 60.320312 198.859375 61.683594 197.054688 61.726562 Z M 213.984375 51.199219 L 210.558594 59.871094 L 210.464844 59.871094 L 206.910156 51.199219 L 203.710938 51.199219 L 209.039062 63.328125 L 206 70.0625 L 209.121094 70.0625 L 217.3125 51.199219 Z M 187.089844 64 L 190.078125 64 L 190.078125 44 L 187.089844 44 Z M 187.089844 64 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:url(#linear0);" d="M 32.703125 28.0625 C 32.183594 28.691406 31.917969 29.492188 31.96875 30.304688 L 31.96875 65.695312 C 31.917969 66.507812 32.183594 67.308594 32.703125 67.9375 L 32.816406 68.046875 L 52.640625 48.238281 L 52.640625 47.777344 L 32.816406 27.953125 Z M 32.703125 28.0625 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:url(#linear1);" d="M 59.199219 54.847656 L 52.640625 48.238281 L 52.640625 47.777344 L 59.199219 41.152344 L 59.34375 41.230469 L 67.199219 45.695312 C 69.441406 46.960938 69.441406 49.039062 67.199219 50.320312 L 59.375 54.769531 Z M 59.199219 54.847656 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:url(#linear2);" d="M 59.390625 54.753906 L 52.640625 48 L 32.703125 67.9375 C 33.644531 68.765625 35.042969 68.804688 36.03125 68.03125 L 59.40625 54.753906 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:url(#linear3);" d="M 59.390625 41.246094 L 36.015625 27.96875 C 35.027344 27.195312 33.628906 27.234375 32.6875 28.0625 L 52.640625 48 Z M 59.390625 41.246094 "/>
<use xlink:href="#surface5" mask="url(#mask0)"/>
<use xlink:href="#surface8" mask="url(#mask1)"/>
<use xlink:href="#surface11" mask="url(#mask2)"/>
<path style="fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(100%,100%,100%);stroke-opacity:1;stroke-miterlimit:10;" d="M 52.109375 24.27002 L 51.369629 24.27002 L 51.369629 22.270508 L 51.999512 22.270508 C 52.580566 21.652832 52.858887 20.810547 52.758789 19.970703 L 52.758789 16.999512 L 56.760254 16.999512 L 56.760254 22.260742 L 57.429199 22.260742 L 57.429199 24.260254 L 56.689453 24.260254 L 56.689453 23.000488 L 52.109375 23.000488 Z M 53.500977 20 C 53.547363 20.805664 53.347168 21.608887 52.929688 22.299805 L 55.930176 22.299805 L 55.930176 17.739258 L 53.500977 17.739258 Z M 63.410645 22.219238 C 62.192383 23.430176 60.227051 23.430176 59.008789 22.219238 C 57.82959 20.97168 57.82959 19.018555 59.008789 17.770996 C 59.592285 17.182617 60.383301 16.853027 61.210938 16.853027 C 62.036133 16.853027 62.827148 17.182617 63.410645 17.770996 C 64.594727 19.016113 64.594727 20.974121 63.410645 22.219238 Z M 59.580078 21.721191 C 60.480957 22.617188 61.938477 22.617188 62.839355 21.721191 C 63.725586 20.744629 63.725586 19.255371 62.839355 18.278809 C 61.938477 17.382812 60.480957 17.382812 59.580078 18.278809 C 58.693848 19.255371 58.693848 20.744629 59.580078 21.721191 Z M 68.181152 23.129883 C 67.346191 23.146973 66.540527 22.822266 65.952148 22.231445 C 65.36377 21.640625 65.041504 20.834961 65.061035 20 C 65.041504 19.165039 65.36377 18.359375 65.952148 17.768555 C 66.540527 17.177734 67.346191 16.853027 68.181152 16.870117 C 69.02832 16.848145 69.838867 17.216797 70.380859 17.871094 L 69.838867 18.391113 C 69.438477 17.880859 68.815918 17.597656 68.168945 17.629395 C 67.548828 17.614746 66.950684 17.851562 66.508789 18.291016 C 65.610352 19.272461 65.610352 20.778809 66.508789 21.760254 C 66.950684 22.197266 67.548828 22.436523 68.168945 22.419434 C 68.881836 22.414551 69.555664 22.087402 70 21.530762 L 70.539551 22.070312 C 70.268555 22.399902 69.926758 22.666016 69.541016 22.849121 C 69.11377 23.044434 68.647461 23.139648 68.181152 23.129883 Z M 73.679199 23.000488 L 72.910156 23.000488 L 72.910156 17.739258 L 71.230469 17.739258 L 71.230469 16.999512 L 75.349121 16.999512 L 75.349121 17.739258 L 73.679199 17.739258 Z M 80.649414 16.999512 L 78.378906 22.060547 C 78.193359 22.67334 77.641602 23.103027 76.999512 23.129883 C 76.794434 23.127441 76.589355 23.083496 76.398926 23.000488 L 76.599121 22.290039 C 76.721191 22.36084 76.860352 22.397461 76.999512 22.399902 C 77.145996 22.412109 77.294922 22.375488 77.419434 22.299805 C 77.541504 22.197266 77.634277 22.067871 77.69043 21.918945 L 77.910156 21.44043 L 75.910645 17.009277 L 76.818848 17.009277 L 78.300781 20.449219 L 79.741211 16.999512 Z M 81.520996 23.000488 L 81.520996 16.999512 L 85.859375 16.999512 L 85.859375 23.000488 L 85.090332 23.000488 L 85.090332 17.739258 L 82.290039 17.739258 L 82.290039 23.000488 Z M 87.229004 23.000488 L 87.229004 16.999512 L 88.000488 16.999512 L 88.000488 19.570312 L 91.000977 19.570312 L 91.000977 16.999512 L 91.77002 16.999512 L 91.77002 23.000488 L 91.000977 23.000488 L 91.000977 20.290527 L 88.000488 20.290527 L 88.000488 23.000488 Z M 98.059082 22.219238 C 96.843262 23.430176 94.87793 23.430176 93.659668 22.219238 C 92.480469 20.97168 92.480469 19.018555 93.659668 17.770996 C 94.243164 17.182617 95.03418 16.853027 95.859375 16.853027 C 96.687012 16.853027 97.478027 17.182617 98.059082 17.770996 C 99.245605 19.016113 99.245605 20.974121 98.059082 22.219238 Z M 94.230957 21.721191 C 95.131836 22.617188 96.589355 22.617188 97.490234 21.721191 C 98.374023 20.744629 98.374023 19.255371 97.490234 18.278809 C 96.589355 17.382812 95.131836 17.382812 94.230957 18.278809 C 93.344727 19.255371 93.344727 20.744629 94.230957 21.721191 Z M 102.089844 23.000488 L 102.089844 16.999512 L 104.260254 16.999512 C 104.709473 16.992188 105.146484 17.155762 105.480957 17.460938 C 105.817871 17.753906 106.008301 18.181152 106.000977 18.630371 C 106.005859 18.896484 105.927734 19.157715 105.778809 19.379883 C 105.632324 19.594727 105.429688 19.765625 105.19043 19.870605 C 105.480957 19.96582 105.734863 20.146484 105.92041 20.390625 C 106.113281 20.634766 106.21582 20.9375 106.210938 21.25 C 106.220703 21.716309 106.022949 22.163086 105.668945 22.470703 C 105.322266 22.790527 104.863281 22.966309 104.389648 22.958984 Z M 102.858887 19.570312 L 104.260254 19.570312 C 104.523926 19.580078 104.780273 19.475098 104.960938 19.279785 C 105.13916 19.118652 105.244141 18.88916 105.251465 18.647461 C 105.258789 18.408203 105.168457 18.173828 105 18.000488 C 104.831543 17.807617 104.584961 17.702637 104.331055 17.709961 L 102.900391 17.709961 Z M 102.858887 22.260742 L 104.40918 22.260742 C 104.685059 22.268066 104.94873 22.155762 105.129395 21.950684 C 105.305176 21.767578 105.405273 21.523438 105.410156 21.269531 C 105.410156 20.717773 104.963379 20.270996 104.40918 20.270996 L 102.890625 20.270996 Z M 102.858887 22.260742 " transform="matrix(1.6,0,0,1.6,0,0)"/>
</g>
</svg>
...@@ -226,8 +226,8 @@ ...@@ -226,8 +226,8 @@
компьютеры, роутеры и многие другие девайсы. компьютеры, роутеры и многие другие девайсы.
</article> </article>
<div class="gp-wrapper"> <div class="gp-wrapper" onclick="do_download()">
<img src="./assets/google_play.svg" alt="google play"> <img data-gp="ggl" src="./assets/google_play_ru.svg" alt="google play">
</div> </div>
<div class="gp-code-wrapper"> <div class="gp-code-wrapper">
......
...@@ -13,16 +13,45 @@ const langArr = [ ...@@ -13,16 +13,45 @@ const langArr = [
}, },
]; ];
window.onload = function() { const key = "KRYSTALVPN";
window.onload = function () {
let position = null;
try {
position = JSON.parse(localStorage.getItem(key));
} catch (error) {
console.log("localStorage is not supported");
}
if (position != null) {
setOriented(position);
}
set_current_year(); set_current_year();
}; };
window.addEventListener("resize", () => {
let position = null;
try {
position = JSON.parse(localStorage.getItem(key));
} catch (error) {
console.log("localStorage is not supported");
}
setOriented(position);
});
function do_download() { function do_download() {
window.open("https://play.google.com/store/apps/details?id=com.krystal.vpn"); window.open("https://play.google.com/store/apps/details?id=com.krystal.vpn");
} }
function openLang(platform) { function openLang(platform) {
const dropdownMenu = platform === "desktop" ? document.querySelector(".dropdown-menu") : document.querySelector(".dropdown-menu.mobile"); const dropdownMenu =
platform === "desktop"
? document.querySelector(".dropdown-menu")
: document.querySelector(".dropdown-menu.mobile");
if (platform === "mobile") { if (platform === "mobile") {
const mobArrow = document.querySelector(".chevron.mobile"); const mobArrow = document.querySelector(".chevron.mobile");
...@@ -42,25 +71,40 @@ function switchLang(lang, platform) { ...@@ -42,25 +71,40 @@ function switchLang(lang, platform) {
const ddMobile = document.querySelector("#langSwitcherMobile"); const ddMobile = document.querySelector("#langSwitcherMobile");
if (dd != null) { if (dd != null) {
const title = langArr.filter(elem => elem.lang === lang)[0].title; const title = langArr.filter((elem) => elem.lang === lang)[0].title;
dd.innerHTML = title; dd.innerHTML = title;
const activeLang = langArr.filter(elem => elem.lang !== lang)[0].lang; const activeLang = langArr.filter((elem) => elem.lang !== lang)[0].lang;
const activeLangNode = document.querySelector(`[data-lang=${CSS.escape(activeLang)}]`); const activeLangNode = document.querySelector(
`[data-lang=${CSS.escape(activeLang)}]`
);
if (activeLangNode != null) { if (activeLangNode != null) {
activeLangNode.classList.remove("active"); activeLangNode.classList.remove("active");
} }
const langNode = document.querySelector(`[data-lang=${CSS.escape(lang)}]`); const langNode = document.querySelector(`[data-lang=${CSS.escape(lang)}]`);
const googlePlayImg = document.querySelector("[data-gp=ggl]");
if (langNode != null) { if (langNode != null) {
langNode.classList.add("active"); langNode.classList.add("active");
} }
if (googlePlayImg != null) {
if (activeLang === "en") {
googlePlayImg.src = "assets/google_play_ru.svg";
}
if (activeLang === "ru") {
googlePlayImg.src = "assets/google_play.svg";
}
}
for (const key in langDict) { for (const key in langDict) {
const langNode = document.querySelector(`[data-lang=${CSS.escape(key)}]`); const langNode = document.querySelector(`[data-lang=${CSS.escape(key)}]`);
const langNodeMobile = document.querySelector(`[data-lang-mobile=${CSS.escape(key)}]`); const langNodeMobile = document.querySelector(
`[data-lang-mobile=${CSS.escape(key)}]`
);
if (langNode != null) { if (langNode != null) {
const translate = langDict[key][lang]; const translate = langDict[key][lang];
...@@ -77,28 +121,55 @@ function switchLang(lang, platform) { ...@@ -77,28 +121,55 @@ function switchLang(lang, platform) {
langNodeMobile.innerHTML = translate; langNodeMobile.innerHTML = translate;
} }
} }
if (googlePlayImg != null) {
if (activeLang === "en") {
googlePlayImg.src = "assets/google_play_ru.svg";
}
if (activeLang === "ru") {
googlePlayImg.src = "assets/google_play.svg";
}
}
} }
} }
if (ddMobile != null) { if (ddMobile != null) {
const title = langArr.filter(elem => elem.lang === lang)[0].titleMobile; const title = langArr.filter((elem) => elem.lang === lang)[0].titleMobile;
ddMobile.innerHTML = title; ddMobile.innerHTML = title;
const activeLang = langArr.filter(elem => elem.lang !== lang)[0].lang; const activeLang = langArr.filter((elem) => elem.lang !== lang)[0].lang;
const activeLangNodeMobile = document.querySelector(`[data-lang-mobile=${CSS.escape(activeLang)}]`); const activeLangNodeMobile = document.querySelector(
`[data-lang-mobile=${CSS.escape(activeLang)}]`
);
if (activeLangNodeMobile != null) { if (activeLangNodeMobile != null) {
activeLangNodeMobile.classList.remove("active"); activeLangNodeMobile.classList.remove("active");
} }
const langNodeMobile = document.querySelector(`[data-lang-mobile=${CSS.escape(lang)}]`); const langNodeMobile = document.querySelector(
`[data-lang-mobile=${CSS.escape(lang)}]`
);
const googlePlayImg = document.querySelector("[data-gp=ggl]");
if (langNodeMobile != null) { if (langNodeMobile != null) {
langNodeMobile.classList.add("active"); langNodeMobile.classList.add("active");
} }
if (googlePlayImg != null) {
if (activeLang === "en") {
googlePlayImg.src = "assets/google_play_ru.svg";
}
if (activeLang === "ru") {
googlePlayImg.src = "assets/google_play.svg";
}
}
for (const key in langDict) { for (const key in langDict) {
const langNodeMobile = document.querySelector(`[data-lang-mobile=${CSS.escape(key)}]`); const langNodeMobile = document.querySelector(
`[data-lang-mobile=${CSS.escape(key)}]`
);
if (langNodeMobile != null) { if (langNodeMobile != null) {
const translate = langDict[key][lang]; const translate = langDict[key][lang];
...@@ -123,6 +194,8 @@ function switchLang(lang, platform) { ...@@ -123,6 +194,8 @@ function switchLang(lang, platform) {
if (dropdownMenuMobile.classList.contains("show")) { if (dropdownMenuMobile.classList.contains("show")) {
dropdownMenuMobile.classList.remove("show"); dropdownMenuMobile.classList.remove("show");
} }
switchMobileMenu();
} }
if (platform === "mobile") { if (platform === "mobile") {
...@@ -157,32 +230,77 @@ function switchMobileMenu() { ...@@ -157,32 +230,77 @@ function switchMobileMenu() {
let portrait = window.matchMedia("(orientation: portrait)"); let portrait = window.matchMedia("(orientation: portrait)");
portrait.addEventListener("change", function(e) { portrait.addEventListener("change", function (e) {
if(e.matches) { if (e.matches) {
// Portrait mode // Portrait mode
console.log("Portrait mode"); console.log("Portrait mode");
try {
localStorage.setItem(key, JSON.stringify("Portrait"));
} catch (error) {
console.log("localStorage is not supported");
}
setOriented("Portrait");
} else {
// Landscape
console.log("Landscape");
try {
localStorage.setItem(key, JSON.stringify("Landscape"));
} catch (error) {
console.log("localStorage is not supported");
}
setOriented("Landscape");
}
});
function setOriented(position) {
if (position === "Landscape" && mobileCheck()) {
const main = document.querySelector(".main"); const main = document.querySelector(".main");
const header = document.querySelector("header"); const header = document.querySelector("header");
const mobileСrossWrapper = document.querySelector(".mobile-cross-wrapper");
if (main != null) { if (main != null) {
main.classList.remove("oriented") main.classList.add("oriented");
} }
if (header != null) { if (header != null) {
header.classList.remove("oriented") header.classList.add("oriented");
} }
} else {
// Landscape if (mobileСrossWrapper != null) {
console.log("Landscape"); mobileСrossWrapper.classList.add("oriented");
}
}
else {
const main = document.querySelector(".main"); const main = document.querySelector(".main");
const header = document.querySelector("header"); const header = document.querySelector("header");
const mobileСrossWrapper = document.querySelector(".mobile-cross-wrapper");
if (main != null) { if (main != null) {
main.classList.add("oriented") main.classList.remove("oriented");
} }
if (header != null) { if (header != null) {
header.classList.add("oriented") header.classList.remove("oriented");
} }
if (mobileСrossWrapper != null) {
mobileСrossWrapper.classList.remove("oriented");
} }
}); }
}
function mobileCheck() {
let check = false;
(function(a){
if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|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|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))
check = true;
})(navigator.userAgent||navigator.vendor||window.opera);
var sizeCheck = ( window.innerWidth <= 800 ) && ( window.innerHeight <= 600 ) ;
return check || sizeCheck;
}
\ No newline at end of file \ No newline at end of file
...@@ -404,6 +404,24 @@ header > .nav.nav-pills > .nav-item.detailed > .dropdown > .btn.lng-switcher { ...@@ -404,6 +404,24 @@ header > .nav.nav-pills > .nav-item.detailed > .dropdown > .btn.lng-switcher {
.opened-mob-menu.show .opened-mob-menu.show
> .mobile-menu-container > .mobile-menu-container
> .top-mobile-section > .top-mobile-section
> .mobile-cross-wrapper.oriented {
display: block;
padding: 20px 0 0 0;
cursor: pointer;
}
.opened-mob-menu.show
> .mobile-menu-container
> .top-mobile-section
> .mobile-cross-wrapper.oriented > img {
width: 34px;
}
.opened-mob-menu.show
> .mobile-menu-container
> .top-mobile-section
> .menu > .menu
> span > span
> a { > a {
...@@ -951,6 +969,8 @@ article.notation-one { ...@@ -951,6 +969,8 @@ article.notation-one {
.main > .main-second > .card.descr > .gp-wrapper { .main > .main-second > .card.descr > .gp-wrapper {
margin-bottom: 24px; margin-bottom: 24px;
cursor: pointer;
} }
.main > .main-second > .card.descr > .gp-code-wrapper { .main > .main-second > .card.descr > .gp-code-wrapper {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!