mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-28 06:52:35 +01:00
Use https for all Google url
This commit is contained in:
parent
32528381db
commit
07770ef8da
@ -399,7 +399,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string url = String.Format("http://translate.google.com/?hl=en&eotf=1&sl={0}&tl={1}&q={2}", languagePair.Substring(0, 2), languagePair.Substring(3), "123 456");
|
string url = String.Format("https://translate.google.com/?hl=en&eotf=1&sl={0}&tl={1}&q={2}", languagePair.Substring(0, 2), languagePair.Substring(3), "123 456");
|
||||||
var result = Utilities.DownloadString(url).ToLower();
|
var result = Utilities.DownloadString(url).ToLower();
|
||||||
int idx = result.IndexOf("charset", StringComparison.Ordinal);
|
int idx = result.IndexOf("charset", StringComparison.Ordinal);
|
||||||
int end = result.IndexOf('"', idx + 8);
|
int end = result.IndexOf('"', idx + 8);
|
||||||
|
@ -13708,13 +13708,13 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
|
|
||||||
private void buttonGoogleIt_Click(object sender, EventArgs e)
|
private void buttonGoogleIt_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
System.Diagnostics.Process.Start("http://www.google.com/search?q=" + Utilities.UrlEncode(textBoxSearchWord.Text));
|
System.Diagnostics.Process.Start("https://www.google.com/search?q=" + Utilities.UrlEncode(textBoxSearchWord.Text));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonGoogleTranslateIt_Click(object sender, EventArgs e)
|
private void buttonGoogleTranslateIt_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string languageId = Utilities.AutoDetectGoogleLanguage(_subtitle);
|
string languageId = Utilities.AutoDetectGoogleLanguage(_subtitle);
|
||||||
System.Diagnostics.Process.Start("http://translate.google.com/#auto|" + languageId + "|" + Utilities.UrlEncode(textBoxSearchWord.Text));
|
System.Diagnostics.Process.Start("https://translate.google.com/#auto|" + languageId + "|" + Utilities.UrlEncode(textBoxSearchWord.Text));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonPlayCurrentClick(object sender, EventArgs e)
|
private void ButtonPlayCurrentClick(object sender, EventArgs e)
|
||||||
|
@ -268,7 +268,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
string text = textBoxWord.Text;
|
string text = textBoxWord.Text;
|
||||||
if (!string.IsNullOrWhiteSpace(text))
|
if (!string.IsNullOrWhiteSpace(text))
|
||||||
System.Diagnostics.Process.Start("http://www.google.com/search?q=" + Utilities.UrlEncode(text));
|
System.Diagnostics.Process.Start("https://www.google.com/search?q=" + Utilities.UrlEncode(text));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OcrSpellCheck_KeyDown(object sender, KeyEventArgs e)
|
private void OcrSpellCheck_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
@ -218,7 +218,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.G)
|
else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.G)
|
||||||
{
|
{
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
System.Diagnostics.Process.Start("http://www.google.com/search?q=" + Utilities.UrlEncode(textBoxWord.Text));
|
System.Diagnostics.Process.Start("https://www.google.com/search?q=" + Utilities.UrlEncode(textBoxWord.Text));
|
||||||
}
|
}
|
||||||
else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.Z)
|
else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.Z)
|
||||||
{
|
{
|
||||||
|
@ -8083,7 +8083,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
if (text.Contains(':'))
|
if (text.Contains(':'))
|
||||||
{
|
{
|
||||||
text = text.Substring(text.IndexOf(':') + 1).Trim();
|
text = text.Substring(text.IndexOf(':') + 1).Trim();
|
||||||
Process.Start("http://www.google.com/search?q=" + Utilities.UrlEncode(text));
|
Process.Start("https://www.google.com/search?q=" + Utilities.UrlEncode(text));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user