diff --git a/README.md b/README.md index 5a33725..161869d 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/ReadMe.txt b/ReadMe.txt index a78665d..a7def72 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -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. diff --git a/ReadMeJP.txt b/ReadMeJP.txt index 8736dcd..59f5ca8 100644 --- a/ReadMeJP.txt +++ b/ReadMeJP.txt @@ -56,3 +56,4 @@ SimpleBrowserは、Windows用の超速いウェブブラウザです。 - 2019.04.25 ver.0.9.3 - セキュリティの向上。 - コンボボックスの色で暗号化状態を表示。 + - *.urlファイルを開けるように。 diff --git a/SimpleBrowser.cpp b/SimpleBrowser.cpp index 801e30e..7d84540 100644 --- a/SimpleBrowser.cpp +++ b/SimpleBrowser.cpp @@ -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());