@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.
package/built/webamp.bundle.js
CHANGED
|
@@ -14793,16 +14793,6 @@ function selectAll() {
|
|
|
14793
14793
|
|
|
14794
14794
|
class webamp_telegram_WinampTelegramCustomHandler {
|
|
14795
14795
|
constructor() {
|
|
14796
|
-
defineProperty_default()(this, "window_handlers", ['unload', 'beforeunload', 'pagehide']);
|
|
14797
|
-
|
|
14798
|
-
defineProperty_default()(this, "registerDOMListeners", () => {
|
|
14799
|
-
this.window_handlers.forEach(handler => {
|
|
14800
|
-
window.addEventListener(handler, () => {
|
|
14801
|
-
this.updateAppState();
|
|
14802
|
-
});
|
|
14803
|
-
});
|
|
14804
|
-
});
|
|
14805
|
-
|
|
14806
14796
|
defineProperty_default()(this, "updateAppState", () => {
|
|
14807
14797
|
localStorage.setItem('app-state', JSON.stringify(window.__webamp.store.getState()));
|
|
14808
14798
|
});
|
|
@@ -14813,6 +14803,7 @@ class webamp_telegram_WinampTelegramCustomHandler {
|
|
|
14813
14803
|
x.open('get', `https://cloud-api.yandex.net/v1/disk/public/resources?public_key=${link}`, true);
|
|
14814
14804
|
x.setRequestHeader('Accept', 'application/json');
|
|
14815
14805
|
x.setRequestHeader('Content-Type', 'application/json');
|
|
14806
|
+
x.setRequestHeader('Access-Control-Allow-Origin', 'no-cors');
|
|
14816
14807
|
x.send();
|
|
14817
14808
|
|
|
14818
14809
|
x.onload = async () => {
|
|
@@ -14945,7 +14936,6 @@ class webamp_telegram_WinampTelegramCustomHandler {
|
|
|
14945
14936
|
|
|
14946
14937
|
setTimeout(() => {
|
|
14947
14938
|
if (typeof localStorage.getItem('app-state') !== "undefined") this.loadOptions(JSON.parse(localStorage.getItem('app-state')));
|
|
14948
|
-
this.registerDOMListeners();
|
|
14949
14939
|
|
|
14950
14940
|
window.__webamp.onTrackDidChange(() => {
|
|
14951
14941
|
this.updateAppState();
|