procedure TForm2.EmbeddedWB1BeforeNavigate2(Sender: TObject;
const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
Headers: OleVariant; var Cancel: WordBool);
var p1:String;
begin try
p1:=URL;
StrReplace(p1,'/','\',[rfIgnoreCase, rfReplaceAll]);
StrReplace(p1,'event:','',[rfIgnoreCase, rfReplaceAll]);
p1:=lowercase(p1);
if ExtractFileName(p1)='go_plug_man' then begin
PluginsManager1Click(Sender);
Cancel:=true;
end;
if ExtractFileName(p1)='go_pref' then begin
WikiBrowserOptions1Click(nil);
Cancel:=true;
end;
if ExtractFileName(p1)='go_help' then begin
WikiBrowseHelp1Click(sender);
Cancel:=true;
end;
if ExtractFileName(p1)='go_ie_pref' then begin
Cancel:=true;
WinExec(PChar(trim(form2.compile_path(form2.get_ini_params('system','ie_config')))),SW_SHOW);
end;
if ExtractFileName(p1)='go_wikipedia' then begin
Cancel:=true;
EncyclopediaStartPage1Click(nil);
end;
if ExtractFileName(p1)='go_wikimedia' then begin
Cancel:=true;
MultimediaStartPage1Click(nil);
end;
if ExtractFileName(p1)='go_wikinews' then begin
Cancel:=true;
NewsStartPage1Click(nil);
end;
if ExtractFileName(p1)='go_wikispi' then begin
Cancel:=true;
UncyclopediaIndex1Click(nil);
end;
if ExtractFileName(p1)='go_wikisource' then begin
Cancel:=true;
UncyclopediaStartPage1Click(nil);
end;
if ExtractFileName(p1)='go_wikibooks' then begin
Cancel:=true;
BooksandDocumentsStartPage1Click(nil);
end;
if ExtractFileName(p1)='go_wikiquotes' then begin
Cancel:=true;
QuotesStartPage1Click(nil);
end;
if ExtractFileName(p1)='go_wikidict' then begin
Cancel:=true;
DictionaryStartPage1Click(nil);
end;
if ExtractFileName(p1)='wb_show_qtbar' then begin
Cancel:=true;
WinExec(PChar(compile_path(get_ini_params('system','wikiqlaunch'))),1);
end;
if ExtractFileName(p1)='wb_show_taskbarlnk' then begin
Cancel:=true;
WinExec(PChar(compile_path(get_ini_params('system','wikiqtaskbar'))),1);
end;
if ExtractFileName(p1)='wr_open' then begin
Cancel:=true;
WinExec(PChar(compile_path(get_ini_params('system','wikiresearch'))),1);
end;
if ExtractFileName(p1)='wb_show_search' then begin
Cancel:=true;
WinExec(PChar(compile_path(get_ini_params('system','wikiqsearch'))),1);
end;
if ExtractFileName(p1)='support_1' then begin
Cancel:=true;
WikipediaSupportPages1Click(Sender);
end;
if ExtractFileName(p1)='more___1' then begin
Cancel:=true;
WikiBrowse_CentralClick(Sender);
end;
except end;End; |