-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes in this commit: - Fix muting logic for advertisements - Fix for muting podcasts - Fix for Spotify paths when using Windows Store App version
- Loading branch information
Showing
22 changed files
with
17,338 additions
and
17,322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.27703.2042 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EZBlocker", "EZBlocker\EZBlocker.csproj", "{32C0D43C-E0F1-46D6-8661-EF5BE2566BA8}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Debug|x86 = Debug|x86 | ||
Release|Any CPU = Release|Any CPU | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{32C0D43C-E0F1-46D6-8661-EF5BE2566BA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{32C0D43C-E0F1-46D6-8661-EF5BE2566BA8}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{32C0D43C-E0F1-46D6-8661-EF5BE2566BA8}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{32C0D43C-E0F1-46D6-8661-EF5BE2566BA8}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{32C0D43C-E0F1-46D6-8661-EF5BE2566BA8}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{32C0D43C-E0F1-46D6-8661-EF5BE2566BA8}.Release|x86.ActiveCfg = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {CAB89B60-EA34-488D-8079-171E440096C8} | ||
EndGlobalSection | ||
EndGlobal | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.27703.2042 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EZBlocker", "EZBlocker\EZBlocker.csproj", "{32C0D43C-E0F1-46D6-8661-EF5BE2566BA8}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Debug|x86 = Debug|x86 | ||
Release|Any CPU = Release|Any CPU | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{32C0D43C-E0F1-46D6-8661-EF5BE2566BA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{32C0D43C-E0F1-46D6-8661-EF5BE2566BA8}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{32C0D43C-E0F1-46D6-8661-EF5BE2566BA8}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{32C0D43C-E0F1-46D6-8661-EF5BE2566BA8}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{32C0D43C-E0F1-46D6-8661-EF5BE2566BA8}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{32C0D43C-E0F1-46D6-8661-EF5BE2566BA8}.Release|x86.ActiveCfg = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {CAB89B60-EA34-488D-8079-171E440096C8} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,59 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Globalization; | ||
using System.Net.Http; | ||
using System.Threading.Tasks; | ||
|
||
namespace EZBlocker | ||
{ | ||
class Analytics | ||
{ | ||
private const string url = "https://www.google-analytics.com/collect"; | ||
private const string tid = "UA-42480515-3"; | ||
|
||
private readonly HttpClient client = new HttpClient(); | ||
private readonly string cid; | ||
private readonly string cm; | ||
private readonly string ul; | ||
private readonly string cs; | ||
|
||
public Analytics(string clientId, string version) { | ||
cid = clientId; | ||
cm = version; | ||
ul = CultureInfo.CurrentCulture.Name; | ||
cs = Environment.OSVersion.ToString(); | ||
} | ||
|
||
public static string GenerateCID() | ||
{ | ||
return Guid.NewGuid().ToString(); | ||
} | ||
|
||
public async Task<bool> LogAction(string action) | ||
{ | ||
// https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide | ||
if (!action.StartsWith("/")) | ||
{ | ||
action = "/" + action; | ||
} | ||
var data = new Dictionary<string, string> | ||
{ | ||
{ "v", "1" }, | ||
{ "tid", "UA-42480515-3" }, | ||
{ "t", "pageview" }, | ||
{ "cid", cid }, // client id | ||
{ "cm", cm }, // Campaign medium, EZBlocker version | ||
{ "cn", "EZBlocker Windows" }, // Campaign name | ||
{ "cs", cs}, // Campaign source, OS Version | ||
{ "ul", ul }, // User Language | ||
{ "dh", "ezblocker.ericzhang.me" }, | ||
{ "dp", action }, | ||
}; | ||
|
||
var content = new FormUrlEncodedContent(data); | ||
var resp = await client.PostAsync(url, content); | ||
|
||
return resp.IsSuccessStatusCode; | ||
} | ||
} | ||
} | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Globalization; | ||
using System.Net.Http; | ||
using System.Threading.Tasks; | ||
|
||
namespace EZBlocker | ||
{ | ||
class Analytics | ||
{ | ||
private const string url = "https://www.google-analytics.com/collect"; | ||
private const string tid = "UA-42480515-3"; | ||
|
||
private readonly HttpClient client = new HttpClient(); | ||
private readonly string cid; | ||
private readonly string cm; | ||
private readonly string ul; | ||
private readonly string cs; | ||
|
||
public Analytics(string clientId, string version) { | ||
cid = clientId; | ||
cm = version; | ||
ul = CultureInfo.CurrentCulture.Name; | ||
cs = Environment.OSVersion.ToString(); | ||
} | ||
|
||
public static string GenerateCID() | ||
{ | ||
return Guid.NewGuid().ToString(); | ||
} | ||
|
||
public async Task<bool> LogAction(string action) | ||
{ | ||
// https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide | ||
if (!action.StartsWith("/")) | ||
{ | ||
action = "/" + action; | ||
} | ||
var data = new Dictionary<string, string> | ||
{ | ||
{ "v", "1" }, | ||
{ "tid", "UA-42480515-3" }, | ||
{ "t", "pageview" }, | ||
{ "cid", cid }, // client id | ||
{ "cm", cm }, // Campaign medium, EZBlocker version | ||
{ "cn", "EZBlocker Windows" }, // Campaign name | ||
{ "cs", cs}, // Campaign source, OS Version | ||
{ "ul", ul }, // User Language | ||
{ "dh", "ezblocker.ericzhang.me" }, | ||
{ "dp", action }, | ||
}; | ||
|
||
var content = new FormUrlEncodedContent(data); | ||
var resp = await client.PostAsync(url, content); | ||
|
||
return resp.IsSuccessStatusCode; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,49 @@ | ||
<?xml version="1.0"?> | ||
<configuration> | ||
<configSections> | ||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | ||
<section name="EZBlocker.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> | ||
</sectionGroup> | ||
</configSections> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | ||
</startup> | ||
<userSettings> | ||
<EZBlocker.Properties.Settings> | ||
<setting name="CID" serializeAs="String"> | ||
<value /> | ||
</setting> | ||
<setting name="UpdateSettings" serializeAs="String"> | ||
<value>True</value> | ||
</setting> | ||
<setting name="UserEducated" serializeAs="String"> | ||
<value>False</value> | ||
</setting> | ||
<setting name="StartSpotify" serializeAs="String"> | ||
<value>True</value> | ||
</setting> | ||
<setting name="LastPatched" serializeAs="String"> | ||
<value /> | ||
</setting> | ||
</EZBlocker.Properties.Settings> | ||
</userSettings> | ||
<appSettings> | ||
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" /> | ||
<add key="ClientSettingsProvider.ServiceUri" value="" /> | ||
</appSettings> | ||
<system.web> | ||
<membership defaultProvider="ClientAuthenticationMembershipProvider"> | ||
<providers> | ||
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" /> | ||
</providers> | ||
</membership> | ||
<roleManager defaultProvider="ClientRoleProvider" enabled="true"> | ||
<providers> | ||
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" /> | ||
</providers> | ||
</roleManager> | ||
</system.web> | ||
<?xml version="1.0"?> | ||
<configuration> | ||
<configSections> | ||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | ||
<section name="EZBlocker.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> | ||
</sectionGroup> | ||
</configSections> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | ||
</startup> | ||
<userSettings> | ||
<EZBlocker.Properties.Settings> | ||
<setting name="CID" serializeAs="String"> | ||
<value /> | ||
</setting> | ||
<setting name="UpdateSettings" serializeAs="String"> | ||
<value>True</value> | ||
</setting> | ||
<setting name="UserEducated" serializeAs="String"> | ||
<value>False</value> | ||
</setting> | ||
<setting name="StartSpotify" serializeAs="String"> | ||
<value>True</value> | ||
</setting> | ||
<setting name="LastPatched" serializeAs="String"> | ||
<value /> | ||
</setting> | ||
<setting name="SpotifyPath" serializeAs="String"> | ||
<value /> | ||
</setting> | ||
</EZBlocker.Properties.Settings> | ||
</userSettings> | ||
<appSettings> | ||
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" /> | ||
<add key="ClientSettingsProvider.ServiceUri" value="" /> | ||
</appSettings> | ||
<system.web> | ||
<membership defaultProvider="ClientAuthenticationMembershipProvider"> | ||
<providers> | ||
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" /> | ||
</providers> | ||
</membership> | ||
<roleManager defaultProvider="ClientRoleProvider" enabled="true"> | ||
<providers> | ||
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" /> | ||
</providers> | ||
</roleManager> | ||
</system.web> | ||
</configuration> |
Oops, something went wrong.