Skip to content

Commit

Permalink
+
Browse files Browse the repository at this point in the history
- fix prettier
- fix ads block
- increment version
  • Loading branch information
dedpnd committed May 4, 2021
1 parent 68954c6 commit db38f4e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Notification [dev]
./100x100.jpeg
100x100.jpeg

# Desktop Services Store
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "yaradio-yamusic",
"productName": "YaMusic.app",
"version": "1.0.2",
"version": "1.0.3",
"description": "Yandex Radio and Yandex Music desktop application, two in one :)",
"main": "background.js",
"scripts": {
Expand Down
8 changes: 7 additions & 1 deletion src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,13 @@ app.on("ready", async () => {
await proxy();

session.fromPartition('persist:webviewsession').webRequest.onBeforeRequest({ urls: ['*://*/*'] }, (details: any, callback) => {
if (details.url.includes("awaps.yandex.net") || details.url.includes("vh-bsvideo-converted") || details.url.includes("get-video-an") || details.url.includes("an.yandex.ru")) {
console.log("========================")
console.log(details.url)
if (details.url.includes("awaps.yandex.net") ||
details.url.includes("vh-bsvideo-converted") ||
details.url.includes("get-video-an") ||
details.url.includes("banners.adfox.ru") ||
details.url.includes("an.yandex.ru/vmap/")) {
// Skip advertising
return {
cancel: true
Expand Down
8 changes: 4 additions & 4 deletions src/electron/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface StoreType {
prevTrack: boolean;
mute: boolean;
exit: boolean;
}
};
};
lastApp: string | null;
lastWindowState: Rectangle | null;
Expand Down Expand Up @@ -46,14 +46,14 @@ const store = new Store({
store.set("quit?", false);

// #HotFix 1.0.1
if (!store.get('settings.gs')) {
store.set('settings.gs', {
if (!store.get("settings.gs")) {
store.set("settings.gs", {
play: true,
nextTrack: true,
prevTrack: true,
mute: true,
exit: true
})
});
}

export default store as Store<StoreType>;
4 changes: 2 additions & 2 deletions src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export default new Vuex.Store({
loading: false
},
mutations: {
loadingSetFalse: state => state.loading = false,
loadingSetTrue: state => state.loading = true
loadingSetFalse: state => (state.loading = false),
loadingSetTrue: state => (state.loading = true)
},
actions: {},
modules: {}
Expand Down

0 comments on commit db38f4e

Please sign in to comment.