DmitrMakeev
commited on
Update js/externalFile.js
Browse files- js/externalFile.js +16 -2
js/externalFile.js
CHANGED
@@ -1,7 +1,21 @@
|
|
1 |
export function loadVKBridge() {
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
}
|
4 |
|
5 |
export function loadOpenAPI() {
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
}
|
|
|
1 |
export function loadVKBridge() {
|
2 |
+
console.log('Загрузка VK Bridge...');
|
3 |
+
return import('https://unpkg.com/@vkontakte/vk-bridge/dist/browser.min.js')
|
4 |
+
.then(() => {
|
5 |
+
console.log('VK Bridge загружен');
|
6 |
+
})
|
7 |
+
.catch(error => {
|
8 |
+
console.error('Ошибка при загрузке VK Bridge:', error);
|
9 |
+
});
|
10 |
}
|
11 |
|
12 |
export function loadOpenAPI() {
|
13 |
+
console.log('Загрузка OpenAPI...');
|
14 |
+
return import('https://vk.com/js/api/openapi.js?169')
|
15 |
+
.then(() => {
|
16 |
+
console.log('OpenAPI загружен');
|
17 |
+
})
|
18 |
+
.catch(error => {
|
19 |
+
console.error('Ошибка при загрузке OpenAPI:', error);
|
20 |
+
});
|
21 |
}
|