@exezt-/webamp 1.5.0-0x2 → 1.5.0-0x4
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.
|
@@ -10084,16 +10084,6 @@ function selectAll() {
|
|
|
10084
10084
|
|
|
10085
10085
|
class webamp_telegram_WinampTelegramCustomHandler {
|
|
10086
10086
|
constructor() {
|
|
10087
|
-
defineProperty_default()(this, "window_handlers", ['unload', 'beforeunload', 'pagehide']);
|
|
10088
|
-
|
|
10089
|
-
defineProperty_default()(this, "registerDOMListeners", () => {
|
|
10090
|
-
this.window_handlers.forEach(handler => {
|
|
10091
|
-
window.addEventListener(handler, () => {
|
|
10092
|
-
this.updateAppState();
|
|
10093
|
-
});
|
|
10094
|
-
});
|
|
10095
|
-
});
|
|
10096
|
-
|
|
10097
10087
|
defineProperty_default()(this, "updateAppState", () => {
|
|
10098
10088
|
localStorage.setItem('app-state', JSON.stringify(window.__webamp.store.getState()));
|
|
10099
10089
|
});
|
|
@@ -10104,6 +10094,7 @@ class webamp_telegram_WinampTelegramCustomHandler {
|
|
|
10104
10094
|
x.open('get', `https://cloud-api.yandex.net/v1/disk/public/resources?public_key=${link}`, true);
|
|
10105
10095
|
x.setRequestHeader('Accept', 'application/json');
|
|
10106
10096
|
x.setRequestHeader('Content-Type', 'application/json');
|
|
10097
|
+
x.setRequestHeader('Access-Control-Allow-Origin', 'no-cors');
|
|
10107
10098
|
x.send();
|
|
10108
10099
|
|
|
10109
10100
|
x.onload = async () => {
|
|
@@ -10236,7 +10227,6 @@ class webamp_telegram_WinampTelegramCustomHandler {
|
|
|
10236
10227
|
|
|
10237
10228
|
setTimeout(() => {
|
|
10238
10229
|
if (typeof localStorage.getItem('app-state') !== "undefined") this.loadOptions(JSON.parse(localStorage.getItem('app-state')));
|
|
10239
|
-
this.registerDOMListeners();
|
|
10240
10230
|
|
|
10241
10231
|
window.__webamp.onTrackDidChange(() => {
|
|
10242
10232
|
this.updateAppState();
|