N49: TMenuItem;
N51: TMenuItem;
N52: TMenuItem;
- N53: TMenuItem;
SearchBoardName: TMenuItem;
TreeSelectLogDeleteSeparator: TMenuItem;
TreeSelectSearchBoardName: TAction;
N64: TMenuItem;
dummy1: TMenuItem;
TreeSelectLogDeletePopupMenu: TMenuItem;
- N65: TMenuItem;
+ N65: TMenuItem;
BBSSelectPopupMenu: TPopupMenu;
PlugInMenu: TMenuItem;
TmpToolBar: TToolBar;
FavoriteTreeViewCollapseAction: TAction;
RightTabCloseAction: TAction;
LeftTabCloseAction: TAction;
+ N70: TMenuItem;
+ SameIDResAnchorAction: TAction;
+ ID1: TMenuItem;
+ IndividualAbon1Action: TAction;
+ IndividualAbon0Action: TAction;
+ AntiIndividualAbonAction: TAction;
+ AntiIndividualAbonDlgAction: TAction;
+ IndividualAbonID1Action: TAction;
+ ID2: TMenuItem;
+ N53: TMenuItem;
+ ID3: TMenuItem;
+ IndividualAbonID0Action: TAction;
+ N71: TMenuItem;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure CabinetPanelHide(Sender: TObject);
procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure StatusBarResize(Sender: TObject);
- procedure IndividualAbon1Click(Sender: TObject);
- procedure IndividualAbon2Click(Sender: TObject);
- procedure N42Click(Sender: TObject);
procedure SelectComboBoxEnter(Sender: TObject);
- procedure AntiIndividualAbonClick(Sender: TObject);
- procedure N51Click(Sender: TObject);
procedure TreeSelectSearchBoardNameExecute(Sender: TObject);
procedure CabinetFavoriteActionExecute(Sender: TObject);
procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
Selected: Boolean);
procedure SelectTimerTimer(Sender: TObject);
procedure SelectItemSaveForHTMLExecute(Sender: TObject);
- procedure KidokuActionExecute(Sender: TObject);
+ procedure KidokuActionExecute(Sender: TObject);
procedure MidokuActionExecute(Sender: TObject);
procedure SelectItemSaveForDatExecute(Sender: TObject);
procedure LogFolderOpenActionExecute(Sender: TObject);
procedure MenuToolBarResize(Sender: TObject);
procedure ListToolBarResize(Sender: TObject);
procedure BrowserToolBarResize(Sender: TObject);
- procedure RightTabCloseActionExecute(Sender: TObject);
+ procedure RightTabCloseActionExecute(Sender: TObject);
procedure RightTabCloseActionUpdate(Sender: TObject);
procedure LeftTabCloseActionExecute(Sender: TObject);
procedure LeftTabCloseActionUpdate(Sender: TObject);
+ procedure SameIDResAnchorActionExecute(Sender: TObject);
+ procedure IndividualAbon1ActionExecute(Sender: TObject);
+ procedure IndividualAbon0ActionExecute(Sender: TObject);
+ procedure AntiIndividualAbonActionExecute(Sender: TObject);
+ procedure AntiIndividualAbonDlgActionExecute(Sender: TObject);
+ procedure IndividualAbonID1ActionExecute(Sender: TObject);
+ procedure IndividualAbonID0ActionExecute(Sender: TObject);
+ procedure KokoPopupMenuPopup(Sender: TObject);
private
{ Private \90é\8c¾ }
//RoundList : TRoundList;
/// \8ae\8f\8a\82É\82 \82é\83L\83\83\83r\83l\83b\83g\81E BBS \83\81\83j\83\85\81[\82ð\83Z\83b\83g\81^\8dX\90V
procedure SetBBSMenu;
function WebBrowserClick(Sender: TObject): WordBool;
- function WebBrowserOnMouseDown(Sender: TObject): WordBool;
procedure SkinorCSSFilesCopy(path: string);
/// \83^\83u\8eæ\93¾
function GetTabURLs(AStringList: TStringList) : Boolean;
property ActiveList: TObject read GetActiveList write SetActiveList;
/// CoolBar \82ª\83T\83C\83Y\95Ï\8dX\82³\82ê\82½
procedure CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
-
+ //\93¯\88êID\82Ì\82 \82Ú\81`\82ñ
+ procedure IndividualAbonID(Atype : Integer);
+ //\82±\82Ì\83\8c\83X\82 \82Ú\81`\82ñ
+ procedure IndividualAbon(Atag, Atype : Integer);
published
property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
end;
top := 0;
nm := AName;
item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
- item.focus();
+ item.focus();
repeat
top := top + item.offsetTop;
item := item.offsetParent;
idx: Integer;
wkIntSt: Integer;
wkIntTo: Integer;
+ firstElement: IHTMLElement;
+ document: IHTMLDocument2;
+ doc : Variant;
begin
Cancel := True;
end else
wkIntSt := StrToIntDef(Text, 0);
- if wkIntSt <> 0 then
+ if wkIntSt <> 0 then begin
+ document := FActiveContent.Browser.Document as IHTMLDocument2;
+ if Assigned(document) then
+ firstElement := document.all.item('idSearch', 0) as IHTMLElement;
+ if Assigned(firstElement) then
+ if firstElement.style.visibility <> 'hidden' then
+ firstElement.style.visibility := 'hidden';
+
BrowserMovement(IntToStr(wkIntSt));
+ end;
+
+
end;
end else begin
URL := GikoSys.GetHRefText(Html);
BrowserRecord.FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
BrowserRecord.FEvent.OnContextMenu := OnDocumentContextMenu;
BrowserRecord.FEvent.OnClick := WebBrowserClick; //\92Ç\89Á\82µ\82½OnClick\83C\83x\83\93\83g
- BrowserRecord.FEvent.OnMouseDown := WebBrowserOnMouseDown;
end;
end else begin
if GetActiveContent <> nil then begin
FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
FEvent.OnContextMenu := OnDocumentContextMenu;
FEvent.OnClick := WebBrowserClick; //\92Ç\89Á\82µ\82½OnClick\83C\83x\83\93\83g
- FEvent.OnMouseDown := WebBrowserOnMouseDown;;
end;
end;
StatusBar.Panels[0].Width -
StatusBar.Panels[2].Width;
end;
-//\8cÂ\95Ê\82 \82Ú\81[\82ñ\81u\92Ê\8fí\81v
-procedure TGikoForm.IndividualAbon1Click(Sender: TObject);
-var
- ThreadItem : TThreadItem;
- ReadList : TStringList;
- wordCount : TWordCount;
-begin
- ThreadItem := GetActiveContent;
- ReadList := TStringList.Create;
- wordCount := TWordCount.Create;
- try
- ThreadItem.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
- // \83X\83p\83\80\82É\90Ý\92è
- ReadList.LoadFromFile( ThreadItem.GetThreadFileName );
- GikoSys.SpamCountWord( ReadList[ KokoPopupMenu.Tag - 1 ], wordCount );
- GikoSys.SpamForget( wordCount, False ); // \83n\83\80\82ð\89ð\8f\9c
- GikoSys.SpamLearn( wordCount, True ); // \83X\83p\83\80\82É\90Ý\92è
- // \82 \82Ú\81[\82ñ\82É\90Ý\92è
- GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag, 1, ChangeFileExt(ThreadItem.GetThreadFileName, '.NG'));
- finally
- wordCount.Free;
- ReadList.Free;
- end;
- FActiveContent.Repaint := true;
- if ThreadItem <> nil then
- InsertBrowserTab( ThreadItem, True );
-end;
-//\8cÂ\95Ê\82 \82Ú\81[\82ñ\81u\93§\96¾\81v
-procedure TGikoForm.IndividualAbon2Click(Sender: TObject);
-var
- ThreadItem : TThreadItem;
- ReadList : TStringList;
- wordCount : TWordCount;
-begin
- ThreadItem := GetActiveContent;
- ReadList := TStringList.Create;
- wordCount := TWordCount.Create;
- try
- ThreadItem.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
- // \83X\83p\83\80\82É\90Ý\92è
- ReadList.LoadFromFile( ThreadItem.GetThreadFileName );
- GikoSys.SpamCountWord( ReadList[ KokoPopupMenu.Tag - 1 ], wordCount );
- GikoSys.SpamForget( wordCount, False ); // \83n\83\80\82ð\89ð\8f\9c
- GikoSys.SpamLearn( wordCount, True ); // \83X\83p\83\80\82É\90Ý\92è
- // \82 \82Ú\81[\82ñ\82É\90Ý\92è
- GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag, 0, ChangeFileExt(ThreadItem.GetThreadFileName, '.NG'));
- finally
- wordCount.Free;
- ReadList.Free;
- end;
- FActiveContent.Repaint := true;
- if ThreadItem <> nil then
- InsertBrowserTab( ThreadItem, True );
-end;
-//\8cÂ\95Ê\82 \82Ú\81[\82ñ\89ð\8f\9c\81i\81j
-procedure TGikoForm.AntiIndividualAbonClick(Sender: TObject);
-var
- IndividualForm :TIndividualAbonForm;
- ThreadItem : TThreadItem;
- msg : String;
- ReadList : TStringList;
- wordCount : TWordCount;
-begin
- IndividualForm := TIndividualAbonForm.Create(Self);
- try
- ThreadItem := GetActiveContent;
- ThreadItem.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
- if (ThreadItem <> nil) and (ThreadItem.IsLogFile) then begin
- if IndividualForm.SetThreadLogFileName(ThreadItem.GetThreadFileName) then begin
- ReadList := TStringList.Create;
- wordCount := TWordCount.Create;
- try
- // \83X\83p\83\80\82ð\89ð\8f\9c
- ReadList.LoadFromFile( ThreadItem.GetThreadFileName );
- GikoSys.SpamCountWord( ReadList[ KokoPopupMenu.Tag - 1 ], wordCount );
- GikoSys.SpamForget( wordCount, True ); // \83X\83p\83\80\82ð\89ð\8f\9c
- GikoSys.SpamLearn( wordCount, False ); // \83n\83\80\82É\90Ý\92è
- if IndividualForm.DeleteNG(KokoPopupMenu.Tag) then begin
- FActiveContent.Repaint := true;
- InsertBrowserTab( ThreadItem, True );
- end;
- finally
- wordCount.Free;
- ReadList.Free;
- end;
- end else begin
- msg := '\82±\82Ì\83X\83\8c\83b\83h\82Å\82Í\8cÂ\95Ê\82 \82Ú\81`\82ñ\82ð\8ds\82Á\82Ä\82Ü\82¹\82ñ';
- MsgBox(Handle, msg, '\83\81\83b\83Z\81[\83W', MB_OK);
- end;
- end;
- finally
- IndividualForm.Release;
- end;
-end;
-//\8cÂ\95Ê\82 \82Ú\81[\82ñ\89ð\8f\9c
-procedure TGikoForm.N42Click(Sender: TObject);
-var
- IndividualForm :TIndividualAbonForm;
- ThreadItem : TThreadItem;
- msg : String;
- ReadList : TStringList;
- wordCount : TWordCount;
-begin
- IndividualForm := TIndividualAbonForm.Create(Self);
- try
- ThreadItem := GetActiveContent;
- ThreadItem.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
- if (ThreadItem <> nil) and (ThreadItem.IsLogFile) then begin
- if IndividualForm.SetThreadLogFileName(ThreadItem.GetThreadFileName) then begin
- if IndividualForm.ShowModal = mrOK then begin
- ReadList := TStringList.Create;
- wordCount := TWordCount.Create;
- try
- // \83X\83p\83\80\82ð\89ð\8f\9c
- ReadList.LoadFromFile( ThreadItem.GetThreadFileName );
- GikoSys.SpamCountWord( ReadList[ KokoPopupMenu.Tag - 1 ], wordCount );
- GikoSys.SpamForget( wordCount, True ); // \83X\83p\83\80\82ð\89ð\8f\9c
- GikoSys.SpamLearn( wordCount, False ); // \83n\83\80\82É\90Ý\92è
- if IndividualForm.FRepaint then begin
- FActiveContent.Repaint := true;
- InsertBrowserTab( ThreadItem, True );
- end;
- finally
- wordCount.Free;
- ReadList.Free;
- end;
- end;
- end else begin
- msg := '\82±\82Ì\83X\83\8c\83b\83h\82Å\82Í\8cÂ\95Ê\82 \82Ú\81`\82ñ\82ð\8ds\82Á\82Ä\82Ü\82¹\82ñ';
- MsgBox(Handle, msg, '\83\81\83b\83Z\81[\83W', MB_OK);
- end;
- end;
- finally
- IndividualForm.Release;
- end;
-end;
-
procedure TGikoForm.SelectComboBoxEnter(Sender: TObject);
begin
end;
-procedure TGikoForm.N51Click(Sender: TObject);
-begin
- N42Click(Sender);
-end;
//\94Â\96¼\8c\9f\8dõ
procedure TGikoForm.TreeSelectSearchBoardNameExecute(Sender: TObject);
var
end;
end;
-function TGikoForm.WebBrowserOnMouseDown(Sender: TObject): WordBool;
-var
- p :TPoint;
- e: IHTMLElement;
- document: IHTMLDocument2;
- docAll: IHTMLElementCollection;
- firstElement: IHTMLElement;
- nCSS, body, id : string;
- doc : Variant;
-begin
- result := true;
-{$IFDEF DEBUG}
- try
- if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
- GetCursorPos(p);
- p.x := p.x - FActiveContent.Browser.ClientOrigin.x;
- p.y := p.y - FActiveContent.Browser.ClientOrigin.y;
- e := IHTMLDocument2(FActiveContent.Browser.Document).elementFromPoint(p.x, p.y);
- document := FActiveContent.Browser.Document as IHTMLDocument2;
- if (Assigned(e)) and Assigned(document) then begin
- docAll := document.all;
- firstElement := docAll.item('idSearch', 0) as IHTMLElement;
- if ( e.className = 'date' ) and (Assigned(firstElement)) and (AnsiPos('id', AnsiLowerCase(e.innerText)) > 0) then begin
- id := Copy(e.innerText, AnsiPos('id', AnsiLowerCase(e.innerText)), Length(e.innerText));
- body := GikoSys.GetSameIDResAnchor(id, FActiveContent.FThread);
- doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
- nCSS := '<p id="idSearch" style="position:absolute;top:'+ IntToStr(p.y + doc.Body.ScrollTop - firstElement.offsetHeight - 5) + 'px;right:5px;'
- + 'background-color:window; border:outset 1px infobackground; overflow-y:auto; z-index:5; border-top:none">'
- + body + '</p>';
- firstElement.outerHTML := nCSS;
- end else if (Assigned(firstElement)) then begin
- firstElement.outerHTML := '<p id="idSearch"></p>';
- end;
- end;
- end;
- except
- end;
-{$ENDIF}
-end;
procedure TGikoForm.SetFocusForBrowserActionExecute(Sender: TObject);
begin
LeftTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 1);
end;
+procedure TGikoForm.SameIDResAnchorActionExecute(Sender: TObject);
+var
+ ThreadItem : TThreadItem;
+ No : Integer;
+ body, nCSS : string;
+ firstElement: IHTMLElement;
+ document: IHTMLDocument2;
+ docAll: IHTMLElementCollection;
+ doc : Variant;
+begin
+ No := KokoPopupMenu.Tag;
+ if No = 0 then Exit;
+ ThreadItem := GetActiveContent;
+ if ThreadItem = nil then Exit;
+ body := GikoSys.GetSameIDResAnchor(No, ThreadItem);
+ try
+ document := FActiveContent.Browser.Document as IHTMLDocument2;
+
+ if Assigned(document) then begin
+ docAll := document.all;
+ firstElement := docAll.item('idSearch', 0) as IHTMLElement;
+ if (Assigned(firstElement)) then begin
+ if Length(body) > 0 then begin
+ doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
+ nCSS := '<p id="idSearch" style="position:absolute;top:' + IntToStr(doc.Body.ScrollTop + 10) + 'px;right:5px;' //
+ + 'background-color:window; border:outset 1px infobackground; z-index:10; overflow-y:auto; border-top:none">'
+ + body + '</p>';
+ firstElement.outerHTML := nCSS;
+ firstElement.style.visibility := 'visible';
+ end else begin
+ firstElement.outerHTML := '<p id="idSearch"></p>';
+ firstElement.style.visibility := 'hidden';
+ end;
+ end else if (Assigned(firstElement)) then begin
+ firstElement.outerHTML := '<p id="idSearch"></p>';
+ firstElement.style.visibility := 'hidden';
+ end;
+ end;
+ except
+ end;
+
+end;
+//\82±\82Ì\83\8c\83X\82 \82Ú\81`\82ñ
+procedure TGikoForm.IndividualAbon1ActionExecute(Sender: TObject);
+begin
+ IndividualAbon(KokoPopupMenu.Tag, 1);
+end;
+//\82±\82Ì\83\8c\83X\93§\96¾\82 \82Ú\81`\82ñ
+procedure TGikoForm.IndividualAbon0ActionExecute(Sender: TObject);
+begin
+ IndividualAbon(KokoPopupMenu.Tag, 0);
+end;
+
+//\82±\82Ì\83\8c\83X\82 \82Ú\81`\82ñ
+procedure TGikoForm.IndividualAbon(Atag, Atype : Integer);
+var
+ ThreadItem : TThreadItem;
+ ReadList : TStringList;
+ wordCount : TWordCount;
+begin
+ ThreadItem := GetActiveContent;
+ ReadList := TStringList.Create;
+ wordCount := TWordCount.Create;
+ try
+ ThreadItem.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
+ // \83X\83p\83\80\82É\90Ý\92è
+ ReadList.LoadFromFile( ThreadItem.GetThreadFileName );
+ GikoSys.SpamCountWord( ReadList[ KokoPopupMenu.Tag - 1 ], wordCount );
+ GikoSys.SpamForget( wordCount, False ); // \83n\83\80\82ð\89ð\8f\9c
+ GikoSys.SpamLearn( wordCount, True ); // \83X\83p\83\80\82É\90Ý\92è
+ // \82 \82Ú\81[\82ñ\82É\90Ý\92è
+ GikoSys.FAbon.AddIndividualAbon(Atag, Atype, ChangeFileExt(ThreadItem.GetThreadFileName, '.NG'));
+ finally
+ wordCount.Free;
+ ReadList.Free;
+ end;
+ FActiveContent.Repaint := true;
+ if ThreadItem <> nil then
+ InsertBrowserTab( ThreadItem, True );
+end;
+
+procedure TGikoForm.AntiIndividualAbonActionExecute(Sender: TObject);
+var
+ IndividualForm :TIndividualAbonForm;
+ ThreadItem : TThreadItem;
+ msg : String;
+ ReadList : TStringList;
+ wordCount : TWordCount;
+begin
+ IndividualForm := TIndividualAbonForm.Create(Self);
+ try
+ ThreadItem := GetActiveContent;
+ ThreadItem.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
+ if (ThreadItem <> nil) and (ThreadItem.IsLogFile) then begin
+ if IndividualForm.SetThreadLogFileName(ThreadItem.GetThreadFileName) then begin
+ ReadList := TStringList.Create;
+ wordCount := TWordCount.Create;
+ try
+ // \83X\83p\83\80\82ð\89ð\8f\9c
+ ReadList.LoadFromFile( ThreadItem.GetThreadFileName );
+ GikoSys.SpamCountWord( ReadList[ KokoPopupMenu.Tag - 1 ], wordCount );
+ GikoSys.SpamForget( wordCount, True ); // \83X\83p\83\80\82ð\89ð\8f\9c
+ GikoSys.SpamLearn( wordCount, False ); // \83n\83\80\82É\90Ý\92è
+ if IndividualForm.DeleteNG(KokoPopupMenu.Tag) then begin
+ FActiveContent.Repaint := true;
+ InsertBrowserTab( ThreadItem, True );
+ end;
+ finally
+ wordCount.Free;
+ ReadList.Free;
+ end;
+ end else begin
+ msg := '\82±\82Ì\83X\83\8c\83b\83h\82Å\82Í\8cÂ\95Ê\82 \82Ú\81`\82ñ\82ð\8ds\82Á\82Ä\82Ü\82¹\82ñ';
+ MsgBox(Handle, msg, '\83\81\83b\83Z\81[\83W', MB_OK);
+ end;
+ end;
+ finally
+ IndividualForm.Release;
+ end;
+end;
+
+procedure TGikoForm.AntiIndividualAbonDlgActionExecute(Sender: TObject);
+var
+ IndividualForm :TIndividualAbonForm;
+ ThreadItem : TThreadItem;
+ msg : String;
+ ReadList : TStringList;
+ wordCount : TWordCount;
+begin
+ IndividualForm := TIndividualAbonForm.Create(Self);
+ try
+ ThreadItem := GetActiveContent;
+ ThreadItem.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
+ if (ThreadItem <> nil) and (ThreadItem.IsLogFile) then begin
+ if IndividualForm.SetThreadLogFileName(ThreadItem.GetThreadFileName) then begin
+ if IndividualForm.ShowModal = mrOK then begin
+ ReadList := TStringList.Create;
+ wordCount := TWordCount.Create;
+ try
+ // \83X\83p\83\80\82ð\89ð\8f\9c
+ ReadList.LoadFromFile( ThreadItem.GetThreadFileName );
+ GikoSys.SpamCountWord( ReadList[ KokoPopupMenu.Tag - 1 ], wordCount );
+ GikoSys.SpamForget( wordCount, True ); // \83X\83p\83\80\82ð\89ð\8f\9c
+ GikoSys.SpamLearn( wordCount, False ); // \83n\83\80\82É\90Ý\92è
+ if IndividualForm.FRepaint then begin
+ FActiveContent.Repaint := true;
+ InsertBrowserTab( ThreadItem, True );
+ end;
+ finally
+ wordCount.Free;
+ ReadList.Free;
+ end;
+ end;
+ end else begin
+ msg := '\82±\82Ì\83X\83\8c\83b\83h\82Å\82Í\8cÂ\95Ê\82 \82Ú\81`\82ñ\82ð\8ds\82Á\82Ä\82Ü\82¹\82ñ';
+ MsgBox(Handle, msg, '\83\81\83b\83Z\81[\83W', MB_OK);
+ end;
+ end;
+ finally
+ IndividualForm.Release;
+ end;
+end;
+
+procedure TGikoForm.IndividualAbonID1ActionExecute(Sender: TObject);
+begin
+ IndividualAbonID(1);
+end;
+
+procedure TGikoForm.IndividualAbonID0ActionExecute(Sender: TObject);
+begin
+ IndividualAbonID(0);
+end;
+//\93¯\88êID\82Ì\82 \82Ú\81`\82ñ
+procedure TGikoForm.IndividualAbonID(Atype : Integer);
+var
+ ThreadItem : TThreadItem;
+ i, No : Integer;
+ body : TStringList;
+ ReadList : TStringList;
+ wordCount : TWordCount;
+begin
+ No := KokoPopupMenu.Tag;
+ if No = 0 then Exit;
+ ThreadItem := GetActiveContent;
+ if ThreadItem = nil then Exit;
+ body := TStringList.Create;
+ try
+ GikoSys.GetSameIDRes(No, ThreadItem, body);
+
+ ReadList := TStringList.Create;
+ wordCount := TWordCount.Create;
+ try
+ ThreadItem.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
+ // \83X\83p\83\80\82É\90Ý\92è
+ ReadList.LoadFromFile( ThreadItem.GetThreadFileName );
+ for i := 0 to body.Count - 1 do begin
+ GikoSys.SpamCountWord( ReadList[ KokoPopupMenu.Tag - 1 ], wordCount );
+ GikoSys.SpamForget( wordCount, False ); // \83n\83\80\82ð\89ð\8f\9c
+ GikoSys.SpamLearn( wordCount, True ); // \83X\83p\83\80\82É\90Ý\92è
+ // \82 \82Ú\81[\82ñ\82É\90Ý\92è
+ GikoSys.FAbon.AddIndividualAbon(StrToInt(body[i]), Atype, ChangeFileExt(ThreadItem.GetThreadFileName, '.NG'));
+ end;
+ finally
+ wordCount.Free;
+ ReadList.Free;
+ end;
+ FActiveContent.Repaint := true;
+ if ThreadItem <> nil then
+ InsertBrowserTab( ThreadItem, True );
+ finally
+ body.Free;
+ end;
+
+end;
+
+procedure TGikoForm.KokoPopupMenuPopup(Sender: TObject);
+var
+ firstElement: IHTMLElement;
+ document: IHTMLDocument2;
+begin
+ document := FActiveContent.Browser.Document as IHTMLDocument2;
+ if Assigned(document) then
+ firstElement := document.all.item('idSearch', 0) as IHTMLElement;
+ if Assigned(firstElement) then
+ if firstElement.style.visibility <> 'hidden' then
+ firstElement.style.visibility := 'hidden';
+
+end;
+
initialization
OleInitialize(nil);
finalization