In debug don't check for extension id

This commit is contained in:
Jaex 2015-08-29 04:24:21 +03:00
parent 82ac01f3fe
commit 4c4df2660c
2 changed files with 9 additions and 3 deletions

View file

@ -48,13 +48,19 @@ public ChromeForm()
private void CreateChromeHostManifest(string filepath)
{
string id = "";
#if !DEBUG
id = "chrome-extension://nlkoigbdolhchiicbonbihbphgamnaoc/";
#endif
var manifest = new
{
name = "com.getsharex.sharex",
description = "ShareX",
path = Program.ChromeHostPath,
type = "stdio",
allowed_origins = new string[] { "chrome-extension://nlkoigbdolhchiicbonbihbphgamnaoc/" }
allowed_origins = new string[] { id }
};
string json = JsonConvert.SerializeObject(manifest, Formatting.Indented);

View file

@ -1291,13 +1291,13 @@ private bool DownloadAndUpload()
if (!string.IsNullOrEmpty(Info.FilePath))
{
Helpers.CreateDirectoryIfNotExist(Info.FilePath);
Info.Status = Resources.UploadTask_DownloadAndUpload_Downloading;
OnStatusChanged();
try
{
Helpers.CreateDirectoryIfNotExist(Info.FilePath);
using (WebClient wc = new WebClient())
{
wc.Proxy = HelpersOptions.CurrentProxy.GetWebProxy();