Update SpotifyControls.plugin.js

This commit is contained in:
Mirco Wittrien 2021-01-29 07:55:45 +01:00 committed by GitHub
parent 2e3f31a43d
commit ab40853c87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ module.exports = (_ => {
"info": {
"name": "SpotifyControls",
"author": "DevilBro",
"version": "1.0.9",
"version": "1.1.0",
"description": "Add a control panel to discord when listening to spotify"
},
"changeLog": {
@ -196,9 +196,9 @@ module.exports = (_ => {
let url = BDFDB.ObjectUtils.get(playbackState, "item.external_urls.spotify") || BDFDB.ObjectUtils.get(playbackState, "context.external_urls.spotify");
if (url) {
BDFDB.LibraryRequires.electron.clipboard.write({text: url});
BDFDB.NotificationUtils.toast(_this.labels.toast_copyurl_fail, {type: "success"});
BDFDB.NotificationUtils.toast(_this.labels.toast_copyurl_success, {type: "success"});
}
else BDFDB.NotificationUtils.toast(_this.labels.toast_copyurl_success, {type: "danger"});
else BDFDB.NotificationUtils.toast(_this.labels.toast_copyurl_fail, {type: "danger"});
}
}),
BDFDB.ReactUtils.createElement(SpotifyControlsButtonComponent, {
@ -988,4 +988,4 @@ module.exports = (_ => {
}
};
})(window.BDFDB_Global.PluginUtils.buildPlugin(config));
})();
})();