Skip to content

Commit

Permalink
open .url files
Browse files Browse the repository at this point in the history
  • Loading branch information
katahiromz committed Apr 25, 2019
1 parent 0d061e1 commit b12882a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ License: MIT
- 2019.04.25 ver.0.9.3
- Improved security.
- Displays the encryption status as the color of the combo box.
- Able to open *.url files.
1 change: 1 addition & 0 deletions ReadMe.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ License: MIT
- 2019.04.25 ver.0.9.3
- Improved security.
- Displays the encryption status as the color of the combo box.
- Able to open *.url files.
1 change: 1 addition & 0 deletions ReadMeJP.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ SimpleBrowserは、Windows用の超速いウェブブラウザです。
- 2019.04.25 ver.0.9.3
- セキュリティの向上。
- コンボボックスの色で暗号化状態を表示。
- *.urlファイルを開けるように。
16 changes: 16 additions & 0 deletions SimpleBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2924,6 +2924,22 @@ void OnParseCmdLine(HWND hwnd)
LocalFree(wargv);
}

LPCWSTR pchDotExt = PathFindExtension(url.c_str());
if (lstrcmpiW(pchDotExt, L".url") == 0)
{
WCHAR szURL[512];
GetPrivateProfileStringW(L"InternetShortcut",
L"URL",
L" ",
szURL,
ARRAYSIZE(szURL),
url.c_str());
if (PathIsURL(szURL))
{
url = szURL;
}
}

if (url.size())
{
DoNavigate(hwnd, url.c_str());
Expand Down

0 comments on commit b12882a

Please sign in to comment.