Rev 2418 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2413 | leency | 1 | struct UrlsHistory { |
2 | byte UrlHistory[6000]; |
||
3 | void AddUrl(); |
||
4 | void GoBack(); |
||
5 | dword CurrentUrl(); |
||
6 | }; |
||
7 | |||
8 | UrlsHistory BrowserHistory; |
||
9 | |||
10 | void UrlsHistory::GoBack() |
||
11 | { |
||
2417 | leency | 12 | j = find_symbol(#UrlHistory, '|') -1; //текущая страница |
13 | if (j<=0) return; |
||
2413 | leency | 14 | UrlHistory[j] = 0x00; |
2417 | leency | 15 | j = find_symbol(#UrlHistory, '|'); //предыдущая страница -> она нам и нужна |
16 | copystr(#UrlHistory + j, #URL); |
||
2416 | leency | 17 | copystr(#URL, #editURL); |
2419 | leency | 18 | if (!strcmp(get_URL_part(5),"http:"))) HttpLoad(); |
2413 | leency | 19 | WB1.ShowPage(#URL); |
20 | } |
||
21 | |||
22 | void UrlsHistory::AddUrl() |
||
23 | { |
||
2418 | leency | 24 | if (strcmp(BrowserHistory.CurrentUrl(), #URL)==0) return; //если новый адресс = текущему |
25 | |||
2413 | leency | 26 | IF (strlen(#UrlHistory)>6000) copystr(#UrlHistory+5000,#UrlHistory); |
27 | copystr("|", #UrlHistory + strlen(#UrlHistory)); |
||
28 | copystr(#URL, #UrlHistory + strlen(#UrlHistory)); |
||
29 | } |
||
30 | |||
31 | dword UrlsHistory::CurrentUrl() |
||
32 | { |
||
33 | EAX=#UrlHistory + find_symbol(#UrlHistory, '|'); |
||
34 | }=0)> |