ギコナビ
Revision | d970b3d0b0bf549b213837b5c85cbb79c2a9ae45 (tree) |
---|---|
Zeit | 2008-09-21 12:06:45 |
Autor | h677 <h677> |
Commiter | h677 |
レスアンカー(>)でポップアップしなくなったので修正
@@ -1904,8 +1904,23 @@ var | ||
1904 | 1904 | i, j, idx : Integer; |
1905 | 1905 | begin |
1906 | 1906 | URL := Trim(LowerCase(URL)); |
1907 | - idx := AnsiPos('?', URL); | |
1907 | + for i := 0 to Length(START_NAME) -1 do begin | |
1908 | + idx := AnsiPos(START_NAME[i], URL); | |
1909 | + if (idx <> 0) then begin | |
1910 | + break; | |
1911 | + end; | |
1912 | + idx := AnsiPos(END_NAME[i], URL); | |
1913 | + if (idx <> 0) then begin | |
1914 | + break; | |
1915 | + end; | |
1916 | + | |
1917 | + end; | |
1918 | + | |
1908 | 1919 | if (idx <> 0) then begin |
1920 | + idx := AnsiPos('?', URL); | |
1921 | + if (idx = 0) then begin | |
1922 | + idx := LastDelimiter('/', URL); | |
1923 | + end; | |
1909 | 1924 | stRes := 0; |
1910 | 1925 | endRes := 0; |
1911 | 1926 | bufList := TStringList.Create(); |
@@ -1915,19 +1930,21 @@ begin | ||
1915 | 1930 | for i := 0 to bufList.Count - 1 do begin |
1916 | 1931 | convBuf := ''; |
1917 | 1932 | // JnXÔÌõ |
1918 | - for j := 0 to Length(START_NAME) - 1 do begin | |
1919 | - idx := AnsiPos(START_NAME[j], bufList[i]); | |
1920 | - if (idx <> 0) then begin | |
1921 | - convBuf := Copy(bufList[i], idx + Length(START_NAME[j]), Length(bufList[i])); | |
1922 | - stRes := StrToInt64Def( convBuf, 0 ); | |
1923 | - break; | |
1933 | + if (stRes = 0) then begin | |
1934 | + for j := 0 to Length(START_NAME) - 1 do begin | |
1935 | + idx := AnsiPos(START_NAME[j], bufList[i]); | |
1936 | + if (idx = 1) then begin | |
1937 | + convBuf := Copy(bufList[i], idx + Length(START_NAME[j]), Length(bufList[i])); | |
1938 | + stRes := StrToInt64Def( convBuf, 0 ); | |
1939 | + break; | |
1940 | + end; | |
1924 | 1941 | end; |
1925 | 1942 | end; |
1926 | 1943 | // I¹XÔÌõ |
1927 | - if (convBuf = '') then begin | |
1944 | + if (convBuf = '') and (endRes = 0) then begin | |
1928 | 1945 | for j := 0 to Length(END_NAME) - 1 do begin |
1929 | 1946 | idx := AnsiPos(END_NAME[j], bufList[i]); |
1930 | - if (idx <> 0) then begin | |
1947 | + if (idx = 1) then begin | |
1931 | 1948 | convBuf := Copy(bufList[i], idx + Length(END_NAME[j]), Length(bufList[i])); |
1932 | 1949 | endRes := StrToInt64Def( convBuf, 0 ); |
1933 | 1950 | break; |
@@ -1938,7 +1955,7 @@ begin | ||
1938 | 1955 | if ((stRes = 0) and (endRes = 0) and (convBuf = '')) then begin |
1939 | 1956 | for j := 0 to Length(RES_NAME) - 1 do begin |
1940 | 1957 | idx := AnsiPos(RES_NAME[j], bufList[i]); |
1941 | - if (idx <> 0) then begin | |
1958 | + if (idx = 1) then begin | |
1942 | 1959 | convBuf := Copy(bufList[i], idx + Length(RES_NAME[j]), Length(bufList[i])); |
1943 | 1960 | stRes := StrToInt64Def( convBuf, 0 ); |
1944 | 1961 | endRes := stRes; |