@exezt-/webamp 1.5.0-0x601 → 1.5.0-0x603
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/built/webamp.bundle.js
CHANGED
|
@@ -14793,6 +14793,8 @@ function selectAll() {
|
|
|
14793
14793
|
|
|
14794
14794
|
class webamp_telegram_handler_WinampTelegramCustomHandler {
|
|
14795
14795
|
constructor() {
|
|
14796
|
+
var _window, _window$Telegram, _window2, _window2$Telegram;
|
|
14797
|
+
|
|
14796
14798
|
defineProperty_default()(this, "webamp", void 0);
|
|
14797
14799
|
|
|
14798
14800
|
defineProperty_default()(this, "telegram", void 0);
|
|
@@ -14954,18 +14956,13 @@ class webamp_telegram_handler_WinampTelegramCustomHandler {
|
|
|
14954
14956
|
}
|
|
14955
14957
|
});
|
|
14956
14958
|
|
|
14957
|
-
const lastList = this.getCookie('lastlist');
|
|
14959
|
+
const lastList = this.getCookie('lastlist'); // @ts-ignore | because no global var telegram avail in project types
|
|
14960
|
+
|
|
14961
|
+
this.telegram = (_window = window) === null || _window === void 0 ? void 0 : (_window$Telegram = _window.Telegram) === null || _window$Telegram === void 0 ? void 0 : _window$Telegram.WebApp;
|
|
14958
14962
|
|
|
14959
14963
|
if (typeof lastList !== "undefined") {
|
|
14960
14964
|
this.getFiles(lastList);
|
|
14961
14965
|
}
|
|
14962
|
-
}
|
|
14963
|
-
|
|
14964
|
-
initialize() {
|
|
14965
|
-
var _window, _window$Telegram, _window2, _window2$Telegram;
|
|
14966
|
-
|
|
14967
|
-
// @ts-ignore | because no global var telegram avail in project types
|
|
14968
|
-
this.telegram = (_window = window) === null || _window === void 0 ? void 0 : (_window$Telegram = _window.Telegram) === null || _window$Telegram === void 0 ? void 0 : _window$Telegram.WebApp;
|
|
14969
14966
|
|
|
14970
14967
|
if (!window.__webamp) {
|
|
14971
14968
|
throw new Error("Webamp __webamp is undefined!!");
|
|
@@ -14976,7 +14973,9 @@ class webamp_telegram_handler_WinampTelegramCustomHandler {
|
|
|
14976
14973
|
console.error("Telegram is undefined!! Skipping Telegram.WebApp event handler...");
|
|
14977
14974
|
}
|
|
14978
14975
|
|
|
14979
|
-
if (typeof localStorage.getItem('app-state') !== "undefined")
|
|
14976
|
+
if (typeof localStorage.getItem('app-state') !== "undefined") {
|
|
14977
|
+
this.loadOptions(JSON.parse(localStorage.getItem('app-state')));
|
|
14978
|
+
}
|
|
14980
14979
|
|
|
14981
14980
|
window.__webamp.onTrackDidChange(() => {
|
|
14982
14981
|
this.updateAppState();
|