ギコナビ
リビジョン | c5e1d89a86979f794d0e2f4d1dc52f8f27c98de5 (tree) |
---|---|
日時 | 2009-02-23 00:30:28 |
作者 | cvs2git <cvs2git> |
コミッター | cvs2git |
This commit was manufactured by cvs2svn to create tag 'v1_60_0_782'.
@@ -279,7 +279,7 @@ type | ||
279 | 279 | public |
280 | 280 | constructor Create(const inPlugIn : TBoardPlugIn; const inBoard : TBoard; inURL : string ); overload; |
281 | 281 | constructor Create(const inPlugIn : TBoardPlugIn; const inBoard : TBoard; |
282 | - inURL : string; inExist: Boolean; const inFilename: string ); overload; | |
282 | + const inURL : string; inExist: Boolean; const inFilename: string ); overload; | |
283 | 283 | |
284 | 284 | destructor Destroy; override; |
285 | 285 |
@@ -1574,7 +1574,7 @@ end; | ||
1574 | 1574 | constructor TThreadItem.Create( |
1575 | 1575 | const inPlugIn : TBoardPlugIn; |
1576 | 1576 | const inBoard : TBoard; |
1577 | - inURL : string; | |
1577 | + const inURL : string; | |
1578 | 1578 | inExist: Boolean; |
1579 | 1579 | const inFilename: string |
1580 | 1580 | ); |
@@ -1589,7 +1589,7 @@ begin | ||
1589 | 1589 | // dat ÌÛ¶pXðÝè |
1590 | 1590 | FileName := inFilename; |
1591 | 1591 | IsLogFile := inExist; |
1592 | - URL := GikoSys.Get2chBrowsableThreadURL( inURL ); | |
1592 | + URL := inURL; | |
1593 | 1593 | end else begin |
1594 | 1594 | // vOCÉ TThreadItem ªì¬³ê½±Æð`¦é |
1595 | 1595 | inPlugIn.CreateThreadItem( DWORD( Self ) ); |
@@ -1025,7 +1025,11 @@ begin | ||
1025 | 1025 | case FResRangeMenuSelect of |
1026 | 1026 | Ord( grrKoko ): GikoDM.OnlyKokoResAction.Checked := True; |
1027 | 1027 | Ord( grrNew ): GikoDM.OnlyNewResAction.Checked := True; |
1028 | - 100: GikoDM.OnlyAHundredResAction.Checked := True; | |
1028 | + 10..65535: | |
1029 | + begin | |
1030 | + GikoDM.OnlyAHundredResAction.Checked := True; | |
1031 | + GikoSys.ResRange := GikoSys.Setting.ResRangeExCount; | |
1032 | + end; | |
1029 | 1033 | end; |
1030 | 1034 | end; |
1031 | 1035 |
@@ -2079,7 +2083,8 @@ begin | ||
2079 | 2083 | s := ''; |
2080 | 2084 | Ext := AnsiLowerCase(ExtractFileExt(Text2)); |
2081 | 2085 | if (Pos('http://', Text2) = 1) and (GikoSys.Setting.PreviewVisible) and |
2082 | - ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin | |
2086 | + ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) or | |
2087 | + (Pos('http://www.nicovideo.jp/watch/', Text2) = 1) then begin | |
2083 | 2088 | if FPreviewBrowser = nil then begin |
2084 | 2089 | FPreviewBrowser := TPreviewBrowser.Create(Self); |
2085 | 2090 | ShowWindow(FPreviewBrowser.Handle, SW_HIDE); |
@@ -5,7 +5,7 @@ unit GikoBayesian; | ||
5 | 5 | \brief xCWAtB^ |
6 | 6 | |
7 | 7 | |
8 | -$Id: GikoBayesian.pas,v 1.21 2006/06/26 14:57:15 h677 Exp $ | |
8 | +$Id: GikoBayesian.pas,v 1.22 2009/01/31 15:47:15 h677 Exp $ | |
9 | 9 | } |
10 | 10 | |
11 | 11 | //! ½¼¼ð«ÉÜßÈ¢ |
@@ -310,12 +310,12 @@ begin | ||
310 | 310 | |
311 | 311 | for i := 1 to sl.Count - 1 do begin |
312 | 312 | s := sl[ i ]; |
313 | - name := RemoveToken( s, #1 ); | |
313 | + name := GikoBayesian.RemoveToken( s, #1 ); | |
314 | 314 | info := TWordInfo.Create; |
315 | - info.NormalWord := StrToIntDef( '$' + RemoveToken( s, #1 ), 0 ); | |
316 | - info.ImportantWord := StrToIntDef( '$' + RemoveToken( s, #1 ), 0 ); | |
317 | - info.NormalText := StrToIntDef( '$' + RemoveToken( s, #1 ), 0 ); | |
318 | - info.ImportantText := StrToIntDef( '$' + RemoveToken( s, #1 ), 0 ); | |
315 | + info.NormalWord := StrToIntDef( '$' + GikoBayesian.RemoveToken( s, #1 ), 0 ); | |
316 | + info.ImportantWord := StrToIntDef( '$' + GikoBayesian.RemoveToken( s, #1 ), 0 ); | |
317 | + info.NormalText := StrToIntDef( '$' + GikoBayesian.RemoveToken( s, #1 ), 0 ); | |
318 | + info.ImportantText := StrToIntDef( '$' + GikoBayesian.RemoveToken( s, #1 ), 0 ); | |
319 | 319 | |
320 | 320 | AddObject( name, info ); |
321 | 321 | end; |
@@ -926,8 +926,8 @@ begin | ||
926 | 926 | |
927 | 927 | GikoForm.ResRangeMenuSelect := 100; |
928 | 928 | OnlyAHundredResAction.Checked := True; |
929 | - //@\¦ÍÍðÝè·é | |
930 | - SetResRange(100); | |
929 | + //@\¦ÍÍðÝè·éBÝèl©çÆÁÄéB | |
930 | + SetResRange(GikoSys.Setting.ResRangeExCount); | |
931 | 931 | end; |
932 | 932 | // ************************************************************************* |
933 | 933 | //! ¢ÇXÌÝ\¦ |
@@ -181,7 +181,7 @@ type | ||
181 | 181 | |
182 | 182 | procedure MenuFont(Font: TFont); |
183 | 183 | |
184 | - function RemoveToken(var s:string; const delimiter:string):string; | |
184 | +// function RemoveToken(var s:string; const delimiter:string):string; | |
185 | 185 | function GetTokenIndex(s: string; delimiter: string; index: Integer): string; |
186 | 186 | |
187 | 187 | function GetShortName(const LongName: string; ALength: integer): string; |
@@ -264,7 +264,7 @@ const | ||
264 | 264 | ZERO_DATE: Integer = 25569; |
265 | 265 | BETA_VERSION_NAME_E = 'beta'; |
266 | 266 | BETA_VERSION_NAME_J = 'ÊÞÀ'; |
267 | - BETA_VERSION = 59; | |
267 | + BETA_VERSION = 60; | |
268 | 268 | BETA_VERSION_BUILD = ''; //!< debugÅÈÇ |
269 | 269 | APP_NAME = 'gikoNavi'; |
270 | 270 | BE_PHP_URL = 'http://be.2ch.net/test/p.php?i='; |
@@ -645,7 +645,7 @@ begin | ||
645 | 645 | end; |
646 | 646 | end; |
647 | 647 | |
648 | - ThreadItem.BeginUpdate; | |
648 | + //ThreadItem.BeginUpdate; | |
649 | 649 | if (datFileCheck) and (islog) then |
650 | 650 | FileList.Delete( Index ); |
651 | 651 |
@@ -670,7 +670,7 @@ begin | ||
670 | 670 | Node := FavoriteDM.TreeView.Items.AddChildObject( FavoriteDM.TreeView.Items.Item[0], ThreadItem.Title, FavoThreadItem); |
671 | 671 | *} |
672 | 672 | |
673 | - ThreadItem.EndUpdate; | |
673 | + //ThreadItem.EndUpdate; | |
674 | 674 | Board.Add(ThreadItem); |
675 | 675 | |
676 | 676 | if (ThreadItem.UnRead) and (ThreadItem.IsLogFile) then |
@@ -699,7 +699,7 @@ begin | ||
699 | 699 | Board.IsThreadDatRead := True; |
700 | 700 | {$IFDEF DEBUG} |
701 | 701 | rt := GetTickCount - st; |
702 | - Writeln('Read Done.' + IntToStr(rt) + ' ms'); | |
702 | + Writeln('Read Done.' + Board.Title + ':' + IntToStr(rt) + ' ms'); | |
703 | 703 | {$ENDIF} |
704 | 704 | end; |
705 | 705 | {! |
@@ -943,7 +943,7 @@ begin | ||
943 | 943 | Result.FLastModified := IntToDateTime(StrToIntDef('$' + MojuUtils.RemoveToken(Line, #1), ZERO_DATE)); |
944 | 944 | Result.FKokomade := StrToIntDef('$' + MojuUtils.RemoveToken(Line, #1), -1); |
945 | 945 | Result.FNewReceive := StrToIntDef('$' + MojuUtils.RemoveToken(Line, #1), 0); |
946 | - RemoveToken(Line, #1);//9: ; //¢gp | |
946 | + MojuUtils.RemoveToken(Line, #1);//9: ; //¢gp | |
947 | 947 | Result.FUnRead := IntToBool(StrToIntDef('$' + MojuUtils.RemoveToken(Line, #1), 0)); |
948 | 948 | Result.FScrollTop := StrToIntDef('$' + MojuUtils.RemoveToken(Line, #1), 0); |
949 | 949 | Result.FAllResCount := StrToIntDef('$' + MojuUtils.RemoveToken(Line, #1), 0); |
@@ -1098,8 +1098,8 @@ begin | ||
1098 | 1098 | Delim := ',' |
1099 | 1099 | else |
1100 | 1100 | Delim := '<>'; |
1101 | - Result.FFileName := RemoveToken(Line, Delim); | |
1102 | - Result.FTitle := Trim(RemoveToken(Line, Delim)); | |
1101 | + Result.FFileName := MojuUtils.RemoveToken(Line, Delim); | |
1102 | + Result.FTitle := Trim(MojuUtils.RemoveToken(Line, Delim)); | |
1103 | 1103 | |
1104 | 1104 | ws := Result.FTitle; |
1105 | 1105 | if Copy(ws, Length(ws), 1) = ')' then begin |
@@ -1363,7 +1363,7 @@ end; | ||
1363 | 1363 | |
1364 | 1364 | DZ©ÌTCg©çÌpN |
1365 | 1365 | } |
1366 | -function TGikoSys.RemoveToken(var s: string;const delimiter: string): string; | |
1366 | +{function TGikoSys.RemoveToken(var s: string;const delimiter: string): string; | |
1367 | 1367 | var |
1368 | 1368 | p: Integer; |
1369 | 1369 | begin |
@@ -1374,7 +1374,7 @@ begin | ||
1374 | 1374 | Result := Copy(s, 1, p - 1); |
1375 | 1375 | Delete(s, 1, Length(Result) + Length(delimiter)); |
1376 | 1376 | end; |
1377 | - | |
1377 | +} | |
1378 | 1378 | |
1379 | 1379 | {! |
1380 | 1380 | \brief n ÂÚÌg[NðØèoµ |
@@ -1390,7 +1390,7 @@ var | ||
1390 | 1390 | begin |
1391 | 1391 | Result := ''; |
1392 | 1392 | for i := 0 to index do |
1393 | - Result := RemoveToken(s, delimiter); | |
1393 | + Result := MojuUtils.RemoveToken(s, delimiter); | |
1394 | 1394 | end; |
1395 | 1395 | |
1396 | 1396 |
@@ -1632,7 +1632,7 @@ begin | ||
1632 | 1632 | SI.cbReserved2 := 0; |
1633 | 1633 | SI.lpReserved2 := nil; |
1634 | 1634 | SI.dwysize := 0; |
1635 | - Windows.CreateProcess(nil, | |
1635 | + if Windows.CreateProcess(nil, | |
1636 | 1636 | PChar(Path), |
1637 | 1637 | nil, |
1638 | 1638 | nil, |
@@ -1641,7 +1641,11 @@ begin | ||
1641 | 1641 | nil, |
1642 | 1642 | nil, |
1643 | 1643 | SI, |
1644 | - PI); | |
1644 | + PI) then | |
1645 | + begin | |
1646 | + CloseHandle(PI.hProcess); | |
1647 | + end; | |
1648 | + | |
1645 | 1649 | end; |
1646 | 1650 | |
1647 | 1651 | {! |
@@ -1459,10 +1459,10 @@ begin | ||
1459 | 1459 | Line := CustomStringReplace(Line, 'M', ','); |
1460 | 1460 | end; |
1461 | 1461 | //TrimµÄÍ¢¯È¢Cª·é@byà¶ã |
1462 | - PRes.FName := RemoveToken(Line, delimiter); | |
1463 | - PRes.FMailTo := RemoveToken(Line, delimiter); | |
1464 | - PRes.FDateTime := RemoveToken(Line, delimiter); | |
1465 | - PRes.FBody := RemoveToken(Line, delimiter); | |
1462 | + PRes.FName := MojuUtils.RemoveToken(Line, delimiter); | |
1463 | + PRes.FMailTo := MojuUtils.RemoveToken(Line, delimiter); | |
1464 | + PRes.FDateTime := MojuUtils.RemoveToken(Line, delimiter); | |
1465 | + PRes.FBody := MojuUtils.RemoveToken(Line, delimiter); | |
1466 | 1466 | //Q¿áñËéÆ©¾ÆA{¶ÌæªÉP¼póªüÁÄ¢éÌÅí·é |
1467 | 1467 | //¼Ìf¦ÂÅAX©ÌÌó©àµêÈ¢¯Ç»êÍúßé |
1468 | 1468 | PRes.FBody := TrimLeft(PRes.FBody); |
@@ -1470,7 +1470,7 @@ begin | ||
1470 | 1470 | if PRes.FBody = '' then |
1471 | 1471 | PRes.FBody := ' '; |
1472 | 1472 | |
1473 | - PRes.FTitle := RemoveToken(Line, delimiter); | |
1473 | + PRes.FTitle := MojuUtils.RemoveToken(Line, delimiter); | |
1474 | 1474 | end; |
1475 | 1475 | |
1476 | 1476 | {! |
@@ -475,6 +475,34 @@ object KuroutOption: TKuroutOption | ||
475 | 475 | TabOrder = 1 |
476 | 476 | Wrap = False |
477 | 477 | end |
478 | + object ResRangeLabeledEdit: TLabeledEdit | |
479 | + Left = 317 | |
480 | + Top = 18 | |
481 | + Width = 121 | |
482 | + Height = 20 | |
483 | + EditLabel.Width = 113 | |
484 | + EditLabel.Height = 12 | |
485 | + EditLabel.Caption = #34920#31034#12524#12473#25968'(100-9999)' | |
486 | + ImeMode = imDisable | |
487 | + LabelPosition = lpLeft | |
488 | + LabelSpacing = 3 | |
489 | + TabOrder = 2 | |
490 | + Text = '100' | |
491 | + OnExit = ResRangeLabeledEditExit | |
492 | + end | |
493 | + object ResRangeCountUpDown: TUpDown | |
494 | + Left = 438 | |
495 | + Top = 18 | |
496 | + Width = 17 | |
497 | + Height = 20 | |
498 | + Associate = ResRangeLabeledEdit | |
499 | + Min = 100 | |
500 | + Max = 9999 | |
501 | + Position = 100 | |
502 | + TabOrder = 3 | |
503 | + Thousands = False | |
504 | + Wrap = False | |
505 | + end | |
478 | 506 | end |
479 | 507 | object ThreadGroupBox: TGroupBox |
480 | 508 | Left = 16 |
@@ -94,6 +94,8 @@ type | ||
94 | 94 | RespopupWaitUpDown: TUpDown; |
95 | 95 | Label19: TLabel; |
96 | 96 | RespopupMailToCheckBox: TCheckBox; |
97 | + ResRangeLabeledEdit: TLabeledEdit; | |
98 | + ResRangeCountUpDown: TUpDown; | |
97 | 99 | procedure OkBottonClick(Sender: TObject); |
98 | 100 | procedure FormCreate(Sender: TObject); |
99 | 101 | procedure CDeleteButtonClick(Sender: TObject); |
@@ -110,6 +112,7 @@ type | ||
110 | 112 | procedure DeltaXLabeledEditExit(Sender: TObject); |
111 | 113 | procedure DeltaYLabeledEditExit(Sender: TObject); |
112 | 114 | procedure RespopupWaitLabeledEditExit(Sender: TObject); |
115 | + procedure ResRangeLabeledEditExit(Sender: TObject); | |
113 | 116 | private |
114 | 117 | { Private é¾ } |
115 | 118 | procedure SetValue; |
@@ -166,6 +169,8 @@ begin | ||
166 | 169 | MoveHistoryMaxEdit.Text := IntToStr( GikoSys.Setting.MoveHistorySize ); |
167 | 170 | //@æª\¦X |
168 | 171 | AHandredUpDown.Position := GikoSys.Setting.HeadResCount; |
172 | + // \¦X | |
173 | + ResRangeCountUpDown.Position := GikoSys.Setting.ResRangeExCount; | |
169 | 174 | // ÖAL[[hÇÁtO |
170 | 175 | AddKeywordCheckBox.Checked := GikoSys.Setting.AddKeywordLink; |
171 | 176 | // ë½Îô |
@@ -212,7 +217,8 @@ begin | ||
212 | 217 | //@æª\¦X |
213 | 218 | GikoSys.Setting.HeadResCount := |
214 | 219 | StrToIntDef( AHandredLabeledEdit.Text , 1); |
215 | - | |
220 | + GikoSys.Setting.ResRangeExCount := | |
221 | + StrToIntDef( ResRangeLabeledEdit.Text , 100 ); | |
216 | 222 | GikoSys.Setting.KuroutSettingTabIndex := PageControl1.ActivePageIndex; |
217 | 223 | // ÖAL[[hÇÁtO |
218 | 224 | GikoSys.Setting.AddKeywordLink := AddKeywordCheckBox.Checked; |
@@ -515,4 +521,14 @@ begin | ||
515 | 521 | RespopupWaitLabeledEdit.Text := IntToStr(RespopupWaitUpDown.Max); |
516 | 522 | end; |
517 | 523 | |
524 | +procedure TKuroutOption.ResRangeLabeledEditExit(Sender: TObject); | |
525 | +begin | |
526 | + if not GikoSys.IsNumeric(ResRangeLabeledEdit.Text) then | |
527 | + ResRangeLabeledEdit.Text := '100'; | |
528 | + if StrToInt(ResRangeLabeledEdit.Text) < 100 then | |
529 | + ResRangeLabeledEdit.Text := '100'; | |
530 | + if StrToInt(ResRangeLabeledEdit.Text) > 9999 then | |
531 | + ResRangeLabeledEdit.Text := '9999'; | |
532 | +end; | |
533 | + | |
518 | 534 | end. |
@@ -253,7 +253,7 @@ object OptionDialog: TOptionDialog | ||
253 | 253 | Top = 43 |
254 | 254 | Width = 417 |
255 | 255 | Height = 20 |
256 | - ItemHeight = 12 | |
256 | + ItemHeight = 0 | |
257 | 257 | TabOrder = 0 |
258 | 258 | Text = 'BoardURLComboBox' |
259 | 259 | end |
@@ -723,7 +723,7 @@ begin | ||
723 | 723 | Ord( grrAll ): ResRangeHoldComboBox.ItemIndex := 0; |
724 | 724 | Ord( grrKoko ): ResRangeHoldComboBox.ItemIndex := 2; |
725 | 725 | Ord( grrNew ): ResRangeHoldComboBox.ItemIndex := 3; |
726 | - 100: ResRangeHoldComboBox.ItemIndex := 1; | |
726 | + 10..65535: ResRangeHoldComboBox.ItemIndex := 1; | |
727 | 727 | end; |
728 | 728 | ResRangeHoldComboBox.Enabled := GikoSys.Setting.ResRangeHold; |
729 | 729 | //^uÇÁÊu |
@@ -1013,7 +1013,7 @@ begin | ||
1013 | 1013 | GikoSys.Setting.ResRangeHold := ResRangeHoldCheckBox.Checked; |
1014 | 1014 | case ResRangeHoldComboBox.ItemIndex of |
1015 | 1015 | 0: GikoSys.Setting.ResRange := Ord( grrAll ); |
1016 | - 1: GikoSys.Setting.ResRange := 100; | |
1016 | + 1: GikoSys.Setting.ResRange := GikoSys.Setting.ResRangeExCount; | |
1017 | 1017 | 2: GikoSys.Setting.ResRange := Ord( grrKoko ); |
1018 | 1018 | 3: GikoSys.Setting.ResRange := Ord( grrNew ); |
1019 | 1019 | end; |
@@ -13,6 +13,7 @@ uses | ||
13 | 13 | type |
14 | 14 | TPreviewBrowser = class(TWebBrowser) |
15 | 15 | private |
16 | + function makeHTML(const URL, Host, Document : String): String; | |
16 | 17 | protected |
17 | 18 | procedure CreateParams(var Params: TCreateParams); override; |
18 | 19 | public |
@@ -31,6 +32,7 @@ const | ||
31 | 32 | // }EXJ[\©ç̸çµÊu |
32 | 33 | DIV_X = 15; |
33 | 34 | DIV_Y = 15; |
35 | + NICO = 'www.nicovideo.jp'; | |
34 | 36 | |
35 | 37 | constructor TPreviewBrowser.Create(AOwner: TComponent); |
36 | 38 | begin |
@@ -52,7 +54,6 @@ end; | ||
52 | 54 | } |
53 | 55 | procedure TPreviewBrowser.PreviewImage(URL : String); |
54 | 56 | var |
55 | - html : string; | |
56 | 57 | HtmlFileName : string; |
57 | 58 | sl : TStringList; |
58 | 59 | Protocol, Host, Path, Document, Port, Bookmark : string; |
@@ -62,41 +63,21 @@ var | ||
62 | 63 | PostData: OleVariant; |
63 | 64 | Headers: OleVariant; |
64 | 65 | begin |
65 | - html := '<html><head>'#13#10 | |
66 | - + '<SCRIPT>'#13#10 | |
67 | - + 'function init() {'#13#10 | |
68 | - + ' if ((document.body.clientHeight >= Image1.height) && (document.body.clientWidth >= Image1.width)) {'#13#10 | |
69 | - + ' } else {'#13#10 | |
70 | - + ' var dh, ih;'#13#10 | |
71 | - + ' dh = document.body.clientWidth / document.body.clientHeight;'#13#10 | |
72 | - + ' ih = Image1.width / Image1.height;'#13#10 | |
73 | - + ' if (document.body.clientWidth < document.body.clientHeight) {'#13#10 | |
74 | - + ' if (ih > dh)'#13#10 | |
75 | - + ' Image1.width = document.body.clientWidth;'#13#10 | |
76 | - + ' else'#13#10 | |
77 | - + ' Image1.height = document.body.clientHeight;'#13#10 | |
78 | - + ' } else {'#13#10 | |
79 | - + ' if (ih < dh)'#13#10 | |
80 | - + ' Image1.height = document.body.clientHeight;'#13#10 | |
81 | - + ' else'#13#10 | |
82 | - + ' Image1.width = document.body.clientWidth;'#13#10 | |
83 | - + ' }'#13#10 | |
84 | - + ' }'#13#10 | |
85 | - + ' Message.style.display = "none";'#13#10 | |
86 | - + '}'#13#10 | |
87 | - + '</SCRIPT>'#13#10 | |
88 | - + '</head>'#13#10 | |
89 | - + '<body topmargin="0" leftmargin="0" style="border-width: 1px; overflow:hidden; border-style: solid;" onLoad="init()">'#13#10 | |
90 | - + '<div align="center" id="Message">vr [ì¬</div>'#13#10 | |
91 | - + '<div align="center"><img name="Image1" border="0" src="%ImageURL%"></div>'#13#10 | |
92 | - + '</body></html>'; | |
93 | - | |
66 | + GikoSys.ParseURI(URL, Protocol, Host, Path, Document, Port, Bookmark); | |
67 | + Referer := Protocol + '://' + Host; | |
68 | + if Port <> '' then | |
69 | + Referer := Referer + ':' + Port; | |
70 | + Referer := Referer + Path; | |
71 | + Headers := 'Referer: ' + Referer; | |
72 | + Flags := 0; | |
73 | + TargetFrameName := ''; | |
74 | + PostData := ''; | |
75 | + | |
94 | 76 | HtmlFileName := GikoSys.GetAppDir + HTML_FILE_NAME; |
95 | 77 | sl := TStringList.Create; |
96 | 78 | try |
97 | 79 | try |
98 | - sl.Text := MojuUtils. | |
99 | - CustomStringReplace(html, '%ImageURL%', URL, False); | |
80 | + sl.Text := makeHTML(URL, Host, Document); | |
100 | 81 | sl.SaveToFile(HtmlFileName); |
101 | 82 | finally |
102 | 83 | sl.Free; |
@@ -104,15 +85,6 @@ begin | ||
104 | 85 | except |
105 | 86 | end; |
106 | 87 | |
107 | - GikoSys.ParseURI(URL, Protocol, Host, Path, Document, Port, Bookmark); | |
108 | - Referer := Protocol + '://' + Host; | |
109 | - if Port <> '' then | |
110 | - Referer := Referer + ':' + Port; | |
111 | - Referer := Referer + Path; | |
112 | - Headers := 'Referer: ' + Referer; | |
113 | - Flags := 0; | |
114 | - TargetFrameName := ''; | |
115 | - PostData := ''; | |
116 | 88 | |
117 | 89 | Navigate(HtmlFileName,Flags, TargetFrameName, PostData, Headers); |
118 | 90 |
@@ -173,4 +145,60 @@ begin | ||
173 | 145 | end; |
174 | 146 | |
175 | 147 | end; |
148 | + | |
149 | +{ | |
150 | +\breif vr [pÌHTMLð쬷é | |
151 | +\param URL vr [·éC[Wt@C | |
152 | +} | |
153 | +function TPreviewBrowser.makeHTML(const URL, Host, Document : String): String; | |
154 | +var | |
155 | + point :TPoint; | |
156 | + rect :TRect; | |
157 | +begin | |
158 | + if (Pos('http://www.nicovideo.jp/watch/', URL) <> 1) then begin | |
159 | + Result := '<html><head>'#13#10 | |
160 | + + '<SCRIPT>'#13#10 | |
161 | + + 'function init() {'#13#10 | |
162 | + + ' if ((document.body.clientHeight >= Image1.height) && (document.body.clientWidth >= Image1.width)) {'#13#10 | |
163 | + + ' } else {'#13#10 | |
164 | + + ' var dh, ih;'#13#10 | |
165 | + + ' dh = document.body.clientWidth / document.body.clientHeight;'#13#10 | |
166 | + + ' ih = Image1.width / Image1.height;'#13#10 | |
167 | + + ' if (document.body.clientWidth < document.body.clientHeight) {'#13#10 | |
168 | + + ' if (ih > dh)'#13#10 | |
169 | + + ' Image1.width = document.body.clientWidth;'#13#10 | |
170 | + + ' else'#13#10 | |
171 | + + ' Image1.height = document.body.clientHeight;'#13#10 | |
172 | + + ' } else {'#13#10 | |
173 | + + ' if (ih < dh)'#13#10 | |
174 | + + ' Image1.height = document.body.clientHeight;'#13#10 | |
175 | + + ' else'#13#10 | |
176 | + + ' Image1.width = document.body.clientWidth;'#13#10 | |
177 | + + ' }'#13#10 | |
178 | + + ' }'#13#10 | |
179 | + + ' Message.style.display = "none";'#13#10 | |
180 | + + '}'#13#10 | |
181 | + + '</SCRIPT>'#13#10 | |
182 | + + '</head>'#13#10 | |
183 | + + '<body topmargin="0" leftmargin="0" style="border-width: 1px; overflow:hidden; border-style: solid;" onLoad="init()">'#13#10 | |
184 | + + '<div align="center" id="Message">vr [ì¬</div>'#13#10 | |
185 | + + '<div align="center"><img name="Image1" border="0" src="' + URL + '"></div>'#13#10 | |
186 | + + '</body></html>'; | |
187 | + end else begin | |
188 | + // <div><iframe width="340" height="185" src="http://www.nicovideo.jp/thumb/sm2494604" scrolling="no" style="border:solid 1px #CCC;" frameborder="0"></iframe></div><div class=link_nicovideo_title><a href="" title="" target="_blank"></a></div> | |
189 | + rect := GetWindowRect(point); | |
190 | + | |
191 | + Result := '<html><head>'#13#10 | |
192 | + + '<SCRIPT>'#13#10 | |
193 | + + 'function init() {'#13#10 | |
194 | + + ' Message.style.display = "none";'#13#10 | |
195 | + + '}'#13#10 | |
196 | + + '</SCRIPT>'#13#10 | |
197 | + + '</head>'#13#10 | |
198 | + + '<body topmargin="0" leftmargin="0" style="border-width: 1px; overflow:hidden; border-style: solid;" onLoad="init()">'#13#10 | |
199 | + + '<div align="center" id="Message">vr [ì¬</div>'#13#10 | |
200 | + + '<div><iframe width="' + IntToStr(rect.Right - rect.Left) +'" height="' + IntToStr(rect.Bottom - rect.Top) + '" src="http://' + Host + '/thumb/' + Document + '" scrolling="no" style="border:solid 1px #CCC;" frameborder="0"></iframe></div>' | |
201 | + + '</body></html>'; | |
202 | + end; | |
203 | +end; | |
176 | 204 | end. |
@@ -440,6 +440,8 @@ type | ||
440 | 440 | FLoopBrowserTabs : Boolean; |
441 | 441 | //! 100X\¦Ìæª\¦X |
442 | 442 | FHeadResCount : Integer; |
443 | + //! 100X\¦ig£pj | |
444 | + FResRangeExCount: Integer; | |
443 | 445 | //! ÖAL[[hÇÁtO |
444 | 446 | FAddKeywordLink: Boolean; |
445 | 447 | //! datu·ðLøÉ·é |
@@ -810,6 +812,8 @@ type | ||
810 | 812 | property LoopBrowserTabs : Boolean read FLoopBrowserTabs write FLoopBrowserTabs; |
811 | 813 | //! 100X\¦Ìæª\¦X |
812 | 814 | property HeadResCount : Integer read FHeadResCount write FHeadResCount; |
815 | + //! 100X\¦ig£pj | |
816 | + property ResRangeExCount: Integer read FResRangeExCount write FResRangeExCount; | |
813 | 817 | //! ÖAL[[hÇÁtO |
814 | 818 | property AddKeywordLink: Boolean read FAddKeywordLink write FAddKeywordLink; |
815 | 819 | //! datÌu·ðLøÉ·é© |
@@ -1127,6 +1131,7 @@ begin | ||
1127 | 1131 | FResRange := ini.ReadInteger( 'Thread', 'ResRange', Ord( grrAll ) ); |
1128 | 1132 | FResRangeHold := ini.ReadBool( 'Thread', 'ResRangeHold', False ); |
1129 | 1133 | FHeadResCount := ini.ReadInteger('Thread', 'HeadResCount', 1); |
1134 | + FResRangeExCount:= ini.ReadInteger('Thread','ResRangeExCount', 100); | |
1130 | 1135 | // Xbhê\¦ÍÍ |
1131 | 1136 | FThreadRange := TGikoThreadRange( ini.ReadInteger('ThreadList', 'ThreadRange', Ord( gtrAll )) ); |
1132 | 1137 | //ñANeBuX|bvAbv\¦ |
@@ -1531,6 +1536,7 @@ begin | ||
1531 | 1536 | ini.WriteInteger('Thread', 'ResRange', FResRange); |
1532 | 1537 | ini.WriteBool('Thread', 'ResRangeHold', FResRangeHold); |
1533 | 1538 | ini.WriteInteger('Thread', 'HeadResCount', FHeadResCount); |
1539 | + ini.WriteInteger('Thread','ResRangeExCount', FResRangeExCount); | |
1534 | 1540 | // Xbhê\¦ÍÍ |
1535 | 1541 | ini.WriteInteger('ThreadList', 'ThreadRange', Ord( FThreadRange )); |
1536 | 1542 | //OímF |
@@ -80,7 +80,7 @@ const | ||
80 | 80 | CHECK_URL = 'http://gikonavi.sourceforge.jp/updater/latest.txt'; |
81 | 81 | {$ENDIF} |
82 | 82 | var |
83 | - value : string; | |
83 | + value, url : string; | |
84 | 84 | ResStream: TMemoryStream; |
85 | 85 | downResult, current, newest: TStringList; |
86 | 86 | newgiko: Boolean; |
@@ -129,8 +129,10 @@ begin | ||
129 | 129 | newgiko := false; |
130 | 130 | // night buildÍArhÔ¾¯Å»è·é |
131 | 131 | if (nightbuild) then begin |
132 | + url := downResult.Values[ 'n_url' ]; | |
132 | 133 | newgiko := StrToInt(current[3]) < StrToInt(newest[3]); |
133 | 134 | end else begin |
135 | + url := downResult.Values[ 'url' ]; | |
134 | 136 | newgiko := ( StrToInt(current[1]) < StrToInt(newest[1]) ) or |
135 | 137 | ( (StrToInt(current[1]) = StrToInt(newest[1]))) and |
136 | 138 | ((StrToInt(current[2]) < StrToInt(newest[2])) ); |
@@ -138,9 +140,8 @@ begin | ||
138 | 140 | if (newgiko) then begin |
139 | 141 | if GikoUtil.MsgBox(Handle, 'Vµ¢MRirª èÜ·B_E[hµÜ·©H', 'XVmF', |
140 | 142 | MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) = ID_YES then begin |
141 | - | |
142 | - ResultMemo.Lines.Add('Vµ¢MRirª èÜ·B_E[hðJnµÜ·B' + downResult.Values[ 'url' ]); | |
143 | - DonwloadUpdate(Trim(downResult.Values[ 'url' ])); | |
143 | + ResultMemo.Lines.Add('Vµ¢MRirª èÜ·B_E[hðJnµÜ·B' + url); | |
144 | + DonwloadUpdate(Trim(url)); | |
144 | 145 | Result := True; |
145 | 146 | end; |
146 | 147 | end else begin |
@@ -13,8 +13,8 @@ SourceDir=G:\Release | ||
13 | 13 | OutputDir=G:\InnoSetup\Output |
14 | 14 | SetupIconFile="G:\gikoNaviSFX_102\MainIcon.ico" |
15 | 15 | ; MRirÌo[WÉ í¹Ä¾³¢ |
16 | -VersionInfoVersion=1.58.1.764 | |
17 | -OutputBaseFilename=gikoNavi_b58_setup | |
16 | +VersionInfoVersion=1.59.1.778 | |
17 | +OutputBaseFilename=gikoNavi_b59_setup | |
18 | 18 | |
19 | 19 | |
20 | 20 | [Tasks] |
@@ -18,8 +18,8 @@ SourceDir=G:\Release | ||
18 | 18 | OutputDir=G:\InnoSetup\Output |
19 | 19 | SetupIconFile="G:\gikoNaviSFX_102\MainIcon.ico" |
20 | 20 | ; MRirÌo[WÉ í¹Ä¾³¢ |
21 | -VersionInfoVersion=1.59.0.778 | |
22 | -OutputBaseFilename=gikoNavi_b59_778_usetup | |
21 | +VersionInfoVersion=1.60.0.779 | |
22 | +OutputBaseFilename=gikoNavi_b60_779_usetup | |
23 | 23 | CreateUninstallRegKey=no |
24 | 24 | |
25 | 25 | [Tasks] |
@@ -1,4 +1,4 @@ | ||
1 | -¡MRir Version1.00 ÊÞÀ59 Readme.txt | |
1 | +¡MRir Version1.00 ÊÞÀ60 Readme.txt | |
2 | 2 | |
3 | 3 | |
4 | 4 | ------------------------------ |
@@ -108,8 +108,19 @@ LICENSE | ||
108 | 108 | ------------------------------ |
109 | 109 | ð |
110 | 110 | ------------------------------ |
111 | -2008/XX/XX | |
111 | +2009/XX/YY | |
112 | + Version ÊÞÀ60 | |
113 | + | |
114 | + | |
115 | +2009/02/01 | |
112 | 116 | Version ÊÞÀ59 |
117 | + X{¶ÉA^OÈOÌ^OªÜÜêéÆAX|bvAbvÅA{¶ª¯ésïÌC³ | |
118 | + MRirXV@\ÇÁ | |
119 | + CtH[ÅpµÄ¢éACRÌæð·µÖ¦êéæ¤ÉC³ | |
120 | + Û¶µ½^uÌOª¶ÝµÈ¢êɱ¯éâèÌC³ | |
121 | + RoundBoard.2chARoundItem.2chÌàeªPsàÈ¢êNbV ·éoOÌC³ | |
122 | + OñeÆIPAhXizXg¼jªÏíÁÄ¢éÆ«ÉACookieîñªóÉÈésïÌC³ | |
123 | + µ½çÎJBBSÌßOÅAeú+IDÌOÉ"eúF"̶ñªÈ¢êÉÎ | |
113 | 124 | |
114 | 125 | 2008/09/16 |
115 | 126 | Version ÊÞÀ58 |