This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function downloadImage(imageSrc, fileName) { | |
const link = document.createElement('a'); | |
link.href = imageSrc; | |
link.download = fileName || 'download'; | |
document.body.appendChild(link); | |
link.click(); | |
document.body.removeChild(link); | |
} | |
function downloadImages(delay) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fetchStream from 'fetch-readablestream'; | |
const CORS_PROXY = "https://cors-anywhere.herokuapp.com/"; | |
const APP_ID = 9999999; | |
async function fetchFileStream(fileAddress, filename, imgType) { | |
return fetchStream(fileAddress) | |
.then(response => readAllChunks(response.body)) | |
.then(chunks => new File(chunks, filename, {type: imgType})); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect } from 'react'; | |
import connect from '@vkontakte/vk-connect'; | |
import { View, ScreenSpinner } from '@vkontakte/vkui'; | |
import '@vkontakte/vkui/dist/vkui.css'; | |
import Home from './panels/Home'; | |
import Persik from './panels/Persik'; | |
const App = ({ vkConnect }) => { | |
const [activePanel, setActivePanel] = useState('home'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const crypto = require('crypto') //модуль для криптографии Nodejs | |
const { stringify } = require('querystring') //методы для парсинга строки | |
const url = require('url') | |
const URL = | |
'https://example.com/?vk_user_id=494075&vk_app_id=6736218&vk_is_app_user=1&vk_are_notifications_enabled=1&vk_language=ru&vk_access_token_settings=&vk_platform=android&sign=exTIBPYTrAKDTHLLm2AwJkmcVcvFCzQUNyoa6wAjvW6k', | |
CLIENT_SECRET = 'wvl68m4dR1UpLrVRli' | |
const checkVKQueryParamsSign = params => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as VKConnect from '@vkontakte/vkui-connect'; | |
VKConnect.send('VKWebAppInit'); | |
if (VKConnect.supports('VKWebAppCallAPIMethod')) { | |
VKConnect.send('VKWebAppCallAPIMethod'); | |
} else { | |
launchModalDialog('Обновите клиент!'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'core-js/es6/map'; | |
import 'core-js/es6/set'; | |
import connect from '@vkontakte/vkui-connect'; | |
connect.send('VKWebAppInit', {}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'core-js/es6/map'; | |
import 'core-js/es6/set'; | |
import connect from '@vkontakte/vkui-connect'; | |
// Init VK App | |
connect.subscribe((e) => { | |
switch (e.detail.type) { | |
case 'VKWebAppGetUserInfoResult': | |
console.log('User: \n', e.detail.data); | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=no, viewport-fit=cover"> | |
<meta name="theme-color" content="#000000"> | |
<meta content="IE=Edge" http-equiv="X-UA-Compatible"> | |
<title>VK App Demo</title> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function QR8bitByte(e) { | |
this.mode = QRMode.MODE_8BIT_BYTE; | |
this.data = e | |
} | |
function QRCode(e, t) { | |
this.typeNumber = e; | |
this.errorCorrectLevel = t; | |
this.modules = null; | |
this.moduleCount = 0; | |
this.dataCache = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.transition { | |
transition: transform .294s cubic-bezier(.19,1,.22,1); | |
} |
NewerOlder