• R/O
  • HTTP
  • SSH
  • HTTPS

gikonavi: Commit


Commit MetaInfo

Revision1e76a16945e73d9dade784b42d11f176f12f4e93 (tree)
Time2007-05-06 17:02:08
Authorcvs2git <cvs2git>
Commitercvs2git

Log Message

This commit was manufactured by cvs2svn to create branch 'bRESPOPUP'.

Change Summary

Incremental Difference

--- a/BrowserRecord.pas
+++ b/BrowserRecord.pas
@@ -30,7 +30,8 @@ type
3030 property LastSize : Integer read FLastSize write FLastSize;
3131 property Repaint : Boolean read FRepaint write FRepaint;
3232 //property Movement : string read FMovement write FMovement;
33- procedure Move(const AName: string);
33+ procedure Move(const AName: string); overload;
34+ procedure Move(scroll: Integer); overload;
3435 procedure IDAnchorPopup(Abody :string);
3536 procedure OpenFindDialog;
3637 end;
@@ -109,6 +110,29 @@ begin
109110 end;
110111 end;
111112 end;
113+// *************************************************************************
114+//! ブラウザをスクロールさせる
115+// *************************************************************************
116+procedure TBrowserRecord.Move(scroll: Integer);
117+begin
118+ //ブラウザが付いてるときだけ処理する
119+ if (Self.Browser <> nil) then begin
120+ //ブラウザがデータの読み込み中の時は読み込みを待つ
121+ while (Self.Browser.ReadyState <> READYSTATE_COMPLETE) and
122+ (Self.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
123+ Sleep(1);
124+ Application.ProcessMessages;
125+ end;
126+
127+ try
128+ OleVariant(Self.Browser.Document as IHTMLDocument2).body.scrollTop
129+ := OleVariant(Self.Browser.Document as IHTMLDocument2).body.scrollTop
130+ + scroll;
131+ except
132+ end;
133+ end;
134+end;
135+
112136 //IDアンカー追加
113137 procedure TBrowserRecord.IDAnchorPopup(Abody :string);
114138 const
--- a/Giko.dfm
+++ b/Giko.dfm
@@ -5284,6 +5284,13 @@ object GikoForm: TGikoForm
52845284 object N37: TMenuItem
52855285 Caption = '-'
52865286 end
5287+ object SameBoardThreadItem: TMenuItem
5288+ Caption = #21516#26495#12391#34920#31034#12375#12390#12356#12427#12473#12524#12483#12489
5289+ Hint = #21516#26495#12391#34920#31034#12375#12390#12427#12473#12524#12483#12489
5290+ end
5291+ object N81: TMenuItem
5292+ Caption = '-'
5293+ end
52875294 object Close1: TMenuItem
52885295 Action = GikoDM.BrowserTabCloseAction
52895296 end
--- a/Giko.pas
+++ b/Giko.pas
@@ -417,6 +417,8 @@ type
417417 HTML1: TMenuItem;
418418 DAT4: TMenuItem;
419419 N80: TMenuItem;
420+ SameBoardThreadItem: TMenuItem;
421+ N81: TMenuItem;
420422 procedure FormCreate(Sender: TObject);
421423 procedure FormDestroy(Sender: TObject);
422424 procedure BrowserStatusTextChange(Sender: TObject;
@@ -680,6 +682,10 @@ type
680682 procedure ShowEditors(nCmdShow: Integer);
681683 //! もっとも古いBrowserの開放
682684 procedure ReleaseOldestBrowser;
685+ //! アクティブなタブと同じ板の開いているスレッドをメニューアイテムに追加
686+ procedure AddMenuSameBoardThread;
687+ //! アクティブなタブと同じ板の開いているスレッドクリックイベント
688+ procedure SameBoardThreadSubItemOnClick(Sender: TObject);
683689 protected
684690 procedure CreateParams(var Params: TCreateParams); override;
685691 procedure WndProc(var Message: TMessage); override;
@@ -768,7 +774,9 @@ type
768774 // タブ削除(実装部)
769775 procedure DeleteTab(index, selectIndex: Integer); overload;
770776 //現在表示しているスレッドをスクロール
771- procedure BrowserMovement(const AName: string);
777+ procedure BrowserMovement(const AName: string); overload;
778+ //現在表示しているスレッドをスクロール
779+ procedure BrowserMovement(scroll: Integer); overload;
772780 //ApplicationのMainFormを取得する
773781 function GetMainForm(): TComponent;
774782 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
@@ -3411,7 +3419,14 @@ begin
34113419 FActiveContent.Move(AName);
34123420 end;
34133421 end;
3414-
3422+//現在表示しているスレッドをスクロール
3423+procedure TGikoForm.BrowserMovement(scroll: Integer);
3424+begin
3425+ if(BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex >= 0)
3426+ and (FActiveContent <> nil) then begin
3427+ FActiveContent.Move(scroll);
3428+ end;
3429+end;
34153430 procedure TGikoForm.TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
34163431 begin
34173432 if TObject(Node.Data) is TBBS then begin
@@ -6222,8 +6237,61 @@ end;
62226237 procedure TGikoForm.BrowserTabPopupMenuPopup(Sender: TObject);
62236238 begin
62246239 AddRoundNameMenu(dummy1);
6240+ AddMenuSameBoardThread;
6241+end;
6242+//! アクティブなタブと同じ板の開いているスレッドをメニューアイテムに追加
6243+procedure TGikoForm.AddMenuSameBoardThread;
6244+var
6245+ i: Integer;
6246+ Item: TMenuItem;
6247+begin
6248+ SameBoardThreadItem.Clear;
6249+ for i := 0 to BrowserTab.Tabs.Count - 1 do begin
6250+ // 同じ板かどうか
6251+ if (FActiveContent.Thread.ParentBoard =
6252+ TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ParentBoard) then begin
6253+ // 自分は外す
6254+ if FActiveContent.Thread <>
6255+ TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread then begin
6256+ Item := TMenuItem.Create(Self);
6257+ Item.Caption := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.Title;
6258+ Item.OnClick := SameBoardThreadSubItemOnClick;
6259+ SameBoardThreadItem.Add(Item);
6260+ end;
6261+ end;
6262+ end;
6263+ // 何も無いなら使用できないようにする
6264+ SameBoardThreadItem.Enabled := SameBoardThreadItem.Count > 0;
6265+end;
6266+//! アクティブなタブと同じ板の開いているスレッドクリックイベント
6267+procedure TGikoForm.SameBoardThreadSubItemOnClick(Sender: TObject);
6268+var
6269+ i, j: Integer;
6270+ MenuItem: TMenuItem;
6271+begin
6272+ if Sender is TMenuItem then begin
6273+ try
6274+ j := 0;
6275+ MenuItem := TMenuItem(Sender);
6276+ for i := 0 to BrowserTab.Tabs.Count - 1 do begin
6277+ // 同じ板かどうか
6278+ if (FActiveContent.Thread.ParentBoard =
6279+ TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ParentBoard) then begin
6280+ if FActiveContent.Thread <>
6281+ TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread then begin
6282+ if (SameBoardThreadItem.Items[j] = MenuItem) then begin
6283+ MoveToURL( TBrowserRecord(BrowserTab.Tabs.Objects[i])
6284+ .Thread.URL);
6285+ Exit;
6286+ end;
6287+ Inc(j);
6288+ end;
6289+ end;
6290+ end;
6291+ except
6292+ end;
6293+ end;
62256294 end;
6226-
62276295 procedure TGikoForm.FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
62286296 begin
62296297 FavoriteDM.URLReplace(oldURLs, newURLs);
@@ -6427,7 +6495,10 @@ begin
64276495 TreeDoubleClick( TreeView.Selected );
64286496 end else if Key = VK_RETURN then begin
64296497 TreeClick( TreeView.Selected );
6430- TreeView.Selected.Expanded := not TreeView.Selected.Expanded;
6498+ // 履歴の場合、消されているのでチェックする
6499+ if (TreeView.Selected <> nil) then begin
6500+ TreeView.Selected.Expanded := not TreeView.Selected.Expanded;
6501+ end;
64316502 end;
64326503 end;
64336504 //! お気に入りのMouseDownイベント
--- a/GikoDataModule.dfm
+++ b/GikoDataModule.dfm
@@ -448,6 +448,20 @@ object GikoDM: TGikoDM
448448 OnExecute = ScrollKokoActionExecute
449449 OnUpdate = ScrollKokoActionUpdate
450450 end
451+ object ScrollPageDownAction: TAction
452+ Category = #12473#12524#12483#12489
453+ Caption = #27425#12506#12540#12472
454+ Hint = #27425#12506#12540#12472#12473#12463#12525#12540#12523
455+ OnExecute = ScrollPageDownActionExecute
456+ OnUpdate = DependActiveCntentActionUpdate
457+ end
458+ object ScrollPageUpAction: TAction
459+ Category = #12473#12524#12483#12489
460+ Caption = #21069#12506#12540#12472#12473#12463#12525#12540#12523
461+ Hint = #21069#12506#12540#12472#12473#12463#12525#12540#12523
462+ OnExecute = ScrollPageUpActionExecute
463+ OnUpdate = DependActiveCntentActionUpdate
464+ end
451465 object EditorAction: TAction
452466 Category = #12473#12524#12483#12489
453467 Caption = #12524#12473#26360#12365#36796#12415'(&R)'
@@ -1316,6 +1330,20 @@ object GikoDM: TGikoDM
13161330 Caption = 'NG'#12527#12540#12489#32232#38598#12501#12457#12540#12512
13171331 Hint = 'NG'#12527#12540#12489#32232#38598#12501#12457#12540#12512#12458#12540#12503#12531
13181332 end
1333+ object AllLinkToClipboardAction: TAction
1334+ Category = #12473#12524#12483#12489
1335+ Caption = #12522#12531#12463'URL'#21462#24471
1336+ Hint = #12522#12531#12463'URL'#21462#24471
1337+ OnExecute = AllLinkToClipboardActionExecute
1338+ OnUpdate = DependActiveCntentActionUpdate
1339+ end
1340+ object NewLinkToClipboardAction: TAction
1341+ Category = #12473#12524#12483#12489
1342+ Caption = #26032#30528#12524#12473#12522#12531#12463'URL'#21462#24471
1343+ Hint = #26032#30528#12524#12473#12522#12531#12463'URL'#21462#24471
1344+ OnExecute = NewLinkToClipboardActionExecute
1345+ OnUpdate = DependActiveCntentActionUpdate
1346+ end
13191347 end
13201348 object ToobarImageList: TImageList
13211349 Left = 44
--- a/GikoDataModule.pas
+++ b/GikoDataModule.pas
@@ -232,6 +232,10 @@ type
232232 SetForcusForAddresBarAction: TAction;
233233 NewBoardSearchAction: TAction;
234234 NGWordEditFormAction: TAction;
235+ ScrollPageDownAction: TAction;
236+ ScrollPageUpAction: TAction;
237+ AllLinkToClipboardAction: TAction;
238+ NewLinkToClipboardAction: TAction;
235239 procedure EditNGActionExecute(Sender: TObject);
236240 procedure ReloadActionExecute(Sender: TObject);
237241 procedure GoFowardActionExecute(Sender: TObject);
@@ -435,6 +439,10 @@ type
435439 procedure AllImageLinkToClipbordActionExecute(Sender: TObject);
436440 procedure SetForcusForAddresBarActionExecute(Sender: TObject);
437441 procedure NewBoardSearchActionExecute(Sender: TObject);
442+ procedure ScrollPageDownActionExecute(Sender: TObject);
443+ procedure ScrollPageUpActionExecute(Sender: TObject);
444+ procedure AllLinkToClipboardActionExecute(Sender: TObject);
445+ procedure NewLinkToClipboardActionExecute(Sender: TObject);
438446 private
439447 { Private 宣言 }
440448 procedure ClearResFilter;
@@ -453,8 +461,8 @@ type
453461 procedure MoveURLWithHistory(URL : String);
454462 procedure BackToHistory(item: TMoveHistoryItem);
455463 function GetActiveThreadLinks : IHTMLElementCollection;
456- procedure GetImageLinkURLs(links : IHTMLElementCollection;
457- URLs : TStringList; const Start: Integer);
464+ procedure GetLinkURLs(links : IHTMLElementCollection;
465+ URLs : TStringList; const Start: Integer; Exts : TStringList);
458466 public
459467 { Public 宣言 }
460468 procedure RepaintStatusBar;
@@ -4211,15 +4219,21 @@ end;
42114219 procedure TGikoDM.AllImageLinkToClipbordActionExecute(Sender: TObject);
42124220 var
42134221 links : IHTMLElementCollection;
4214- urls : TStringList;
4222+ urls, exts : TStringList;
42154223 begin
42164224 links := GetActiveThreadLinks;
42174225 if (links <> nil) then begin
42184226 urls := TStringList.Create;
4227+ exts := TStringList.Create;
42194228 try
4220- GetImageLinkURLs(links, urls, 0);
4229+ exts.CaseSensitive := False;
4230+ exts.Sorted := True;
4231+ exts.Delimiter := ';';
4232+ exts.DelimitedText := '.gif;.jpg;.jpeg;.png';
4233+ GetLinkURLs(links, urls, 0, exts);
42214234 Clipboard.SetTextBuf(urls.GetText);
42224235 finally
4236+ exts.Free;
42234237 urls.Free;
42244238 end;
42254239 end;
@@ -4232,22 +4246,87 @@ end;
42324246 procedure TGikoDM.NewImageLinkToClipBoardActionExecute(Sender: TObject);
42334247 var
42344248 links : IHTMLElementCollection;
4235- urls : TStringList;
4249+ urls, exts : TStringList;
42364250 ThreadItem : TThreadItem;
42374251 begin
42384252 ThreadItem := GikoForm.GetActiveContent;
42394253 links := GetActiveThreadLinks;
42404254 if (ThreadItem <> nil) and (links <> nil) then begin
42414255 urls := TStringList.Create;
4256+ exts := TStringList.Create;
42424257 try
4243- GetImageLinkURLs(links, urls,
4244- (ThreadItem.Count - ThreadItem.NewResCount + 1) );
4258+ exts.CaseSensitive := False;
4259+ exts.Sorted := True;
4260+ exts.Delimiter := ';';
4261+ exts.DelimitedText := '.gif;.jpg;.jpeg;.png';
4262+
4263+ GetLinkURLs(links, urls,
4264+ (ThreadItem.Count - ThreadItem.NewResCount + 1), exts );
4265+ Clipboard.SetTextBuf(urls.GetText);
4266+ finally
4267+ exts.Free;
4268+ urls.Free;
4269+ end;
4270+ end;
4271+end;
4272+{
4273+\breif リンクURL取得
4274+対象拡張子は、詳細設定で設定されている
4275+}
4276+procedure TGikoDM.AllLinkToClipboardActionExecute(Sender: TObject);
4277+var
4278+ links : IHTMLElementCollection;
4279+ urls, exts : TStringList;
4280+begin
4281+ links := GetActiveThreadLinks;
4282+ if (links <> nil) then begin
4283+ urls := TStringList.Create;
4284+ exts := TStringList.Create;
4285+ try
4286+ exts.CaseSensitive := False;
4287+ exts.Sorted := True;
4288+ exts.Delimiter := ';';
4289+ exts.DelimitedText :=
4290+ MojuUtils.CustomStringReplace(GikoSys.Setting.ExtList, '*', '');
4291+ GetLinkURLs(links, urls, 0, exts);
4292+ Clipboard.SetTextBuf(urls.GetText);
4293+ finally
4294+ exts.Free;
4295+ urls.Free;
4296+ end;
4297+ end;
4298+end;
4299+{
4300+\breif 新着レスリンクURL取得
4301+対象拡張子は、詳細設定で設定されている
4302+}
4303+procedure TGikoDM.NewLinkToClipboardActionExecute(Sender: TObject);
4304+var
4305+ links : IHTMLElementCollection;
4306+ urls, exts : TStringList;
4307+ ThreadItem : TThreadItem;
4308+begin
4309+ ThreadItem := GikoForm.GetActiveContent;
4310+ links := GetActiveThreadLinks;
4311+ if (ThreadItem <> nil) and (links <> nil) then begin
4312+ urls := TStringList.Create;
4313+ exts := TStringList.Create;
4314+ try
4315+ exts.CaseSensitive := False;
4316+ exts.Sorted := True;
4317+ exts.Delimiter := ';';
4318+ exts.DelimitedText :=
4319+ MojuUtils.CustomStringReplace(GikoSys.Setting.ExtList, '*', '');
4320+ GetLinkURLs(links, urls,
4321+ (ThreadItem.Count - ThreadItem.NewResCount + 1), exts );
42454322 Clipboard.SetTextBuf(urls.GetText);
42464323 finally
4324+ exts.Free;
42474325 urls.Free;
42484326 end;
42494327 end;
42504328 end;
4329+
42514330 {
42524331 \brief 現在表示しているスレッドのすべてのリンクを取得する。
42534332 \return IHTMLElementCollection リンクのコレクション
@@ -4274,15 +4353,16 @@ begin
42744353 end;
42754354 end;
42764355 {
4277-\brief イメージへのリンクのURLを取得する
4356+\brief リンクのURLを取得する
42784357 \param links 取得するリンクの全体のコレクション
42794358 \param URLs 取得したURLの保存先
42804359 \param Start 設定したレス番号以降を取得( > 0)
4360+\param Exts 取得するリンクの拡張子
42814361 }
4282-procedure TGikoDM.GetImageLinkURLs(links : IHTMLElementCollection;
4283- URLs : TStringList; const Start: Integer);
4362+procedure TGikoDM.GetLinkURLs(links : IHTMLElementCollection;
4363+ URLs : TStringList; const Start: Integer; Exts : TStringList);
42844364 var
4285- index ,i : Integer;
4365+ index ,i, j : Integer;
42864366 item : IHTMLElement;
42874367 url, ext : string;
42884368 begin
@@ -4301,9 +4381,8 @@ begin
43014381 // 開始レス番号以降かチェック
43024382 if (index >= Start) then begin
43034383 ext := ExtractFileExt( AnsiLowerCase(url) );
4304- // jpg,jpeg,gif,pngをチェック
4305- if (ext = '.jpg') or (ext = '.jpeg') or
4306- (ext = '.gif') or (ext = '.png') then begin
4384+ // 拡張子をチェック
4385+ if Exts.Find(ext, j) then begin
43074386 urls.Add(url)
43084387 end;
43094388 end;
@@ -4342,6 +4421,18 @@ begin
43424421 form.Release;
43434422 end;
43444423 end;
4424+//! ブラウザを1ページ分スクロールさせる
4425+procedure TGikoDM.ScrollPageDownActionExecute(Sender: TObject);
4426+begin
4427+ GikoForm.BrowserMovement(GikoForm.BrowserPanel.Height);
4428+end;
4429+//! ブラウザを1ページ分スクロールさせる
4430+procedure TGikoDM.ScrollPageUpActionExecute(Sender: TObject);
4431+begin
4432+ GikoForm.BrowserMovement(-GikoForm.BrowserPanel.Height);
4433+end;
4434+
4435+
43454436
43464437 end.
43474438
--- a/GikoSystem.pas
+++ b/GikoSystem.pas
@@ -116,6 +116,8 @@ type
116116 function ChooseString(const Text, Separator: string; Index: integer): string;
117117 //! 一時ファイルからの復旧
118118 procedure RestoreThreadData(Board: TBoard);
119+ //! インデックスにないdat(はぐれdat)の追加
120+ procedure AddOutofIndexDat(Board: TBoard; DatList: TStringList);
119121 public
120122 { Public 宣言 }
121123 FAbon : TAbon;
@@ -264,7 +266,7 @@ const
264266 ZERO_DATE: Integer = 25569;
265267 BETA_VERSION_NAME_E = 'beta';
266268 BETA_VERSION_NAME_J = 'バタ';
267- BETA_VERSION = 55;
269+ BETA_VERSION = 56;
268270 BETA_VERSION_BUILD = ''; //!< debug版など
269271 APP_NAME = 'gikoNavi';
270272 BE_PHP_URL = 'http://be.2ch.net/test/p.php?i=';
@@ -567,10 +569,7 @@ var
567569 i: Integer;
568570 Rec: TIndexRec;
569571 UnRead: Integer;
570- ResRec: TResRec;
571572 usePlugIn : Boolean;
572- BoardPath : String;
573- server : String;
574573 islog : Boolean;
575574 urlHead: String;
576575 {*
@@ -583,7 +582,13 @@ begin
583582 Board.Clear;
584583 UnRead := 0;
585584 usePlugIn := Board.IsBoardPlugInAvailable;
586- server := UrlToServer( Board.URL );
585+ //server := UrlToServer( Board.URL );
586+ // スレッドで共通のURL部
587+ if Board.is2ch then begin
588+ urlHead := UrlToServer( Board.URL ) + 'test/read.cgi/' + Board.BBSID + '/';
589+ end else begin
590+ urlHead := UrlToServer( Board.URL ) + 'test/read.cgi?bbs=' + Board.BBSID + '&key=';
591+ end;
587592
588593 FileName := Board.GetFolderIndexFileName;
589594
@@ -597,17 +602,10 @@ begin
597602 // 重複を防ぐ
598603 Board.BeginUpdate;
599604 Board.Sorted := True;
600-
601605 sl := TStringList.Create;
602606 try
603607 if FileExists(FileName) then begin
604608 sl.LoadFromFile(FileName);
605- // スレッドで共通のURL部
606- if Board.is2ch then begin
607- urlHead := server + 'test/read.cgi/' + Board.BBSID + '/';
608- end else begin
609- urlHead := server + 'test/read.cgi?bbs=' + Board.BBSID + '&key=';
610- end;
611609 //2行目から(1行目はバージョン)
612610 for i := sl.Count - 1 downto 1 do begin
613611 Rec := ParseIndexLine(sl[i]);
@@ -665,7 +663,7 @@ begin
665663 ThreadItem.EndUpdate;
666664 Board.Add(ThreadItem);
667665
668- if (ThreadItem.IsLogFile) and (ThreadItem.UnRead) then
666+ if (ThreadItem.UnRead) and (ThreadItem.IsLogFile) then
669667 Inc(UnRead);
670668 end;
671669 end;
@@ -673,50 +671,10 @@ begin
673671 if UnRead <> Board.UnRead then
674672 Board.UnRead := UnRead;
675673
676- Boardpath := ExtractFilePath(Board.GetFolderIndexFileName);
677674 //インデックスに無かったログを追加(腐れインデックス対応)
678- for i := 0 to FileList.Count - 1 do begin
679- FileName := Boardpath + FileList[i];
680-
681- //ResRec := DivideStrLine(ReadThreadFile(FileName, 1));
682- if usePlugIn then begin
683- ThreadItem := TThreadItem.Create(
684- Board.BoardPlugIn,
685- Board,
686- Board.BoardPlugIn.FileName2ThreadURL( DWORD( Board ), FileList[i] ) );
687- THTMLCreate.DivideStrLine(Board.BoardPlugIn.GetDat( DWORD( ThreadItem ), 1 ), @ResRec);
688- end else begin
689- ThreadItem := TThreadItem.Create(
690- nil,
691- Board,
692- Get2chBoard2ThreadURL( Board, ChangeFileExt( FileList[i], '' ) ) );
693- THTMLCreate.DivideStrLine(ReadThreadFile(FileName, 1), @ResRec);
694- end;
695-
696- ThreadItem.BeginUpdate;
697- ThreadItem.FileName := FileList[i];
698- //ThreadItem.FilePath := FileName;
699- ThreadItem.No := Board.Count + 1;
700- ThreadItem.Title := ResRec.FTitle;
701- ThreadItem.Count := GetFileLineCount(FileName);
702- ThreadItem.AllResCount := ThreadItem.Count;
703- ThreadItem.NewResCount := ThreadItem.Count;
704- ThreadItem.Size := GetFileSize(FileName) - ThreadItem.Count;//1byteずれるときがあるけどそれはあきらめる
705- ThreadItem.RoundDate := FileDateToDateTime( FileAge( FileName ) );
706- ThreadItem.LastModified := ThreadItem.RoundDate;
707- ThreadItem.Kokomade := -1;
708- ThreadItem.NewReceive := 0;
709- ThreadItem.ParentBoard := Board;
710- ThreadItem.IsLogFile := True;
711- ThreadItem.Round := False;
712- ThreadItem.UnRead := False;
713- ThreadItem.ScrollTop := 0;
714- ThreadItem.AgeSage := gasNone;
715- ThreadItem.EndUpdate;
716- Board.Add(ThreadItem);
717- end;
675+ AddOutofIndexDat(Board, FileList);
718676 Board.EndUpdate;
719-
677+
720678 //前回異常終了時チェック
721679 RestoreThreadData( Board );
722680 finally
@@ -726,7 +684,61 @@ begin
726684 end;
727685 Board.IsThreadDatRead := True;
728686 end;
729-
687+{!
688+\brief インデックスにないdat(はぐれdat)の追加
689+\param Board 追加する板
690+\param DatList datファイル名
691+}
692+procedure TGikoSys.AddOutofIndexDat(Board: TBoard; DatList: TStringList);
693+var
694+ i : Integer;
695+ Boardpath,FileName : String;
696+ ResRec: TResRec;
697+ ThreadItem: TThreadItem;
698+begin
699+ Boardpath := ExtractFilePath(Board.GetFolderIndexFileName);
700+ //インデックスに無かったログを追加(腐れインデックス対応)
701+ for i := 0 to DatList.Count - 1 do begin
702+ FileName := Boardpath + DatList[i];
703+
704+ //ResRec := DivideStrLine(ReadThreadFile(FileName, 1));
705+ if Board.IsBoardPlugInAvailable then begin
706+ ThreadItem := TThreadItem.Create(
707+ Board.BoardPlugIn,
708+ Board,
709+ Board.BoardPlugIn.FileName2ThreadURL( DWORD( Board ), DatList[i] ) );
710+ THTMLCreate.DivideStrLine(Board.BoardPlugIn.GetDat( DWORD( ThreadItem ), 1 ), @ResRec);
711+ end else begin
712+ ThreadItem := TThreadItem.Create(
713+ nil,
714+ Board,
715+ Get2chBoard2ThreadURL( Board, ChangeFileExt( DatList[i], '' ) ) );
716+ THTMLCreate.DivideStrLine(ReadThreadFile(FileName, 1), @ResRec);
717+ end;
718+
719+ ThreadItem.BeginUpdate;
720+ ThreadItem.FileName := DatList[i];
721+ //ThreadItem.FilePath := FileName;
722+ ThreadItem.No := Board.Count + 1;
723+ ThreadItem.Title := ResRec.FTitle;
724+ ThreadItem.Count := GetFileLineCount(FileName);
725+ ThreadItem.AllResCount := ThreadItem.Count;
726+ ThreadItem.NewResCount := ThreadItem.Count;
727+ ThreadItem.Size := GetFileSize(FileName) - ThreadItem.Count;//1byteずれるときがあるけどそれはあきらめる
728+ ThreadItem.RoundDate := FileDateToDateTime( FileAge( FileName ) );
729+ ThreadItem.LastModified := ThreadItem.RoundDate;
730+ ThreadItem.Kokomade := -1;
731+ ThreadItem.NewReceive := 0;
732+ ThreadItem.ParentBoard := Board;
733+ ThreadItem.IsLogFile := True;
734+ ThreadItem.Round := False;
735+ ThreadItem.UnRead := False;
736+ ThreadItem.ScrollTop := 0;
737+ ThreadItem.AgeSage := gasNone;
738+ ThreadItem.EndUpdate;
739+ Board.Add(ThreadItem);
740+ end;
741+end;
730742 {!
731743 \brief スレッドインデックスファイル(Folder.idx)作成
732744 \param Board Folder.idx を作成する板
@@ -885,21 +897,21 @@ end;
885897 }
886898 function TGikoSys.ParseIndexLine(Line: string): TIndexRec;
887899 begin
888- Result.FNo := StrToIntDef('$' + RemoveToken(Line, #1), 0);
889- Result.FFileName := RemoveToken(Line, #1);
890- Result.FTitle := MojuUtils.UnSanitize(RemoveToken(Line, #1));
891- Result.FCount := StrToIntDef('$' + RemoveToken(Line, #1), 0);
892- Result.FSize := StrToIntDef('$' + RemoveToken(Line, #1), 0);
893- Result.FRoundDate := IntToDateTime(StrToIntDef('$' + RemoveToken(Line, #1), ZERO_DATE));
894- Result.FLastModified := IntToDateTime(StrToIntDef('$' + RemoveToken(Line, #1), ZERO_DATE));
895- Result.FKokomade := StrToIntDef('$' + RemoveToken(Line, #1), -1);
896- Result.FNewReceive := StrToIntDef('$' + RemoveToken(Line, #1), 0);
900+ Result.FNo := StrToIntDef('$' + MojuUtils.RemoveToken(Line, #1), 0);
901+ Result.FFileName := MojuUtils.RemoveToken(Line, #1);
902+ Result.FTitle := MojuUtils.UnSanitize(MojuUtils.RemoveToken(Line, #1));
903+ Result.FCount := StrToIntDef('$' + MojuUtils.RemoveToken(Line, #1), 0);
904+ Result.FSize := StrToIntDef('$' + MojuUtils.RemoveToken(Line, #1), 0);
905+ Result.FRoundDate := IntToDateTime(StrToIntDef('$' + MojuUtils.RemoveToken(Line, #1), ZERO_DATE));
906+ Result.FLastModified := IntToDateTime(StrToIntDef('$' + MojuUtils.RemoveToken(Line, #1), ZERO_DATE));
907+ Result.FKokomade := StrToIntDef('$' + MojuUtils.RemoveToken(Line, #1), -1);
908+ Result.FNewReceive := StrToIntDef('$' + MojuUtils.RemoveToken(Line, #1), 0);
897909 RemoveToken(Line, #1);//9: ; //未使用
898- Result.FUnRead := IntToBool(StrToIntDef('$' + RemoveToken(Line, #1), 0));
899- Result.FScrollTop := StrToIntDef('$' + RemoveToken(Line, #1), 0);
900- Result.FAllResCount := StrToIntDef('$' + RemoveToken(Line, #1), 0);
901- Result.FNewResCount := StrToIntDef('$' + RemoveToken(Line, #1), 0);
902- Result.FAgeSage := TGikoAgeSage(StrToIntDef('$' + RemoveToken(Line, #1), 0));
910+ Result.FUnRead := IntToBool(StrToIntDef('$' + MojuUtils.RemoveToken(Line, #1), 0));
911+ Result.FScrollTop := StrToIntDef('$' + MojuUtils.RemoveToken(Line, #1), 0);
912+ Result.FAllResCount := StrToIntDef('$' + MojuUtils.RemoveToken(Line, #1), 0);
913+ Result.FNewResCount := StrToIntDef('$' + MojuUtils.RemoveToken(Line, #1), 0);
914+ Result.FAgeSage := TGikoAgeSage(StrToIntDef('$' + MojuUtils.RemoveToken(Line, #1), 0));
903915
904916 end;
905917
--- a/InputAssist.dfm
+++ b/InputAssist.dfm
@@ -1,6 +1,6 @@
11 object InputAssistForm: TInputAssistForm
2- Left = 353
3- Top = 196
2+ Left = 371
3+ Top = 195
44 Width = 390
55 Height = 460
66 Caption = #20837#21147#12450#12471#12473#12488#35373#23450
@@ -133,7 +133,7 @@ object InputAssistForm: TInputAssistForm
133133 Left = 0
134134 Top = 200
135135 Width = 382
136- Height = 233
136+ Height = 226
137137 Align = alClient
138138 BevelOuter = bvNone
139139 Caption = 'Panel2'
@@ -191,19 +191,22 @@ object InputAssistForm: TInputAssistForm
191191 DesignSize = (
192192 189
193193 48)
194- object CategoryNameEdit: TLabeledEdit
195- Left = 8
194+ object CategoryNameLabel: TLabel
195+ Left = 9
196+ Top = 6
197+ Width = 41
198+ Height = 12
199+ Caption = #12459#12486#12468#12522
200+ end
201+ object CategoryNameComboBox: TComboBox
202+ Left = 5
196203 Top = 21
197- Width = 169
204+ Width = 180
198205 Height = 20
199- Hint = #20837#21147#12395#20351#12358#12459#12486#12468#12522#21517
200206 Anchors = [akLeft, akTop, akRight]
201- EditLabel.Width = 53
202- EditLabel.Height = 12
203- EditLabel.Caption = #12459#12486#12468#12522#21517
204- LabelPosition = lpAbove
205- LabelSpacing = 3
207+ ItemHeight = 12
206208 TabOrder = 0
209+ Text = 'CategoryNameComboBox'
207210 end
208211 end
209212 end
@@ -211,7 +214,7 @@ object InputAssistForm: TInputAssistForm
211214 Left = 0
212215 Top = 48
213216 Width = 382
214- Height = 185
217+ Height = 178
215218 Align = alClient
216219 BevelOuter = bvNone
217220 TabOrder = 1
@@ -219,7 +222,7 @@ object InputAssistForm: TInputAssistForm
219222 Left = 0
220223 Top = 0
221224 Width = 382
222- Height = 185
225+ Height = 178
223226 Align = alClient
224227 Caption = #25407#20837#25991#23383#21015
225228 TabOrder = 0
@@ -227,7 +230,7 @@ object InputAssistForm: TInputAssistForm
227230 Left = 2
228231 Top = 14
229232 Width = 378
230- Height = 169
233+ Height = 162
231234 Hint = #25407#20837#12377#12427#25991#23383#21015
232235 Align = alClient
233236 ScrollBars = ssBoth
@@ -237,11 +240,96 @@ object InputAssistForm: TInputAssistForm
237240 end
238241 end
239242 object ColumnImageList: TImageList
240- Left = 312
243+ Left = 304
241244 Top = 192
242245 Bitmap = {
243246 494C010102000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
244- 0000000000003600000028000000400000001000000001001000000000000008
247+ 0000000000003600000028000000400000001000000001002000000000000010
248+ 0000000000000000000000000000000000000000000000000000000000000000
249+ 0000000000000000000000000000000000000000000000000000000000000000
250+ 0000000000000000000000000000000000000000000000000000000000000000
251+ 0000000000000000000000000000000000000000000000000000000000000000
252+ 0000000000000000000000000000000000000000000000000000000000000000
253+ 0000000000000000000000000000000000000000000000000000000000000000
254+ 0000000000000000000000000000000000000000000000000000000000000000
255+ 0000000000000000000000000000000000000000000000000000000000000000
256+ 0000000000000000000000000000000000000000000000000000000000000000
257+ 0000000000000000000000000000000000000000000000000000000000000000
258+ 0000000000000000000000000000000000000000000000000000000000000000
259+ 0000000000000000000000000000000000000000000000000000000000000000
260+ 0000000000000000000000000000000000000000000000000000000000000000
261+ 0000000000000000000000000000000000000000000000000000000000000000
262+ 0000000000000000000000000000000000000000000000000000000000000000
263+ 0000000000000000000000000000000000000000000000000000000000000000
264+ 0000000000000000000000000000000000000000000000000000000000000000
265+ 0000000000000000000000000000000000000000000000000000000000000000
266+ 0000000000000000000000000000000000000000000000000000000000000000
267+ 0000000000000000000000000000000000000000000000000000000000000000
268+ 0000000000000000000000000000000000000000000000000000000000000000
269+ 0000000000000000000000000000000000000000000000000000000000000000
270+ 0000000000000000000000000000000000000000000000000000000000000000
271+ 0000000000000000000000000000000000000000000000000000000000000000
272+ 0000000000000000000000000000000000000000000000000000000000000000
273+ 0000000000000000000000000000000000000000000000000000000000000000
274+ 0000000000000000000000000000000000000000000000000000000000000000
275+ 0000000000000000000000000000000000000000000000000000000000000000
276+ 0000000000000000000000000000000000000000000000000000000000000000
277+ 0000000000000000000000000000000000000000000000000000000000000000
278+ 0000000000000000000000000000000000000000000000000000000000000000
279+ 0000000000000000000000000000000000000000000000000000000000000000
280+ 000000000000000000000000000000000000000000000000000000000000FFFF
281+ FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
282+ 0000000000000000000000000000000000000000000000000000000000000000
283+ 0000000000000000000084848400FFFFFF000000000000000000000000000000
284+ 0000000000000000000000000000000000000000000000000000000000000000
285+ 0000000000000000000000000000000000000000000000000000000000000000
286+ 0000000000000000000000000000000000000000000000000000000000000000
287+ 0000000000000000000000000000000000000000000000000000000000000000
288+ 0000000000000000000000000000000000000000000000000000000000008484
289+ 84008484840000000000000000000000000000000000FFFFFF00FFFFFF000000
290+ 0000000000000000000000000000000000000000000000000000000000000000
291+ 0000000000008484840084848400FFFFFF00FFFFFF0000000000000000000000
292+ 0000000000000000000000000000000000000000000000000000000000000000
293+ 0000000000000000000000000000000000000000000000000000000000000000
294+ 0000000000000000000000000000000000000000000000000000000000000000
295+ 0000000000000000000000000000000000000000000000000000000000000000
296+ 0000000000000000000000000000000000000000000000000000000000000000
297+ 00008484840000000000000000000000000000000000FFFFFF00000000000000
298+ 0000000000000000000000000000000000000000000000000000000000000000
299+ 000000000000848484000000000000000000FFFFFF0000000000000000000000
300+ 0000000000000000000000000000000000000000000000000000000000000000
301+ 0000000000000000000000000000000000000000000000000000000000000000
302+ 0000000000000000000000000000000000000000000000000000000000000000
303+ 0000000000000000000000000000000000000000000000000000000000000000
304+ 0000000000000000000000000000000000000000000000000000000000000000
305+ 000084848400848484000000000000000000FFFFFF00FFFFFF00000000000000
306+ 0000000000000000000000000000000000000000000000000000000000000000
307+ 000084848400848484000000000000000000FFFFFF00FFFFFF00000000000000
308+ 0000000000000000000000000000000000000000000000000000000000000000
309+ 0000000000000000000000000000000000000000000000000000000000000000
310+ 0000000000000000000000000000000000000000000000000000000000000000
311+ 0000000000000000000000000000000000000000000000000000000000000000
312+ 0000000000000000000000000000000000000000000000000000000000000000
313+ 000000000000848484000000000000000000FFFFFF0000000000000000000000
314+ 0000000000000000000000000000000000000000000000000000000000000000
315+ 00008484840000000000000000000000000000000000FFFFFF00000000000000
316+ 0000000000000000000000000000000000000000000000000000000000000000
317+ 0000000000000000000000000000000000000000000000000000000000000000
318+ 0000000000000000000000000000000000000000000000000000000000000000
319+ 0000000000000000000000000000000000000000000000000000000000000000
320+ 0000000000000000000000000000000000000000000000000000000000000000
321+ 0000000000008484840084848400FFFFFF00FFFFFF0000000000000000000000
322+ 0000000000000000000000000000000000000000000000000000000000008484
323+ 84008484840000000000000000000000000000000000FFFFFF00FFFFFF000000
324+ 0000000000000000000000000000000000000000000000000000000000000000
325+ 0000000000000000000000000000000000000000000000000000000000000000
326+ 0000000000000000000000000000000000000000000000000000000000000000
327+ 0000000000000000000000000000000000000000000000000000000000000000
328+ 0000000000000000000000000000000000000000000000000000000000000000
329+ 0000000000000000000084848400FFFFFF000000000000000000000000000000
330+ 0000000000000000000000000000000000000000000000000000000000008484
331+ 8400848484008484840084848400848484008484840084848400848484000000
332+ 0000000000000000000000000000000000000000000000000000000000000000
245333 0000000000000000000000000000000000000000000000000000000000000000
246334 0000000000000000000000000000000000000000000000000000000000000000
247335 0000000000000000000000000000000000000000000000000000000000000000
@@ -258,33 +346,12 @@ object InputAssistForm: TInputAssistForm
258346 0000000000000000000000000000000000000000000000000000000000000000
259347 0000000000000000000000000000000000000000000000000000000000000000
260348 0000000000000000000000000000000000000000000000000000000000000000
261- 000000000000000000000000000000000000000000000000FF7FFF7FFF7FFF7F
262- FF7FFF7FFF7FFF7F000000000000000000000000000000000000000000001042
263- FF7F000000000000000000000000000000000000000000000000000000000000
264349 0000000000000000000000000000000000000000000000000000000000000000
265- 0000000000000000000000000000000000000000000000001042104200000000
266- 00000000FF7FFF7F000000000000000000000000000000000000000010421042
267- FF7FFF7F00000000000000000000000000000000000000000000000000000000
268350 0000000000000000000000000000000000000000000000000000000000000000
269- 0000000000000000000000000000000000000000000000000000104200000000
270- 00000000FF7F0000000000000000000000000000000000000000000010420000
271- 0000FF7F00000000000000000000000000000000000000000000000000000000
272351 0000000000000000000000000000000000000000000000000000000000000000
273- 0000000000000000000000000000000000000000000000000000104210420000
274- 0000FF7FFF7F0000000000000000000000000000000000000000104210420000
275- 0000FF7FFF7F0000000000000000000000000000000000000000000000000000
276352 0000000000000000000000000000000000000000000000000000000000000000
277- 0000000000000000000000000000000000000000000000000000000010420000
278- 0000FF7F00000000000000000000000000000000000000000000104200000000
279- 00000000FF7F0000000000000000000000000000000000000000000000000000
280353 0000000000000000000000000000000000000000000000000000000000000000
281- 0000000000000000000000000000000000000000000000000000000010421042
282- FF7FFF7F00000000000000000000000000000000000000001042104200000000
283- 00000000FF7FFF7F000000000000000000000000000000000000000000000000
284354 0000000000000000000000000000000000000000000000000000000000000000
285- 0000000000000000000000000000000000000000000000000000000000001042
286- FF7F000000000000000000000000000000000000000000001042104210421042
287- 1042104210421042000000000000000000000000000000000000000000000000
288355 0000000000000000000000000000000000000000000000000000000000000000
289356 0000000000000000000000000000000000000000000000000000000000000000
290357 0000000000000000000000000000000000000000000000000000000000000000
@@ -316,7 +383,7 @@ object InputAssistForm: TInputAssistForm
316383 000000000000}
317384 end
318385 object InputAssistFormActionList: TActionList
319- Left = 360
386+ Left = 264
320387 Top = 192
321388 object EditCut1: TEditCut
322389 Category = #32232#38598
--- a/InputAssist.pas
+++ b/InputAssist.pas
@@ -40,7 +40,8 @@ type
4040 KeyNameEdit: TLabeledEdit;
4141 Splitter: TSplitter;
4242 CategoryPanel: TPanel;
43- CategoryNameEdit: TLabeledEdit;
43+ CategoryNameComboBox: TComboBox;
44+ CategoryNameLabel: TLabel;
4445 procedure FormCreate(Sender: TObject);
4546 procedure GikoListView1SelectItem(Sender: TObject; Item: TListItem;
4647 Selected: Boolean);
@@ -63,6 +64,7 @@ type
6364 FSortColumn : Integer;
6465 FInsertText : String;
6566 procedure AddListViewItem(ResWord : TResistWord);
67+ procedure SetCategory(combo: TComboBox);
6668 public
6769 { Public 宣言 }
6870 procedure SetUpFromEditor();
@@ -130,7 +132,7 @@ procedure TInputAssistForm.GikoListView1SelectItem(Sender: TObject;
130132 begin
131133 if (Item <> nil) and (Item.Data <> nil) then begin
132134 KeyNameEdit.Text := TResistWord(Item.Data).GetKey;
133- CategoryNameEdit.Text := TResistWord(Item.Data).GetCategory;
135+ CategoryNameComboBox.Text := TResistWord(Item.Data).GetCategory;
134136 TextMemo.Lines.Text := TResistWord(Item.Data).GetText;
135137 end else begin
136138 TextMemo.Lines.Text := '';
@@ -145,11 +147,12 @@ begin
145147 ShowMessage('キー名を設定してください。');
146148 end else begin
147149 if (not InputAssistDM.IsDupulicate(
148- KeyNameEdit.Text, CategoryNameEdit.Text) ) then begin
150+ KeyNameEdit.Text, CategoryNameComboBox.Text) ) then begin
149151 resWord := InputAssistDM.Add(KeyNameEdit.Text);
150- resWord.SetCategory(CategoryNameEdit.Text);
152+ resWord.SetCategory(CategoryNameComboBox.Text);
151153 resWord.SetText(TextMemo.Text);
152154 AddListViewItem(resWord);
155+ SetCategory(CategoryNameComboBox);
153156 GikoListView1.AlphaSort;
154157 end else begin
155158 ShowMessage('同一のキー名・カテゴリ名で既に登録済みです。');
@@ -176,11 +179,12 @@ begin
176179 end else begin
177180 resWord := TResistWord(GikoListView1.Selected.Data);
178181 resWord.SetKey(KeyNameEdit.Text);
179- resWord.SetCategory(CategoryNameEdit.Text);
182+ resWord.SetCategory(CategoryNameComboBox.Text);
180183 resWord.SetText(TextMemo.Text);
181184 // 一覧の更新
182185 GikoListView1.Selected.Caption := resWord.GetKey;
183186 GikoListView1.Selected.SubItems[0] := resWord.GetCategory;
187+ SetCategory(CategoryNameComboBox);
184188 GikoListView1.AlphaSort;
185189 end;
186190 end;
@@ -287,6 +291,25 @@ begin
287291 end;
288292 LockWindowUpdate(0);
289293 end;
294+//! カテゴリコンボボックス設定
295+procedure TInputAssistForm.SetCategory(combo: TComboBox);
296+var
297+ cat : TStringList;
298+begin
299+ // 検索用
300+ cat := TStringList.Create;
301+ try
302+ InputAssistDM.GetCategoryList(cat);
303+ combo.Items.BeginUpdate;
304+ combo.Items.Clear;
305+ combo.Items.Add('');
306+ combo.Items.AddStrings(cat);
307+ combo.ItemIndex := 0;
308+ combo.Items.EndUpdate;
309+ finally
310+ cat.Free;
311+ end;
312+end;
290313
291314 procedure TInputAssistForm.SetUpFromMain();
292315 begin
@@ -297,6 +320,8 @@ begin
297320 TextMemo.ReadOnly := False;
298321 FInsertText := '';
299322 CloseAction.ShortCut := TShortCut(0);
323+ // 追加用キー入力OK
324+ SetCategory(CategoryNameComboBox);
300325 end;
301326 procedure TInputAssistForm.SetUpFromEditor();
302327 var
@@ -310,16 +335,7 @@ begin
310335 FInsertText := '';
311336 CloseAction.ShortCut := ShortCut(VK_ESCAPE, []);
312337 // 検索用
313- cat := TStringList.Create;
314- try
315- InputAssistDM.GetCategoryList(cat);
316- CategoryComboBox.Items.Clear;
317- CategoryComboBox.Items.Add('');
318- CategoryComboBox.Items.AddStrings(cat);
319- CategoryComboBox.ItemIndex := 0;
320- finally
321- cat.Free;
322- end;
338+ SetCategory(CategoryComboBox);
323339 end;
324340 function TInputAssistForm.GetInsertText(): String;
325341 begin
@@ -346,5 +362,4 @@ procedure TInputAssistForm.CloseActionExecute(Sender: TObject);
346362 begin
347363 Self.ModalResult := mrCancel;
348364 end;
349-
350365 end.
--- a/KuroutSetting.dfm
+++ b/KuroutSetting.dfm
@@ -21,8 +21,8 @@ object KuroutOption: TKuroutOption
2121 Top = 0
2222 Width = 517
2323 Height = 393
24- ActivePage = TabSheet1
25- TabIndex = 0
24+ ActivePage = KakikomiTabSheet
25+ TabIndex = 2
2626 TabOrder = 0
2727 object TabSheet1: TTabSheet
2828 Caption = #35443#32048#35373#23450#65297
@@ -387,7 +387,7 @@ object KuroutOption: TKuroutOption
387387 Left = 16
388388 Top = 16
389389 Width = 473
390- Height = 105
390+ Height = 97
391391 Caption = #12463#12483#12461#12540
392392 TabOrder = 0
393393 object Label8: TLabel
@@ -414,9 +414,9 @@ object KuroutOption: TKuroutOption
414414 end
415415 object GroupBox3: TGroupBox
416416 Left = 16
417- Top = 126
417+ Top = 118
418418 Width = 473
419- Height = 51
419+ Height = 43
420420 Caption = #12522#12531#12463#31227#21205#23653#27508
421421 TabOrder = 1
422422 object Label10: TLabel
@@ -444,16 +444,16 @@ object KuroutOption: TKuroutOption
444444 end
445445 object AHandredGroupBox: TGroupBox
446446 Left = 16
447- Top = 184
447+ Top = 168
448448 Width = 473
449- Height = 65
449+ Height = 49
450450 Caption = '100'#12524#12473#34920#31034#35373#23450
451451 TabOrder = 2
452452 object AHandredLabeledEdit: TLabeledEdit
453453 Left = 96
454- Top = 24
454+ Top = 19
455455 Width = 73
456- Height = 20
456+ Height = 19
457457 EditLabel.Width = 81
458458 EditLabel.Height = 12
459459 EditLabel.Caption = #20808#38957#34920#31034#12524#12473#25968
@@ -465,9 +465,9 @@ object KuroutOption: TKuroutOption
465465 end
466466 object UpDown1: TUpDown
467467 Left = 169
468- Top = 24
468+ Top = 19
469469 Width = 15
470- Height = 20
470+ Height = 19
471471 Associate = AHandredLabeledEdit
472472 Min = 1
473473 Position = 1
@@ -477,19 +477,39 @@ object KuroutOption: TKuroutOption
477477 end
478478 object ThreadGroupBox: TGroupBox
479479 Left = 16
480- Top = 256
480+ Top = 224
481481 Width = 473
482- Height = 65
482+ Height = 113
483483 Caption = #12473#12524#12483#12489
484484 TabOrder = 3
485+ object Label15: TLabel
486+ Left = 11
487+ Top = 64
488+ Width = 225
489+ Height = 12
490+ Caption = #8251#23550#35937#12392#12377#12427#25313#24373#23376#12434' ; '#12391#12388#12394#12370#12390#12367#12384#12373#12356#12290
491+ end
485492 object AddKeywordCheckBox: TCheckBox
486- Left = 16
487- Top = 24
493+ Left = 12
494+ Top = 19
488495 Width = 233
489496 Height = 17
490497 Caption = #38306#36899#12461#12540#12527#12540#12489#12398#12522#12531#12463#12434#36861#21152#12377#12427
491498 TabOrder = 0
492499 end
500+ object ExtListLabeledEdit: TLabeledEdit
501+ Left = 96
502+ Top = 43
503+ Width = 361
504+ Height = 19
505+ EditLabel.Width = 82
506+ EditLabel.Height = 12
507+ EditLabel.Caption = 'URL'#21462#24471#25313#24373#23376
508+ LabelPosition = lpLeft
509+ LabelSpacing = 3
510+ TabOrder = 1
511+ OnExit = ExtListLabeledEditExit
512+ end
493513 end
494514 end
495515 object TabSheet2: TTabSheet
--- a/KuroutSetting.pas
+++ b/KuroutSetting.pas
@@ -4,7 +4,7 @@ interface
44
55 uses
66 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
7- Dialogs, StdCtrls, ComCtrls, GikoSystem, GikoUtil, ExtCtrls;
7+ Dialogs, StdCtrls, ComCtrls, GikoSystem, GikoUtil, ExtCtrls, StrUtils;
88
99 type
1010 TKuroutOption = class(TForm)
@@ -79,6 +79,8 @@ type
7979 SentIniFileSizeUpDown: TUpDown;
8080 Label13: TLabel;
8181 Label14: TLabel;
82+ ExtListLabeledEdit: TLabeledEdit;
83+ Label15: TLabel;
8284 procedure OkBottonClick(Sender: TObject);
8385 procedure FormCreate(Sender: TObject);
8486 procedure CDeleteButtonClick(Sender: TObject);
@@ -91,6 +93,7 @@ type
9193 procedure BDownButtonClick(Sender: TObject);
9294 procedure MoveHistoryMaxEditExit(Sender: TObject);
9395 procedure AHandredLabeledEditExit(Sender: TObject);
96+ procedure ExtListLabeledEditExit(Sender: TObject);
9497 private
9598 { Private 宣言 }
9699 procedure SetValue;
@@ -152,6 +155,7 @@ begin
152155 // 誤反応対策
153156 ReplaceDatCheckBox.Checked := GikoSys.Setting.ReplaceDat;
154157 SentIniFileSizeUpDown.Position := GikoSys.Setting.SentIniFileSize;
158+ ExtListLabeledEdit.Text := GikoSys.Setting.ExtList;
155159 end;
156160
157161 procedure TKuroutOption.SaveSetting;
@@ -193,6 +197,7 @@ begin
193197 // 誤反応対策
194198 GikoSys.Setting.ReplaceDat := ReplaceDatCheckBox.Checked;
195199 GikoSys.Setting.SentIniFileSize := SentIniFileSizeUpDown.Position;
200+ GikoSys.Setting.ExtList := ExtListLabeledEdit.Text;
196201 end;
197202
198203 procedure TKuroutOption.RecvBufferSizeExit(Sender: TObject);
@@ -223,6 +228,7 @@ begin
223228 PostTimeEditExit(Sender);
224229 MoveHistoryMaxEditExit(Sender);
225230 AHandredLabeledEditExit(Sender);
231+ ExtListLabeledEditExit(Sender);
226232 PostColumnData();
227233 SaveSetting;
228234 end;
@@ -437,4 +443,13 @@ begin
437443
438444 end;
439445
446+procedure TKuroutOption.ExtListLabeledEditExit(Sender: TObject);
447+begin
448+ if AnsiEndsStr(';', ExtListLabeledEdit.Text) then begin
449+ ExtListLabeledEdit.Text :=
450+ Copy(ExtListLabeledEdit.Text, 0,
451+ Length(ExtListLabeledEdit.Text) - 1);
452+ end;
453+end;
454+
440455 end.
--- a/Setting.pas
+++ b/Setting.pas
@@ -447,7 +447,8 @@ type
447447 FReplaceDat: Boolean;
448448 //! sent.iniファイルのサイズ(単位MB)
449449 FSentIniFileSize: Integer;
450-
450+ //! リンクURL取得の対象拡張子
451+ FExtList: String;
451452 function GetMainCoolSet(Index: Integer): TCoolSet;
452453 function GetBoardCoolSet(Index: Integer): TCoolSet;
453454 function GetBrowserCoolSet(Index: Integer): TCoolSet;
@@ -804,6 +805,8 @@ type
804805 property ReplaceDat: Boolean read FReplaceDat write FReplaceDat;
805806 //! sent.iniファイルのサイズ(単位MB)
806807 property SentIniFileSize: Integer read FSentIniFileSize write FSentIniFileSize;
808+ //! リンクURL取得の対象拡張子
809+ property ExtList: String read FExtList write FExtList;
807810
808811 end;
809812
@@ -1291,7 +1294,7 @@ begin
12911294 end;
12921295
12931296 FSentIniFileSize := ini.ReadInteger('Function', 'SentIniFileSize', 3);
1294-
1297+ FExtList := ini.ReadString('Function', 'ExtList', '*.gif;*.jpg;*.jpeg;*.png;*.zip;*.rar');
12951298 ini.UpdateFile;
12961299 finally
12971300 ini.Free;
@@ -1672,6 +1675,7 @@ begin
16721675 ini.WriteBool('Thread', 'AddKeywordLink', FAddKeywordLink);
16731676 ini.WriteBool('Thread', 'ReplaceDat', FReplaceDat);
16741677 ini.WriteInteger('Function', 'SentIniFileSize', FSentIniFileSize);
1678+ ini.WriteString('Function', 'ExtList', FExtList);
16751679 ini.UpdateFile;
16761680 finally
16771681 ini.Free;
Binary files a/gikoNavi.res and b/gikoNavi.res differ
--- a/readme/readme.txt
+++ b/readme/readme.txt
@@ -1,4 +1,4 @@
1-■ギコナビ Version1.00 バタ55 Readme.txt
1+■ギコナビ Version1.00 バタ56 Readme.txt
22
33
44 ------------------------------
@@ -79,7 +79,8 @@ http://www.microsoft.com/windows95/downloads/contents/WUAdminTools/S_WUNetworkin
7979 ------------------------------
8080 開発ツール:Delphi6 Professional (UP2 + RTL UP2 + RTL UP3)
8181 Delphi6 Personal(UP2 + RTL UP2 + RTL UP3)
82-OS :WindowsXP Professional Edition(SP1) + IE6(SP1)
82+OS :WindowsXP Professional Edition(SP2) + IE7
83+ WindowsXP Professional Edition(SP1) + IE6(SP1)
8384 Windows2000 Professional (SP4) + IE6(SP1)
8485
8586 ------------------------------
@@ -107,6 +108,9 @@ LICENSE
107108 ------------------------------
108109 履歴
109110 ------------------------------
111+2007/XX/YY
112+ Version バタ56
113+
110114 2007/04/01
111115 Version バタ55
112116  詳細設定に、関連キーワードのリンクを追加するオプションを追加
--- a/readme/setup.INF
+++ b/readme/setup.INF
@@ -93,6 +93,34 @@ Folder=gikoNavi
9393 90=config\default\したらばJBBS.default
9494 91=config\default\ギコナビ.default
9595 92=config\default\replace.default
96+93=config\skin\skin30-2G_IE7\Bookmark.html
97+94=config\skin\skin30-2G_IE7\chie_base.css
98+95=config\skin\skin30-2G_IE7\chie_blue.css
99+96=config\skin\skin30-2G_IE7\chie_image.css
100+97=config\skin\skin30-2G_IE7\chie_event.js
101+98=config\skin\skin30-2G_IE7\chie_image.js
102+99=config\skin\skin30-2G_IE7\chie_popup.js
103+100=config\skin\skin30-2G_IE7\chie_search.js
104+101=config\skin\skin30-2G_IE7\Footer.html
105+102=config\skin\skin30-2G_IE7\Header.html
106+103=config\skin\skin30-2G_IE7\Newmark.html
107+104=config\skin\skin30-2G_IE7\NewRes.html
108+105=config\skin\skin30-2G_IE7\Res.html
109+106=config\skin\skin30-3G_IE7\Bookmark.html
110+107=config\skin\skin30-3G_IE7\chie_base.css
111+108=config\skin\skin30-3G_IE7\chie_blue.css
112+109=config\skin\skin30-3G_IE7\chie_green.css
113+110=config\skin\skin30-3G_IE7\chie_image2.css
114+111=config\skin\skin30-3G_IE7\chie_event.js
115+112=config\skin\skin30-3G_IE7\chie_image2.js
116+113=config\skin\skin30-3G_IE7\chie_popup.js
117+114=config\skin\skin30-3G_IE7\chie_search.js
118+115=config\skin\skin30-3G_IE7\Footer.html
119+116=config\skin\skin30-3G_IE7\Header.html
120+117=config\skin\skin30-3G_IE7\Newmark.html
121+118=config\skin\skin30-3G_IE7\NewRes.html
122+119=config\skin\skin30-3G_IE7\Res.html
123+120=config\skin\skin30-3G_IE7\chie_thumbPanel.js
96124
97125 [Group]
98126 1=ギコナビ,gikoNavi.exe
--- a/res/default/replace.default
+++ b/res/default/replace.default
@@ -4,4 +4,4 @@ body onload=window\(\)
44 GetSpecialFolder\(
55 CodeModule\.Lines
66 ms-its:mhtml:
7-
7+!exec*:*:
\ No newline at end of file
--- /dev/null
+++ b/res/skin/skin30-2G_IE7/Bookmark.html
@@ -0,0 +1 @@
1+<dt style="text-align:center;"><a name="koko"></a>ココまで読んだ</dt><dd></dd>
\ No newline at end of file
--- /dev/null
+++ b/res/skin/skin30-2G_IE7/Footer.html
@@ -0,0 +1,8 @@
1+<dt id="sizeinfo"> <span><SIZEKB/>KB (<SIZE/>Byte) <script type="text/javascript">
2+ end_time = new Date();
3+ start_num=start_time.getMilliseconds()+1000*(start_time.getSeconds()+60*start_time.getMinutes()+3600*start_time.getHours());
4+ end_num =end_time.getMilliseconds() +1000*(end_time.getSeconds() +60*end_time.getMinutes() +3600*end_time.getHours());
5+ document.write((end_num-start_num)/1000+'秒');
6+</script></span></dt><dd style="display:none">dummy_for_searchRef</dd></dl>
7+</body>
8+</html>
\ No newline at end of file
--- /dev/null
+++ b/res/skin/skin30-2G_IE7/Header.html
@@ -0,0 +1,64 @@
1+<html lang="ja">
2+<head>
3+<title><THREADNAME/></title>
4+<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">
5+<meta name="ThreadURL" content="<THREADURL/>">
6+<meta name="SkinPath" content="<SKINPATH/>">
7+<meta name="GetRescount" content="<GETRESCOUNT/>">
8+<link rel="stylesheet" type="text/css" charset="Shift_JIS" href="<SKINPATH/>chie_blue.css">
9+<link rel="stylesheet" type="text/css" charset="Shift_JIS" href="<SKINPATH/>chie_image.css">
10+<script type="text/javascript" charset="Shift_JIS" src="<SKINPATH/>chie_search.js"></script>
11+<script type="text/javascript" charset="Shift_JIS" src="<SKINPATH/>chie_image.js"></script>
12+<script type="text/javascript" charset="Shift_JIS" src="<SKINPATH/>chie_popup.js"></script>
13+<script type="text/javascript" charset="Shift_JIS" src="<SKINPATH/>chie_event.js"></script>
14+<!--script type="text/javascript" charset="Shift_JIS" src="<SKINPATH/>chie_mail.js"></script-->
15+<script type="text/javascript">
16+var start_time = new Date();
17+//==========グローバル変数
18+var anchorHead="";
19+var skinName="skin30-2 v3.7.1112";
20+var browser="ギコナビ";
21+//==========ギコナビ用アンカーの判定(0:処理無し,1:ポップアップ,2:ボタン挿入)
22+// ギコナビでは、レスアンカーは相対アドレスで記述される
23+function checkAnchor(href){if(!href){return(0)}
24+ if (href.match(/decoy:|about:/)){return(1)}
25+ else if(href.match(/menu:|be:|read\.cgi|\.2ch\.net\/.*\/kako/)){return(0)}
26+ else{return(2)}
27+}
28+//==========リンク設定
29+function addAnchor(inner,num){
30+ if(!t_url){threadurl()}
31+ var url=document.getElementsByName("ThreadURL")[0].content;
32+ if(url.match(/&/)){
33+ return('<a href="../test/read.cgi?bbs='+t_bbs+'&key='+t_key+'&st='+inner+'&to='+inner+'&nofirst=true" target="_blank" onclick="blur()">'+num+'</a>')
34+ }else{
35+ return('<a href="../test/read.cgi/'+t_bbs+'/'+t_key+'/'+inner+'" target="_blank" onclick="blur()">'+num+'</a>')
36+ }
37+}
38+// スレッドURLの取得
39+var t_url=false,t_domain,t_bbs,t_key;
40+function threadurl(){
41+ var threadurl=document.getElementsByName("ThreadURL")[0].content;
42+ if(threadurl.match(/&/)){
43+ threadurl.match(/bbs=(.*)&key=(\d*)/);
44+ }else{
45+ threadurl.match(/^.*\/test\/read.cgi\/(.*)\/(.*)\//);
46+ }
47+ t_url=true;
48+ t_bbs=RegExp.$1;
49+ t_key=RegExp.$2;
50+}
51+//==========非表示レスの表示-ギコナビのみ
52+function hiddenRes(e){
53+ var number=tohan(event.srcElement.innerText.replace(/>|>/g,""));
54+ var i=0;while(document.anchors[i].name.match(/\D/)){i++}
55+ var startRes=parseInt(document.anchors[i+1].name.replace(/\D/g,""));
56+ if(number.match(/(\d*)\D+(\d*)/)){var start=parseInt(RegExp.$1);}
57+ else {var start=parseInt(number);}
58+ //alert(startRes+">"+start+" && "+start+"!="+1);
59+ if(startRes>start && start!=1){return true}else{return false}
60+}
61+</script>
62+</head>
63+<body>
64+<dl id="dl">
--- /dev/null
+++ b/res/skin/skin30-2G_IE7/NewRes.html
@@ -0,0 +1 @@
1+<dt class="new"><NUMBER/><u><NAME/></u><MAIL/><span><DATE/></span></dt><dd><MESSAGE/></dd>
--- /dev/null
+++ b/res/skin/skin30-2G_IE7/Newmark.html
@@ -0,0 +1 @@
1+<dt style="text-align:center;" class="new"><a name="new"></a>新着レス − <NEWDATE/> 取得</dt><dd></dd>
\ No newline at end of file
--- /dev/null
+++ b/res/skin/skin30-2G_IE7/Res.html
@@ -0,0 +1 @@
1+<dt><NUMBER/><u><NAME/></u><MAIL/><span><DATE/></span></dt><dd><MESSAGE/></dd>
--- /dev/null
+++ b/res/skin/skin30-2G_IE7/chie_base.css
@@ -0,0 +1,93 @@
1+@charset "Shift_JIS";
2+* {font-family:"MS Pゴシック"}
3+/* ふち無し */
4+body {margin:0px;padding:0px;}
5+/* リンク */
6+dt a{text-decoration:none;}
7+dd a{text-decoration:underline;line-height:1.1}
8+
9+/* 検索結果 */
10+#foundPanel{color:LightSlateGray;}
11+#foundPanel div {font-family:"MS ゴシック";}
12+#foundPanel div span{font-family:Times;cursor:hand;}
13+#foundPanel a {color:LightSlateGray;}
14+#foundPanel a:hover{color:#000;}
15+
16+/* dt */
17+dt{
18+ padding:0.3em;
19+ border-width:1px 0px;
20+ border-color:#999;
21+ border-style:solid;
22+}
23+
24+/* 名前 */
25+dt u {
26+ margin:1ex;
27+ text-decoration:none;
28+ cursor:hand;
29+}
30+u a{border-width:0px;padding:0px;}
31+
32+/* ID */
33+dt span{
34+ float:right;
35+/* margin-left:1em;*/
36+ margin-top:-23px;
37+ margin-right:0.5em;
38+ font-family:"MS ゴシック";
39+ font-size:95%;
40+ cursor: hand;
41+}
42+dt span a{font-family:"MS ゴシック";}
43+
44+/* dd */
45+dd{
46+ padding:0.5em 1em 0.5em 0em;
47+ word-break:break-all;
48+ word-wrap:break-word;
49+}
50+
51+/* ボタン */
52+input,button{ /*ここでの指定はimage.cssで上書きされる*/
53+ font-family:"Terminal";
54+ font-size:8px;
55+ margin:2px;
56+ border:1px solid #BCB5B5;
57+}
58+#controlPanel{
59+ position:absolute;
60+ top:expression(body.scrollTop+3);
61+ right:3px;
62+ padding:2px 3px;
63+ background-color:#789;
64+ z-index:6;
65+ visibility:hidden;
66+}
67+#command {text-align:center}
68+#command input{
69+ font-family:"MS ゴシック";
70+ font-size:9pt;
71+ margin:1px;
72+ width:98px;
73+}
74+#context {
75+ position:absolute;
76+ visibility:hidden;
77+ background-color:Menu;
78+ border-style:solid;
79+ border-width:2px;
80+ border-color:ThreeDHighlight ThreeDDarkShadow ThreeDDarkShadow ThreeDHighlight;
81+ padding:1px;
82+ z-index:7;
83+}
84+#context div{
85+ display:block;
86+ font:menu;
87+ padding:4px 17px;
88+ cursor:hand;
89+}
90+#sizeinfo{
91+ background-color:transparent;
92+ border:none;
93+}
--- /dev/null
+++ b/res/skin/skin30-2G_IE7/chie_blue.css
@@ -0,0 +1,19 @@
1+@import url(chie_base.css);
2+/* リンク */
3+a{color:#000;}
4+dt a {border:1px solid #EEE;}
5+dt.new a {border:1px solid #DCEAF5;}
6+dt a:active {color:#F00; background-color:#FDD; border-color:#F44;}
7+dt a:hover {color:#F00; background-color:#FDD; border-color:#F44;}
8+
9+dd a:link {color:#06559B;}
10+dd a:visited{color:#669;}
11+dd a:active {color:#F55; background-color:#FDD;}
12+dd a:hover {color:#F55; background-color:#FDD;}
13+
14+/* dt */
15+dt {background-color: #EEE;}
16+dt.new {background-color:#DCEAF5;}
17+
18+/* 逆参照内部 */
19+.refResult dt a{color:#000;text-decoration:none}
--- /dev/null
+++ b/res/skin/skin30-2G_IE7/chie_event.js
@@ -0,0 +1,285 @@
1+try{document.charset='Shift_JIS'}catch(e){}
2+//========新着ジャンプ設定
3+var buffer=1; // 低速回線や低速マシンの場合にはbufferの数値を増やすとより正確にジャンプ(1増やすと0.1秒遅れる)
4+var newResJump=1; // 新着レスジャンプ(0:ブラウザ任せ、1:読了時のみ、2:常時)*かちゅ、OpenJane、twintailのみの設定
5+//==========以下はスクリプト本文ですよ。
6+//イベントハンドラ定義
7+//外部関数:tohan
8+//外部変数:anchorHead,lightmode,getID,skinName,browser,dts
9+//=========外部ファイル共用のグローバル変数
10+var waited=false;//command表示後trueにし、選択後にfalseにする。
11+var viewed=false;//thumb読込み後trueにし、thumbPanelに乗降後falseにする。
12+var searched=false; //検索後に、trueにし、foundPanelに乗降後falseにする。
13+var cp,tp,vp,fp;
14+//========Click処理→search,他
15+ document.onclick = clickEvent;
16+function clickEvent(){
17+ if(clickCancel){return false}else{clearTimeout(clickTimer);if(document.getElementById("context")){document.getElementById("context").removeNode(true);}}
18+ var obj=window.event.srcElement;
19+ var tag=obj.tagName;
20+ if(tag=="B"||tag=="U"||tag=="SPAN"){searchPerson(obj)} //名前,トリップ,ID
21+ else if(tag=="DT") {searchRef(obj)}
22+ else if(tag=="DD") {defaultPopup()}
23+ else if(tag=="A"){
24+ if(obj.rel){obj.href=obj.rel;}
25+ //if(obj.parentElement.tagName!="DIV"){setHistory(obj);}
26+ //#付きリンク
27+ if(browser=="Live2ch" || browser=="かちゅ〜しゃ"){
28+ if(obj.href.match(/^http:.*#/)){window.open(obj.href,"_parent");return false}
29+ }
30+ //A Bone補正(非表示レスの表示)
31+ if((browser=="A Bone"||browser=="ギコナビ") && hiddenRes(obj)){showModelessDialog(document.getElementsByName("ThreadURL")[0].content.replace(/\/l50$/,"/")+tohan(obj.innerText.replace(/[>>]/g,"")),window,"dialogWidth:"+document.body.clientWidth+"px;help:no;resizable:yes;status:no;unadorned:yes;");window.focus();}
32+ //Jane,Live,ギコナビ補正(skin30-2Normal及びギコナビ)*レスジャンプがscrollIntoViewでないものに係る補正
33+ if(browser=="A Bone" || browser=="OpenJane" || browser=="Live2ch" || browser=="ギコナビ"){if(obj.href.match(/^about|jumpres/)){
34+ var h=tohan(obj.innerText.replace(/[>>]/g,""));
35+ var anchor=document.anchors(anchorHead+h);
36+ if(anchor){anchor.scrollIntoView(true);return false}
37+ }}
38+ return true;
39+ }
40+ else{panelOver();return}
41+}
42+
43+//=========MouseOver処理→image,popup
44+ document.onmouseover = mouseOverEvent;
45+function mouseOverEvent() {
46+ var e = window.event.srcElement;
47+ if(e.tagName=='B'){if(browser!="twintail2"){
48+ if(e.innerText.match(/^([^\d0-9]*)([\d0-9]+)([^\d0-9]*.*)/)){namePopup(e,RegExp.$1,RegExp.$2,RegExp.$3);}
49+ else if(e.innerText.match(/^あぼ〜ん$/)) {abonePopup(e);}
50+ }}
51+ if(e.tagName=='A'){
52+ if(!e.innerText.match(/%/)){ // URLエンコードでありがちな%がなければ
53+ //e.href=e.href.replace(/>/g,"");
54+ //e.href=e.href.replace(/\/ime.\w+/g,"");
55+ }else{
56+ try{
57+ e.title=decodeURI(e.innerText);
58+ }catch(err){
59+ // ShiftJIS,EUC-JPのデコードは面倒だからつけない。
60+ }
61+ }
62+ try{e.href}catch(err){return} // IE7だと何故かe.hrefが取得出来ないA要素がある
63+ if (checkAnchor(e.href)==2){insButton(e);return;}
64+ else if(checkAnchor(e.href)==1){ // 多段ポップアップ
65+ if(event.shiftKey){if(e.rel){e.href=e.rel}return}
66+ var parent=e.parentElement;
67+ var aNum= (parent.tagName!="DD") ? parent.firstChild.sourceIndex : parent.previousSibling.firstChild.innerText;
68+ if(!document.getElementById("p"+aNum)){
69+ var obj=e;var onPopup;
70+ while(obj.tagName!="BODY"){if(obj.id.match(/p\d+/)){onPopup=true;break}else{obj=obj.parentElement}}
71+ if(!onPopup){removePopup()}
72+ makePopContent(e);return;
73+ }
74+ }else if(checkAnchor(e.href)==0){ // 逆参照ポップアップ
75+ if(e.href.match(/menu:/) && event.shiftKey){searchPopup(e)}
76+ }
77+ }else if(e.tagName=="SPAN"||e.tagName=="TT"){
78+ var obj=e;var onPopup;
79+ while(obj.tagName!="BODY"){if(obj.id.match(/p\d+/)){onPopup=true;break}else{obj=obj.parentElement}}
80+ if(e.tagName=="SPAN"){
81+ if(!onPopup && event.shiftKey){searchPopup(e)}
82+ }else{searchPopup(e)}
83+ }else{ // 多段ポップアップ消去
84+ var obj=e;var onPopup;
85+ if(obj.sourceIndex<0){obj=document.body;if(document.getElementById("popupBase")){onPopup=true;}} // namePopupとの競合でノードが外れる瞬間の回避
86+ while(obj.tagName!="BODY"){if(obj.id.match(/(p\d+)/)){onPopup=true;break}else{obj=obj.parentElement;}}
87+ if(onPopup){while(obj.id!=obj.parentElement.lastChild.id){obj.parentElement.lastChild.removeNode(true)}}
88+ else {removePopup()}
89+ }
90+}
91+//=========MouseMove処理→panelOver()
92+ document.onmousemove=mouseMoveEvent;
93+function mouseMoveEvent() {
94+ if(!cp){
95+ var nHTML ='<div id="controlPanel"><input type="button" value="TOP" onclick="scroll_Top();blur()"><input type="button" value="END" onclick="scroll_End();blur()"><input type="button" value="IMG" onmouseup="imgCommand();blur()"><input type="button" value="FND" onclick="fndCommand();blur();"></div><div id="foundPanel" onmouseout="searched=false"></div>';
96+ if(skinName.match(/30-2/)){nHTML+='<div id="thumbPanel" onmouseout="viewed=false"></div><div id="viewPanel"></div>';}
97+ document.body.insertAdjacentHTML("afterBegin",nHTML);
98+ cp=document.getElementById("controlPanel");fp=document.getElementById("foundPanel");
99+ if(skinName.match(/30-2/)){tp=document.getElementById("thumbPanel");vp=document.getElementById("viewPanel");}else{tp=vp=new Object()}
100+ cp.condition="waited";tp.condition="vp.firstChild || viewed || !lightmode";fp.condition=resultView ? "fp.hasChildNodes()" : "searched";
101+ cp.territory="<25"; tp.territory=">20"; fp.territory="<(30+fp.clientHeight) && fp.hasChildNodes()";
102+ }
103+ if(event){panelOver();}
104+ if(!idHash.length){setHash();searchColoring();}
105+}
106+// 各パネル
107+function panelOver(){
108+ var territoryW=document.body.clientWidth-120;var territoryH=25;
109+ var panels=new Array("cp","tp","fp");
110+ for(var i in panels){
111+ if(skinName.match(/30-3/)&&panels[i]=="tp"){continue}
112+ var panel=eval(panels[i]); var territoryY=eval("event.y"+panel.territory); var territoryX=eval(event.x>document.body.clientWidth-panel.offsetWidth-15);
113+ if(eval(panel.condition)){panel.style.visibility="visible";return}
114+ if(territoryY && territoryX){panel.style.visibility="visible";}else{panel.style.visibility="hidden";}
115+ }
116+}
117+// TOP,END
118+function scroll_Top(){document.getElementsByTagName("DL")[0].firstChild.scrollIntoView(true);}
119+function scroll_End(){document.getElementsByTagName("DL")[0].lastChild.scrollIntoView(true);}
120+// IMG
121+function imgCommand(mode,s){
122+ if(!waited){
123+ var nHTML='<div id="command" onclick="clearCommand()"><input type="button" onclick="allImageLoad(\'all\')" value="全レス一括読込"><br><input type="button" onclick="allImageLoad(\'new\')" value="新レス一括読込"><br><input type="button" onclick="removeError()" value="Error画像削除"><br></div>';
124+ event.srcElement.parentElement.insertAdjacentHTML('beforeEnd',nHTML);
125+ if(skinName.match(/30-2/)){
126+ //if(!lightmode){document.getElementById("command").insertAdjacentHTML('afterBegin','<input type="button" onclick="changePanel()" value="パネル切替"><br>')}
127+ document.getElementById("command").insertAdjacentHTML('beforeEnd','<input type="button" onclick="changeMode()" value="モード切替">')
128+ }
129+ waited=true;
130+ }else{
131+ clearCommand();
132+ }
133+}
134+function fndCommand(mode,s){
135+ if(!waited){
136+ findIt(document.selection.createRange().text);
137+ event.cancelBubble=true;
138+ }else{
139+ clearCommand();
140+ }
141+}
142+function clearCommand(){
143+ waited=false;
144+ document.getElementById("command").removeNode(true);
145+}
146+//=========左長押処理→copyMenu()
147+ document.onmousedown=mousedownEvent;
148+var clickCancel,e,ex,ey,clickTimer;
149+function mousedownEvent(){
150+ var obj=e=event.srcElement;ex=event.x;ey=event.y;
151+ if(document.getElementById("context") && obj.innerText==document.getElementById("context").name){return}
152+ clickCancel=false;
153+ if(obj.nextSibling && obj.nextSibling.tagName=="U" && event.button==1){
154+ clickTimer=setTimeout("copyMenu()",500);
155+ }
156+}
157+
158+//コピーメニュー→colorChange(),search::copyText()
159+function copyMenu(){
160+ clickCancel=true; clearTimeout(clickTimer);
161+ if(document.getElementById("context")){document.getElementById("context").removeNode(true);}
162+ var nHTML='<div id="context" name="'+e.innerText+'"><div onclick="copyText(\'res\')" onmouseover="colorChange()" onmouseout="colorChange()">レスをコピー</div><div onclick="copyText(\'name\')" onmouseover="colorChange()" onmouseout="colorChange()">名前をコピー</div><div onclick="copyText(\'id\')" onmouseover="colorChange()" onmouseout="colorChange()">IDをコピー</div></div>';
163+ document.body.insertAdjacentHTML("afterBegin",nHTML);
164+ var context=document.getElementById("context");
165+ context.style.pixelLeft=document.body.scrollLeft+ex
166+ context.style.pixelTop =document.body.scrollTop+ey;
167+ context.style.visibility="visible";
168+}
169+function colorChange(){
170+ var style=event.srcElement.style;
171+ if(event.type=="mouseout"){style.backgroundColor="Menu"; style.color="MenuText";}
172+ else {style.backgroundColor="Highlight";style.color="HighlightText";}
173+}
174+
175+//=========キーボード入力(skin30-2でのキー無効の回避+α)
176+ document.onkeydown=key;
177+function key(){
178+ var dl=document.getElementsByTagName("DL").item(0);
179+ var code=event.keyCode;
180+ if (code=="32" && !event.shiftKey || code=="34"){dl.scrollTop+=dl.offsetHeight;}
181+ else if(code=="32" && event.shiftKey || code=="33"){dl.scrollTop-=dl.offsetHeight;}
182+// else if(code=="37" && event.altKey || code=="8"){jumpHis.back();if(code=="8"){return false}}
183+// else if(code=="39" && event.altKey){jumpHis.forward();return false;}
184+ else if(code=="40"){dl.scrollTop+=36;}
185+ else if(code=="38"){dl.scrollTop-=36;return true;}
186+ else if(code=="36"){scroll_Top()}
187+ else if(code=="35"){scroll_End()}
188+ else if(code=="73" && event.shiftKey){changePanel();return false;} // shift+I
189+ else if(code=="70" && event.shiftKey){findIt(document.selection.createRange().text);return false;} // shift+F
190+ else if(code=="78" && event.shiftKey && firstNew){firstNew.scrollIntoView(true)} // shift+N
191+ else if(code=="82" && event.shiftKey && event.ctrlKey){ // ctrl+shift+R
192+ //かちゅ〜しゃ補正(板更新のショートカットキー)
193+ if(browser=="かちゅ〜しゃ"){
194+ if(!t_url){threadurl();}
195+ window.open("http://"+t_domain+"/"+t_bbs+"/","_blank");
196+ return false;
197+ }
198+ }
199+}
200+
201+//=========新着レス取得後処理(標準スキン未対応ブラウザ用)←Timer又はFooterから呼び出し
202+//=========かちゅ、ABone、ゾヌ2
203+var newResNum=parseInt(document.getElementsByName("GetRescount")[0].content)+1;
204+var k=0;
205+function loadEvent(num){
206+ //====新着レスジャンプ
207+ if(newResJump==0){clearInterval(timerID);return} //「ブラウザ任せ」なら終了
208+ //新着レスの開始番号を取得
209+ if (browser=="かちゅ〜しゃ"){if(isNaN(newResNum)){while(dts[k]){if(dts[k].className=="new"){newResNum=parseInt(dts[k].firstChild.innerText);break;} k++;}}}
210+ else if(browser=="ホットゾヌ2"){newResNum=num+1;}
211+ var anc=document.anchors(anchorHead+newResNum);
212+ if(!anc || !anc.parentElement){return} // 透明あぼ〜んされてたら終了
213+ //新着レスジャンプ
214+ scr=lightmode ? document.body : document.getElementById("dl");
215+ viewPos=scr.scrollTop+scr.clientHeight;// スクロール後の画面下部位置
216+ endPos =anc.offsetTop+20; // 新レスアンカー位置
217+ //最後まで読了 or 「常に新着ジャンプ」ならジャンプ
218+ if(viewPos>endPos || newResJump==2){clearInterval(timerID);setTimeout("moveToNew("+newResNum+")",buffer*100)}
219+ else{firstNew=document.anchors(anchorHead+newResNum).parentElement.nextSibling;}
220+}
221+//=========新着レス取得後処理(標準スキン対応ブラウザ用)←NewMarkから呼び出し
222+//=========OpenJ、twin
223+var scr,viewPos,endPos=0;
224+function reloadEvent(){
225+ //====既読化
226+ var lastDt=dts[dts.length-2];if(!lastDt){return}// 全部新着なら終了
227+ while(lastDt && lastDt.className=="new"){lastDt.className="";lastDt=lastDt.previousSibling.previousSibling;}
228+ //====新着レスジャンプ
229+ if(newResJump==0){return} //「ブラウザ任せ」なら終了
230+ var ancs=document.anchors;
231+ var newResNum=parseInt(ancs[ancs.length-1].name)+1;
232+ scr=lightmode ? document.body : document.getElementById("dl");
233+ viewPos=scr.scrollTop;
234+ endPos =scr.scrollHeight-scr.clientHeight-20;
235+ //最後まで読了 or 「常に新着ジャンプ」ならジャンプ
236+ if(viewPos>endPos || newResJump==2){setTimeout("moveToNew("+newResNum+")",buffer*100);}
237+}
238+
239+// 新着レス移動+新着レスの位置を記憶
240+var firstNew;
241+function moveToNew(num){
242+ firstNew=getDTfromAnc(num);
243+ while(!firstNew){num--;firstNew=getDTfromAnc(num);} //対象が透明あぼ〜んなら数を減らす
244+ firstNew.scrollIntoView(true);
245+}
246+
247+//=========DoubleClick処理→defaultPopup()
248+ document.ondblclick=defaultPopup;
249+function defaultPopup(){
250+ var num=document.selection.createRange().text.replace(/\s$/,"");
251+ var hnum=tohan(num);
252+ if(!isNaN(hnum) && hnum<=1000){
253+ var obj=document.createElement("a");
254+ obj.innerText=num;
255+ obj.href="#"+hnum;
256+ makePopContent(obj);
257+ }else if(num.match(/\w{8,9}/)){ //\w{8}ではだめぽ?
258+ var obj=document.createElement("DT");
259+ obj.innerHTML="<span>date time ID:"+num+"</span>";
260+ searchPerson(obj.firstChild);
261+ }
262+}
263+
264+//=========Copy処理
265+//headから読むとbodyは見えないので、専用ブラウザの特質を利用してbodyの後ろに書き出す
266+//本来どおりheadに書き出すSkinManager対策で判定を一つ入れる
267+ if(document.body) document.write('<script type="text/javascript">document.body.oncopy=copyEvent</script>\n');
268+function copyEvent(){
269+ var textarea=document.createElement("TEXTAREA");
270+ textarea.value=document.selection.createRange().text.replace(/\s(\r\n|$)/g,"\n");
271+ var copyText=textarea.createTextRange();
272+ copyText.execCommand("Copy");
273+ return false;
274+}
275+//=========onScroll処理
276+//window.onscroll=function(){clearInterval(beforeScrollTimer);onLoadEvent()}
277+window.onscroll=function(){onLoadEvent()}
278+if(document.getElementById("dl")){
279+ document.getElementById("dl").onscroll=function(){onLoadEvent()}
280+}
281+//=========onLoad処理
282+window.onload=onLoadEvent;
283+function onLoadEvent(){mouseMoveEvent();setHash();searchColoring();}
284+setTimeout("onLoadEvent()",1000); // 一回だけ着色
285+
--- /dev/null
+++ b/res/skin/skin30-2G_IE7/chie_image.css
@@ -0,0 +1,40 @@
1+body{overflow-x:hidden}
2+/* リンク横ボタン */
3+input,button{
4+ font-family:"Terminal";
5+ font-size:8px;
6+ margin:0px 2px 2px 4px;
7+ border:1px solid #BCB5B5;
8+}
9+/* サムネイル */
10+#thumbPanel{
11+ position:absolute;
12+ top :expression(body.scrollTop+23);
13+ right :0px;
14+ width :115px;
15+ height:expression(document.body.clientHeight-25);
16+ overflow-y:auto;
17+ z-index:4;
18+}
19+#thumbPanel div{
20+ width:100px;
21+ margin-bottom:0px;
22+ border:solid 1px #D6DCE1;
23+ background-color:#FFF;
24+ text-align:right;
25+}
26+#thumbPanel img {width:100px; height:75px; display:none; filter: Alpha(opacity=30);}
27+#thumbPanel embed{width:100px; height:75px; display:block;}
28+#thumbPanel a{margin-right:8px;}
29+/* ビュー */
30+#viewPanel{
31+ position:absolute;
32+ top :expression(body.scrollTop+10);
33+ right :119px;
34+ text-align:right;
35+ z-index:6;
36+ overflow:auto;
37+}
38+#viewPanel img {border:outset 2px LightSlateGray;}
39+#viewPanel embed,#viewPanel object
40+ {border:inset 1px LightSlateGray; width:99%; height:expression(document.body.clientHeight-55);}
--- /dev/null
+++ b/res/skin/skin30-2G_IE7/chie_image.js
@@ -0,0 +1,220 @@
1+//======画像読込の設定
2+var onOpenLoad =1; // スレ読込時の画像読込 0:読み込まない、1:新着レスのみ、2:全部
3+var onMouseLoad=true; // true:カーソルを合わせただけ、false:LOADボタンをクリックしてから
4+var takeArisk=false; // true:画像読み込み時にモード切替、false:手動でモード切替
5+//==========以下はスクリプト本文ですよ。
6+// イベントハンドラ:onMouseover
7+// 外部関数:addAnchor
8+// 外部変数:cp,tp,vp,dds
9+//==========グローバル変数
10+//==========画像処理等
11+var lightmode = true;
12+// モード切替
13+function changeMode(){
14+ var bd=document.body;
15+ var dl=document.getElementById("dl");
16+ if(lightmode){//normalへ
17+ /* scroll位置記憶 */ var y=bd.scrollTop;
18+ /* 擬似フレーム化 */
19+ bd.style.overflowY="hidden";
20+ dl.style.posWidth =bd.clientWidth-120;
21+ dl.style.height ="100%";
22+ dl.style.overflowY="scroll";
23+ /* モード移行 */ lightmode=false;
24+ /* スクロール */ dl.scrollTop=y; scrollTo(0,0);
25+ /* tpの表示 */ tp.style.visibility="visible";
26+ /* cpの移動 */ cp.style.posRight=3;
27+ /* panel=on */ panel=true;
28+ }else{ //lightへ
29+ var dcW=panel ? dl.clientWidth+120 : dl.clientWidth;
30+ /* scroll位置記憶 */ var y=dl.scrollTop;
31+ /* 擬似フレーム解除 */
32+ bd.style.overflowY="scroll";
33+ dl.style.posWidth =dcW;
34+ dl.style.posHeight="";
35+ dl.style.overflowY="auto";
36+ /* モード移行 */ lightmode=true;
37+ /* スクロール */ bd.scrollTop=y;
38+ /* tpの非表示 */ tp.style.visibility="hidden";
39+ /* cpの移動 */ cp.style.posRight=3;
40+ /* panel=off */ panel=false;
41+ }
42+}
43+
44+// パネルの展開
45+var panel;
46+function changePanel(){
47+ if(lightmode){return}
48+ var dl=document.getElementById("DL");
49+ /* 閉 */if(panel){cp.style.posRight=18;dl.style.posWidth=document.body.clientWidth; tp.style.visibility="hidden"; panel=false;}
50+ /* 開 */else {cp.style.posRight=3; dl.style.posWidth=document.body.clientWidth-120;tp.style.visibility="visible"; panel=true;}
51+}
52+// LOADボタン
53+function insButton(a,hRH) {
54+ if(a.className!='replaced' && a.parentElement.tagName!='DIV'){
55+ if(imageExt2(a.href)){
56+ var nHTML='<input type="button" value="LOAD" onClick=\'loadImage(this,"'+a.href+'");blur()\'>';
57+ }else if(imageExt(a.href)){
58+ var nHTML='<input type="button" value="LOAD" onClick=\'loadImage(this,"'+a.href+'");blur()\'>'
59+ +'<input type="button" value="VIEW" onClick=\'changeView("swf","'+a.href+'");blur()\'>';
60+ }else{
61+ var ahref=(hRH)?hRH:a.href;
62+ if(ahref.match(/^javascript:.*'(.*)'.*/)){ahref=RegExp.$1+document.getElementsByName("ThreadURL")[0].content;a.href=ahref}
63+ var nHTML='<input type="button" value="VIEW" onClick=\'changeView("html","'+ahref+'");blur()\'>'
64+ +'<input type="button" value="CHECK" onClick=\'changeView("html","http://so.7walker.net/?site='+ahref+'");blur()\'>';
65+ }
66+ a.insertAdjacentHTML('AfterEnd',nHTML);
67+ a.className = 'replaced';
68+ if(imageExt2(a.href)){
69+ if(!event||event.type=="mousemove"||event.type=="scroll"||event.type=="onload"){ // autoImageLoadでの読込
70+ if(onOpenLoad){loadImage(a.nextSibling,a.href)}
71+ }else if(event.type=="mouseover"){ // mouseoverでの読込
72+ if(onMouseLoad){loadImage(a.nextSibling,a.href)}
73+ }else if(event.type=="click"){ // allImageloadでの読込
74+ loadImage(a.nextSibling,a.href);
75+ }
76+ }
77+ return;
78+ }
79+}
80+// 画像読込
81+function loadImage(btn,href){
82+ if(!panel){changePanel()}
83+ if(takeArisk && lightmode){changeMode()}
84+ // 同一画像確認
85+ var thumbs = document.images;
86+ var l=thumbs.length;
87+ for(var i=l;i--;){if(thumbs[i].src==href){
88+ if(lightmode){tp.style.visibility="visible";viewed=true;}
89+ //thumbs[i].scrollIntoView(true);
90+ imgOver(thumbs[i],100);
91+ return true;
92+ }}
93+ if(btn.parentElement.tagName=="DD"){var dt = btn.parentElement.previousSibling;}
94+ else {var dt = btn.parentElement;}
95+ var num = dt.firstChild.innerText;
96+ if(href.match(/www.securityfocus.com/)){if(!confirm(num+"のレスにあるhttp://www.securityfocus.com/の画像はブラクラの可能性が高いですが、開きますか?")){return}}
97+ if(href.search(/\.swf/i)==-1){
98+ var nHTML = '<div><img src="'+href+'" onLoad="imgResult(this)" onError="imgResult(this)" onClick="changeView(\'img\')" onmouseover="imgOver(this,100)" onmouseout="imgOver(this,30)">'
99+ +addAnchor(num,num)+' '
100+ +'<button onClick="changeSize(this);blur()">...</button>'
101+ +'<button onClick="removeThumb(this)">DEL</button>'
102+ +'</div>';
103+ }else{
104+ var nHTML = '<div><embed src="'+href+'" onFocus="changeView(\'swf\')"></embed>'
105+ +addAnchor(num,num)+' '
106+ +'<button onClick="blur()">___</button>'
107+ +'<button onClick="removeThumb(this)">DEL</button>'
108+ +'</div>';
109+ }
110+ if(btn.tagName=="INPUT"){btn.value = 'LOADED';}
111+ tp.insertAdjacentHTML('BeforeEnd',nHTML);
112+ //表示継続
113+ if(!viewed){tp.style.visibility="visible";viewed=true;}
114+}
115+// 画像読込判定
116+function imgResult(img){
117+ var btn=img.parentElement.children.item(2);
118+ if(event.type=="load"){btn.value='___'; img.style.display='block';}
119+ else {btn.value='NONE';btn.style.color='#C00';}
120+ if(event.type=="error"){
121+ var dt=getDTfromAnc(img.parentElement.children.item(1).innerText);
122+ var ddAnc=dt.nextSibling.getElementsByTagName("A");
123+ var a;var i=0;do{a=ddAnc[i];i++;}while(a.href!=img.href);
124+ var btn=a.nextSibling;
125+ btn.value='NONE';btn.style.color='#C00';
126+ }
127+}
128+// サイズの切替
129+function changeSize(btn){
130+ var img=vp.firstChild;
131+ if(!img){return}
132+ if(btn.innerText.match(/100%|_+/)){
133+ var hRatio=vp.style.pixelWidth /img.offsetWidth;
134+ var vRatio=vp.style.pixelHeight/img.offsetHeight;
135+ var ratio =(hRatio>vRatio) ? vRatio : hRatio;
136+ if(ratio>1){ratio=1}else{img.style.zoom=ratio*100+'%';}
137+ btn.innerText=Math.round(ratio*100-0.5)+"%";
138+ }else{
139+ img.style.zoom="100%";
140+ btn.innerText="100%";
141+ }
142+}
143+// サムネイルの削除
144+function removeThumb(btn){btn.parentElement.removeNode(true);}
145+function removeError(){
146+ if(tp){
147+ var l=tp.childNodes.length;
148+ for(var i=l;i--;){
149+ var stateBtn=tp.childNodes[i].childNodes[2];
150+ if(stateBtn.tagName=="BUTTON" && stateBtn.innerText=="NONE"){stateBtn.parentElement.removeNode(true);}
151+ }
152+ }
153+}
154+// 画像表示の切替
155+function changeView(mode,href){
156+ if(!href){href=event.srcElement.src}
157+ if(tp){
158+ var l=tp.childNodes.length;
159+ for(var i=l;i--;){
160+ var stateBtn=tp.childNodes[i].childNodes[2];
161+ if(stateBtn.tagName=="BUTTON" && stateBtn.innerText!="NONE"){stateBtn.innerText="___"} //embedはchildNodesに入らない?
162+ }
163+ }
164+ if(!vp.hasChildNodes() || vp.firstChild.src!=href){
165+ var nHTML,buttons;
166+ if(browser!="ホットゾヌ2"){buttons='<button onclick="window.open(\''+href+'\',\'_parent\');clearView()">OPEN</button><button onclick="clearView()">CLOSE</button>';}
167+ else {buttons='<button onclick="window.open(\''+href+'\',\'_blank\');clearView()">OPEN</button><button onclick="clearView()">CLOSE</button>';}
168+ if (mode=="img") {nHTML='<img src="'+href+'" ondragstart="imageMoveStart(this)" ondrag="imageMove(this)" onclick="clearView()">'}
169+ else if(mode=="swf") {nHTML='<embed src="'+href+'"></embed>'+buttons}
170+ else if(mode=="html"){nHTML='<object data="'+href+'" type="text/html" onError="htmlNotFound()"></object>'+buttons}
171+ vp.innerHTML=nHTML;
172+ vp.style.posWidth =document.body.clientWidth -130;
173+ vp.style.posHeight=document.body.clientHeight-20;
174+ if(mode=="img"){changeSize(event.srcElement.parentElement.childNodes[2])}
175+ }else{clearView()}
176+}
177+//Viewパネルクリア
178+function clearView(){
179+ while(vp.hasChildNodes()){vp.childNodes[0].removeNode(true)}
180+ vp.style.posWidth ="";
181+ vp.style.posHeight="";
182+}
183+var imageMoveX,imageMoveY;
184+function imageMoveStart(obj){
185+ imageMoveX=obj.parentElement.scrollLeft+event.clientX;
186+ imageMoveY=obj.parentElement.scrollTop +event.clientY
187+}
188+function imageMove(obj) {
189+ obj.parentElement.scrollLeft=imageMoveX-event.clientX;
190+ obj.parentElement.scrollTop=imageMoveY -event.clientY
191+}
192+function htmlNotFound(){
193+ alert('404 NotFound かも\ ');
194+ clearView();
195+}
196+// LOADボタン挿入対象拡張子(通常用)
197+function imageExt(isu) {if(isu.search(/\.png$|\.jp(g|e|eg)$|\.gif$|\.bmp$|\.swf/i)!=-1){return true}else{return false}}
198+// LOADボタン挿入対象拡張子(一括読込用)
199+function imageExt2(isu){if(isu.search(/\.png$|\.jp(g|e|eg)$|\.gif$|\.bmp$/i)!=-1){return true}else{return false}}
200+
201+// 画像一括読み込み
202+var allLoaded;
203+function allImageLoad(mode){
204+ var ddl=dds.length;var exist;
205+ for(var i=0;i<ddl;i++){
206+ if(mode=="new"){if(dds[i].previousSibling.className!="new"){continue}}
207+ var ddAnc=dds[i].getElementsByTagName("A");
208+ for(j=0;j<ddAnc.length;j++){
209+ cn=ddAnc[j];
210+ if(imageExt2(cn.href)){insButton(cn,cn.href);exist=true}
211+ }
212+ }
213+ if(!exist){
214+ var target;
215+ if(mode=="new"){target="新着レス"}else{target="全てのレス"}
216+ alert(target+"に画像はないよ\ ")
217+ }
218+}
219+// モザイク処理
220+function imgOver(my,num) {my.style.filter="Alpha(opacity="+num+")"}
--- /dev/null
+++ b/res/skin/skin30-2G_IE7/chie_popup.js
@@ -0,0 +1,114 @@
1+//==========以下はスクリプト本文ですよ。
2+// イベントハンドラ:onMouseover
3+// 外部変数:idHash,refHash,foudRes,highlight
4+// 外部関数:addAnchor,getDTfromAnc
5+// 特徴:DIV#popupBase下に「フラットでリニア」にDL#p\dを作成する。
6+//==========CSSの出力
7+var nCSS=''
8+nCSS+='#popupBase{font-size:90%;}'; //フォントサイズの指定
9+nCSS+='#popupBase{position:absolute;width:100%;height:100%;z-index:7}';
10+nCSS+='#popupBase dl{position:absolute; background-color:window; border:outset 1px infobackground; overflow-y:auto; z-index:5; border-top:none}';
11+nCSS+='#popupBase dt span{float:none; margin-left:1em;}';
12+nCSS+='#popupBase dd{margin:auto 1em}';
13+document.write('<style type="text/css">'+nCSS+'</style>\n');
14+//=========外部ファイル共用のグローバル変数
15+//=========ナンバーな名前のポップアップ
16+function namePopup(e,before,num,after){
17+ var hnum=tohan(num);
18+ if(hnum==774 || hnum==21 || hnum==1 || hnum==30){return} // Socket774、774KB、21禁、[1-30]、などは無視
19+ if(before && before.match(/名無/)){return} //名無しっぽいのは無視
20+ if(after) {if(after=="周年"){return}} // デフォルトな"n周年"は無視
21+ var nB = before ? "<b>"+before+"</b><b>":"<b>"; nB+=addAnchor(hnum,num); nB+=after ? "</b><b>"+after+"</b>":"</b>";
22+ e.outerHTML=nB;
23+}
24+//=========弱あぼ〜んのポップアップ
25+function abonePopup(e){e.outerHTML = "<b>"+addAnchor(e.parentElement.previousSibling.innerText,'あぼ〜ん')+"</b>";}
26+//=========検索したレスのポップアップ
27+function searchPopup(obj){
28+ var reg,cArray;var tag=obj.tagName;
29+ /*ref Popup*/if (tag=="A") {if(refHash[obj.innerText]){cArray=refHash[obj.innerText].split(" ")}else{return}}
30+ /*ID Popup*/ else if(tag=="SPAN"){reg=getID(obj);if(reg&&reg.length>3){cArray=idHash[reg].split(" ");}else{return} if(cArray.length==1){return}}
31+ /*検索Popup*/else if(tag=="TT") {var cHash=(obj.parentElement.rel=="res")?foundRes:highlight;cArray=cHash[obj.parentElement.firstChild.style.backgroundColor];if(!cArray){return}}
32+ var targetString=""; for(var i=0;i<cArray.length;i++){targetString+=returnString(cArray[i]);} //中身の切り出し
33+ if(targetString){popup(targetString);} //対象が存在したらポップアップ
34+}
35+//=========多段ポップアップ
36+//・ポップアップの作成
37+function makePopContent(obj){
38+ //事前準備
39+ var num=obj.innerText.replace(/[>>]/g,""); var number=tohan(num);
40+ if(!obj.rel){obj.rel=obj.href;} obj.href="decoy:"; // ブラウザ本体のポップアップ回避
41+ //番号調査
42+ if(number.match(/(\d*)\D+(\d*)/)){var start=parseInt(RegExp.$1); var end=parseInt(RegExp.$2);}
43+ else {var start=end=parseInt(number);}
44+ if(end-start>100){end=start+100} // 100以上表示しない
45+ //中身の切り出し
46+ var targetString=""; for(var i=0;i<=end-start;i++){targetString+=returnString(start+i)}
47+ //対象が存在したらrelに退避してポップアップ
48+ if(targetString){popup(targetString);}else{obj.href=obj.rel;}
49+}
50+//・中身の切り出し
51+function returnString(num){
52+ var obj=getDTfromAnc(num);
53+ setSearchColor(obj);//ポップアップ先の着色
54+ if(!obj){return("")} //対象が透明あぼ〜んなら終了
55+ var dt=obj.cloneNode(true);
56+ var dtOuter=dt.outerHTML.replace(/name=.*?>/g,">"); // LABELNUMBER対応のものに係るリンクアンカーの除去
57+ var dd=obj.nextSibling.cloneNode(true);
58+ if(dd.hasChildNodes()){
59+ while(dd.lastChild.name){dd.lastChild.removeNode(true)} // LABELNUMBER非対応のものに係るリンクアンカーの除去
60+ if(dd.lastChild.tagName=="DL"){dd.lastChild.removeNode(true)} // 逆参照の除去
61+ }
62+ var ddOuter=dd.outerHTML;
63+ return(dtOuter+ddOuter);
64+}
65+//・ポップアップ
66+var pb;
67+function popup(inner){
68+ if(!pb){document.body.insertAdjacentHTML('afterBegin','<div id="popupBase"></div>');pb=document.getElementById("popupBase")}
69+ //要素の作成
70+ var parent=event.srcElement.parentElement;
71+ //var aNum= (parent.tagName!="DD") ? parent.firstChild.sourceIndex : parent.previousSibling.firstChild.innerText; // DD以外=名前欄、画像、ID検索
72+ var aNum=event.srcElement.sourceIndex;if(!aNum){alert("aNum取得エラー")}
73+ if(document.getElementById('p'+aNum)){return} // ポップアップしてたら終了
74+ pb.insertAdjacentHTML("beforeEnd",'<dl id="p'+aNum+'">'+inner+'</dl>');
75+ //要素の配置
76+ var p=document.getElementById('p'+aNum);
77+ // y軸調整
78+ var pos=Math.min(event.y,document.body.clientHeight-event.y);
79+ var scTop=document.body.scrollTop+event.y;
80+ if(pos==event.y){var y=scTop-30;} // カーソルの下へ表示
81+ else {var y=scTop+10-p.clientHeight;} // カーソルの上へ表示
82+ if(y<0){y=0}
83+ if(event.srcElement.parentElement.tagName=="TT"){y+=35;}
84+ p.style.pixelTop=y;
85+ // x軸調整
86+ var pos=Math.min(event.x,document.body.clientWidth-event.x);
87+ var scLeft=document.body.scrollLeft+event.x;
88+ if(pos==event.x){var x=scLeft-2} // カーソルの右へ表示
89+ else {var x=scLeft-4-p.clientWidth;} // カーソルの左へ表示
90+ if(x<0){x=0}
91+ p.style.pixelLeft=x;
92+ // 高さ調整(scrollBarを要す場合と要しない場合がある)→y軸調整
93+ if(p.clientHeight>Math.max(event.y,document.body.clientHeight-event.y)){
94+ if(p.clientHeight>document.body.clientHeight){p.style.pixelHeight=document.body.clientHeight-2;}
95+ p.style.pixelTop=document.body.scrollTop;
96+ }
97+}
98+//・ポップアップ消去
99+function removePopup(popid){
100+ if(pb){while(pb.lastChild){pb.lastChild.removeNode(true)}}
101+}
102+//数値変換(to半角)
103+function tohan(num){
104+ var zen="0123456789";
105+ var han="0123456789";
106+ var hnum="";
107+ if(zen.indexOf(num.charAt(0))!=-1){
108+ for(var i=0;i<num.length;i++){
109+ var at=zen.indexOf(num.charAt(i));
110+ hnum+=han.charAt(at);
111+ }
112+ }else{hnum=num}
113+ return hnum;
114+}
--- /dev/null
+++ b/res/skin/skin30-2G_IE7/chie_search.js
@@ -0,0 +1,489 @@
1+beID=false; // beにログイン出来る場合は、true
2+//==========検索設定
3+var expression="multiAND"; // 検索方法  default:標準、regExp:正規表現、multiAND:AND検索、multiOR:OR検索
4+var searchView="resList"; // 検索結果表示  resList:該当レス番号表示、resPopup:該当レスポップアップ、
5+var resultView=false; // 検索結果の常時表示  true:常時表示、false:マウスで近づけたときのみ表示
6+var listLimit =10; // searchViewがresPopupでない場合の、レス番号の表示制限
7+//==========レス番号、日付文字列の着色設定
8+coloring=1; // 着色する:1 着色しない:0
9+threshold1=[2,"#0000ff"]; // 書き込みが複数あるID のしきい値と色
10+threshold2=[5,"#aaaa00"]; // 書き込みが多数あるID のしきい値と色
11+threshold3=[8,"#ff0000"]; // 書き込みが多数あるID のしきい値と色
12+threshold4=[1,"#0000FF"]; // 書き込みがある レス のしきい値とレス番号の色
13+threshold5=[4,"#aaaa00"]; // 書き込みが多数あるレス のしきい値とレス番号の色
14+threshold6=[7,"#ff0000"]; // 書き込みが多数あるレス のしきい値とレス番号の色
15+//==========名前・ID検索によるレスの帯の色指定(16進数又はWeb形式の色名で指定。いくつでも可。アルファベットは小文字でお願い)
16+var foundResColor =new Array("#ffdfee","#eeffdf","#ffeedf","#dfffee","#eedfff","#ffffe1");
17+//==========単語検索によるハイライト色指定(同上)
18+var highlightColor=new Array("#ffff66","#a0ffff","#99ff99","#ff9999","#ff66ff","#880000","#00aa00","#886800","#004699","#990099");
19+//==========以下はスクリプト本文ですよ。
20+// イベントハンドラ:onClick,onScroll,onMousemove
21+// 外部関数:addAnchor,checkAnchor,tohan,searchPopup
22+// 外部変数:anchorHead,browser,fp
23+// 逆参照の特徴:イベント発生DTに対応するDD下に、DL-DT-DD構造を作成する。
24+//==========CSSの出力
25+var nCSS='';
26+nCSS+='#foundPanel {position:absolute;top:expression(body.scrollTop+25);right:18px;padding:2px 5px;z-index:6;background-color:white;border:1px solid #999;visibility:hidden}';
27+nCSS+='#foundPanel div{padding-left:5px;text-align:right;font-size:100%;}';
28+nCSS+='.refResult{margin:0.5em 0.3em; border:1px solid #666;padding-right:0px}';
29+nCSS+='.refResult{border-top:none}';
30+nCSS+='.refResult dt{margin-right:0px;}';
31+nCSS+='.refResult dd{margin-left:0.8em;}';
32+document.write('<style type="text/css">'+nCSS+'</style>\n');
33+var nCSS='';
34+for(var css in foundResColor){
35+ var c=foundResColor[css].replace(/#/,"");
36+ nCSS+='#COLOR'+c+" a{border-color:"+foundResColor[css]+"}\n";
37+ nCSS+='#COLOR'+c+" a:hover{border-color:red}\n";
38+}
39+document.write('<style type="text/css">'+nCSS+'</style>\n');
40+//=========外部ファイル共用のグローバル変数
41+var dts=document.getElementsByTagName('DT');
42+var dds=document.getElementsByTagName('DD');
43+var idHash=new Array(); var refHash=new Array();
44+var foundRes,highlight;
45+//==========IDと参照をハッシュに格納
46+// 配列のハッシュより軽いっぽいので、空白区切りの値による単純なハッシュにしてみるテスト。
47+// setEndIdx:本文の同レスを重複処理しないように、Hash化位置としてのdtsの最終indexを記憶
48+// setEndNum:本文以外レスを重複処理しないように、最終レス番号を記憶
49+var setEndIdx=setEndNum=0;
50+function setHash(){
51+ //var t0=new Date();
52+ var l=Math.min(dts.length,dds.length);
53+ var lastNum=l ? parseInt(dts[l-1].firstChild.innerText) : 0;
54+ if(isNaN(lastNum)&&l>1){lastNum=parseInt(dts[l-2].firstChild.innerText)} //Footerありなら一つ前
55+ if(l==0 || lastNum<=setEndNum){return} // 最後まで調査済みなら回避
56+ for(var i=setEndIdx;i<l;i++){
57+ if(dds[i].parentElement.className=="refResult"){continue} // 逆参照内のDDなら回避
58+ var num=dts[i].firstChild.innerText; var span=dts[i].lastChild;
59+ // ID
60+ var t=getID(span); if(t&&t.length>3){idHash[t] = idHash[t] ? idHash[t]+" "+num : num;} // ???やID:0,ID:#(@ゾヌ)はスルー。
61+ // 画像板
62+ var imgURL=getIMG(span);
63+ if(imgURL){
64+ var dd=dts[i].nextSibling;
65+ if(tp && imgURL && !dd.getElementsByTagName("IMG").length){
66+ var aObj=(dd.innerText)?'<br><a href="'+imgURL+'">'+imgURL+'</a>':'<a href="'+imgURL+'">'+imgURL+'</a>';
67+ if(!beID && imgURL.match(/kako/)){/*dd.insertAdjacentHTML("beforeEnd","<br>Beにログインしてないと取得できません");*/}else{dd.insertAdjacentHTML("beforeEnd",aObj)}
68+ }
69+ }
70+ // ref,IMG
71+ var ddAnc=dds[i].getElementsByTagName("A");
72+ for(var j=0;j<ddAnc.length;j++){
73+ try{ddAnc[j].href}catch(err){continue} // IE7だと何故かhrefが取得出来ないA要素がある
74+ var ancType=checkAnchor(ddAnc[j].href);
75+ if (ancType==0){
76+ continue;
77+ }else if(ancType==1){
78+ var anc=tohan(ddAnc[j].innerText.replace(/[>>]/g,""));var start,end;
79+ if(anc.match(/(\d*)\D+(\d*)/)){
80+ start=parseInt(RegExp.$1); end=parseInt(RegExp.$2);
81+ if( (end-start>100) || (num-end<4 && start==1) ){continue} // >>1-1000とか>>1-n(直前レス)とかは華麗にスルー
82+ }else{
83+ start=end=parseInt(anc);
84+ }
85+ var k=start-1;do{k++;
86+ if((!refHash[k] || refHash[k].indexOf(num)==-1) && num>k){refHash[k]=refHash[k] ? refHash[k]+" "+num : num;} // 重複や未来へのアンカーはスルー
87+ }while(k<end);
88+ }else if(imageExt2(ddAnc[j].href) && onOpenLoad!=0){
89+ if(onOpenLoad==1){if(dds[i].previousSibling.className!="new"){continue}}
90+ insButton(ddAnc[j],ddAnc[j].href);
91+ }
92+ }
93+ }
94+ setEndIdx=l;setEndNum=lastNum;
95+ //var t1=new Date(); var t=(t1-t0)/1000; if(t){alert(t+"秒");}
96+}
97+// スレッドウィンドウ中心に前後5レスを着色
98+var resUnit=new Array();
99+function searchColoring(){
100+ if(!coloring){return;} // 着色不要なら終了
101+ if(!scr){scr=lightmode ? document.body : document.getElementById("dl");}
102+ var nowScrollPos=scr.scrollTop+document.body.clientHeight/2;
103+ var l=Math.min(dts.length,dds.length);var st,ed;
104+ // dtのoffsetTopを格納(25レス単位)
105+ if(resUnit.length<=Math.floor(dts.length/25)){resUnit[0]=0;
106+ for(var i=25;i<l;i+=25){resUnit[i/25]=dts[i].offsetTop;}
107+ }
108+ // 現在どのあたりまでスクロールしてるか調査
109+ var rul=resUnit.length-1;
110+ if (rul==0) {st=0;ed=l-1;} //25未満
111+ else if(resUnit[0]>nowScrollPos) {st=0;ed=24;} //0-24
112+ else if(resUnit[rul]<nowScrollPos){st=l-26;ed=l-1;} // 最終25レス
113+ else{
114+ for(var i=rul;i--;){
115+ if(resUnit[i+1]>nowScrollPos&&resUnit[i]<=nowScrollPos){st=i*25;ed=st+25;break}
116+ }
117+ }
118+ // 現在の範囲内からウィンドウの真ん中あたりに表示してるレスを取得(ここで着色すると、25レス単位の切替時に数レスが着色されない)
119+ var dtIdx=0; //if(cp){cp.childNodes[1].value=(st+1)+"-"+(ed+1);cp.style.visibility="visible";}
120+ for(var i=st;i<=ed;i++){if(!dts[i+1]){dtIdx=ed;break;}
121+ if(dts[i+1].offsetTop>nowScrollPos && dts[i].offsetTop<=nowScrollPos){dtIdx=i;break;}
122+ }
123+ // dtIdxからその周辺を特定
124+ var start=dtIdx-5;var end=dtIdx+5;//
125+ for(var i=start;i<=end;i++){
126+ if(dts[i]){setSearchColor(dts[i])}
127+ }
128+}
129+// IDHash、refHashを元に着色
130+function setSearchColor(dt){
131+ if(!dt.innerText){return}
132+ // ID
133+ var span=dt.lastChild; var t=getID(span);//alert(t +"&&"+ idHash[t] +"&&"+ span);
134+ if (browser=="ホットゾヌ2"){span=span.lastChild}
135+ else if(browser=="A Bone") {span=span.childNodes[1]}
136+ if(t && idHash[t] && span){
137+ var idResult=idHash[t].split(" "); if(t.match(/\?\?\?/)){idResult="";idHash[t]="";}
138+ if (idResult.length>=threshold3[0]){span.style.color=threshold3[1];span.title="同一ID ("+idResult.length+"回)\n"+idHash[t]}
139+ else if(idResult.length>=threshold2[0]){span.style.color=threshold2[1];span.title="同一ID ("+idResult.length+"回)\n"+idHash[t]}
140+ else if(idResult.length>=threshold1[0]){span.style.color=threshold1[1];span.title="同一ID ("+idResult.length+"回)\n"+idHash[t]}
141+ else if(idResult.length==1){span.title="同一IDは\nありません"}
142+ }
143+ // ref
144+ var numA=dt.firstChild; var num=numA.innerText;
145+ if(refHash[num]){
146+ var refResult=refHash[num].split(" ");
147+ if (refResult.length>=threshold6[0]){numA.style.color=threshold6[1];dt.title="これへのレス ("+refResult.length+"個)\n"+refHash[num];}
148+ else if(refResult.length>=threshold5[0]){numA.style.color=threshold5[1];dt.title="これへのレス ("+refResult.length+"個)\n"+refHash[num];}
149+ else if(refResult.length>=threshold4[0]){numA.style.color=threshold4[1];dt.title="これへのレス ("+refResult.length+"個)\n"+refHash[num];}
150+ else{numA.title="これへのレスはない模様"}
151+ }
152+ // anc
153+ var dd=dt.nextSibling; if(!dd){return} // footerのdtから呼ばれると次のddは不存在
154+ ddAnc=dd.getElementsByTagName("A");
155+ for(var i=ddAnc.length;i--;){
156+ var h=tohan(ddAnc[i].innerText);var tNum=h.replace(/\D/g,"");
157+ if(refHash[tNum]){
158+ var refResult=refHash[tNum].split(" ");
159+ if (refResult.length>=threshold6[0]){ddAnc[i].style.color=threshold6[1];}
160+ else if(refResult.length>=threshold5[0]){ddAnc[i].style.color=threshold5[1];}
161+ else if(refResult.length>=threshold4[0]){ddAnc[i].style.color=threshold4[1];}
162+ }
163+ }
164+}
165+//==========名前・ID検索等
166+function searchPerson(obj){
167+ var by,thisDT,reg;
168+ if (obj.tagName=="DT") {by="ID"; thisDT=obj; reg=getID(obj)}
169+ else if(obj.tagName=="SPAN"){by="ID"; thisDT=obj.parentElement;reg=getID(obj)}
170+ else if(obj.tagName=="U") {by="NAME";thisDT=obj.parentElement; reg=obj.innerHTML.replace(/<B>(.*?)<\/B>/ig,"");if(!reg){reg=RegExp.$1.replace(/<.*?A.*?>/ig,"")}/*名前が数字*/}
171+ else if(obj.tagName=="B") {by="NAME";thisDT=obj.parentElement.parentElement;reg=obj.innerText}
172+ else{return}
173+ if(!thisDT.rel){
174+ var c=selectColor("res"); if(!c){return} var color=new Array(c); // カラー選択
175+ if(by=="ID"){
176+ if(!reg || !idHash[reg]){return} // IDなし、ID:???、本文中の他スレのコピペID
177+ // 検索ハッシュに値を設定して、それに基づきレス着色
178+ foundRes[c]=idHash[reg].split(" "); foundRes[c].word="ID:"+reg;
179+ for(i in foundRes[c]){var dt=getDTfromAnc(foundRes[c][i]);toggleResColor(dt,c);}
180+ }else{
181+ var us=document.getElementsByTagName("U"); var l=us.length;
182+ var regName=new RegExp();regName.compile(reg);
183+ // ループ中にレス着色・値の設定を同時実行
184+ for(var i=l;i--;){var dt=us[i].parentElement;
185+ if(dt.parentElement.className=="refResult"){continue} // 逆参照内のDTなら回避
186+ if(regName.test(us[i].innerText)){toggleResColor(dt,c);foundRes[c].unshift(dt.firstChild.innerText);}
187+ }
188+ foundRes[c].word=reg;
189+ }
190+ returnFound("res",color);
191+ }else{
192+ clearColor("res",thisDT.style.backgroundColor);
193+ }
194+}
195+// ID文字列の抽出
196+var regID=new RegExp(); // HOSTも可能にしてみる
197+regID.compile(".*?\\s.*?\\s.*:(.*?)(\\s|$)"); // 1000resで0.02秒ほど高速
198+function getID(span){
199+ if(regID.test(span.innerText)){return(RegExp.$1)}else{return(false)}
200+}
201+//==========色設定解除
202+// オブジェクトの初期化
203+function createHash(name,key,arr,word){
204+ name[key]=arr?arr:new Array();
205+ name[key].word=word?word:"";
206+ name[key].justMovedRes=undefined;
207+}
208+// 色選択(該当レス番号配列を持たないキーを返す)
209+function selectColor(type){
210+ if(!foundRes) {foundRes =new Array();for(var i in foundResColor) {createHash(foundRes,foundResColor[i]);}} // Hash foundRes ={色:該当レス番号配列}
211+ if(!highlight){highlight=new Array();for(var i in highlightColor){createHash(highlight,highlightColor[i]);}} // Hash hightLight={色:該当レス番号配列}
212+ var cHash,cArray,cMess;
213+ if(type=="res"){cHash=foundRes; cArray=foundResColor; cMess="今までのレス着色を解除しますか?";}
214+ else {cHash=highlight;cArray=highlightColor;cMess="今までのハイライトを解除しますか?";}
215+ var i=0; while(cHash[cArray[i]].word){
216+ i++; if(i==cArray.length){if(confirm(cMess)){clearColor(type);i=0;break}else{i=null;break}}
217+ }
218+ return(cArray[i]);
219+}
220+// 色解除(ハッシュ、対象、foundPanel)
221+function clearColor(type,color){
222+ var cHash=(type=="res")?foundRes:highlight;
223+ if(event && event.altKey){color=""}
224+ for(var i in cHash){
225+ if(type=="res"){
226+ if(color && i!=color){continue} // 指定色でなければスルー
227+ for(var j in cHash[i]){
228+ if(event.srcElement.value=="DEL"){removeRes(getDTfromAnc(cHash[i][j]))}else{toggleResColor(getDTfromAnc(cHash[i][j]))}
229+ }
230+ cHash[i]=new Array();
231+ document.getElementById("c"+i).removeNode(true);
232+ }else{
233+ var strongs=document.getElementsByTagName("STRONG");
234+ var reg=new RegExp(i);
235+ if(!color.match(i)){continue} // 指定色でなければスルー
236+ for(var j=0;j<strongs.length;j++){
237+ if(strongs[j].style.backgroundColor==i){
238+ if(event.srcElement.value=="DEL"){removeRes(strongs[j].parentElement.previousSibling);j--}else{strongs[j].removeNode(false);j--}
239+ }
240+ }
241+ cHash[i]=new Array();
242+ if(document.getElementById("c"+i)){document.getElementById("c"+i).removeNode(true);} // and,or検索で1色目のみ
243+ }
244+ }
245+ if(!fp.hasChildNodes()){fp.style.visibility="hidden";searched=false;}
246+}
247+// レス色トグル
248+function toggleResColor(dt,c){
249+ if(!dt){return} // for-inで送られる番号以外のobjなら終了
250+ if(c){
251+ dt.rev=dt.style.backgroundColor;
252+ dt.rel="colored";
253+ dt.id ="COLOR"+c.replace(/#/,"");
254+ dt.style.backgroundColor=c;
255+ }else{
256+ dt.style.backgroundColor=dt.rev;
257+ if(dt.id.match(/COLOR/)){dt.removeAttribute("id")}//else{alert("dtにCOLOR***以外のid("+dt.id+")が設定されています")}
258+ dt.removeAttribute("rev");
259+ dt.removeAttribute("rel");
260+ }
261+}
262+// 検索結果に基づき消去
263+function removeRes(dt){if(!dt){return} // cHash[i][j]=ID:xxxxxxxxのとき
264+ if(browser=="Live2ch"){location.href='func:ABONECLEAR?'+dt.firstChild.innerText;} // Liveのみ-透明あぼ〜ん
265+ dt.nextSibling.removeNode(true);dt.removeNode(true);
266+}
267+//==========結果表示
268+// レス番号リスト(ポップアップアンカーを含む)
269+function returnFound(type,color){
270+ var nDIV="";
271+ var cHash,numArray;
272+ // 対象オブジェクト(検索の時は重複排除)
273+ if(type=="res"){
274+ cHash=foundRes;numArray=cHash[color[0]];
275+ }else{
276+ cHash=highlight;numArray=cHash[color[0]];
277+ }
278+ // 表示方法
279+ var display=new Array(["none","POP"],["inline","LST"]);
280+ if(searchView=="resPopup" || numArray.length==0 || numArray.length>=listLimit){display=display.reverse();}
281+ // ポップアップ
282+ var nTT="";for(var i=0;i<color.length;i++){nTT+='<tt style="background-color:'+color[i]+'"> '+cHash[color[i]].word+'</tt>';}
283+ nDIV+='<span rel="'+type+'" style="display:'+display[0][0]+'">'+nTT+'</span>';
284+ // リスト
285+ var nA="";for(var i=0;i<numArray.length;i++){nA+=addAnchor(numArray[i],numArray[i])+" "}
286+ nDIV+='<tt style="background-color:'+color[0]+'" style="display:'+display[1][0]+'"> '+nA+'</tt>';
287+ // 個数
288+ nDIV+='&nbsp;'+numArray.length+' ';
289+ var buttons='<input type="button" value="'+display[0][1]+'" onclick="changeSearchView();blur()"><input type="button" value="∨" onclick="moveToSearchRes(\''+type+'\',\''+color+'\')" title="下へ検索"><input type="button" value="∧" onclick="moveToSearchRes(\''+type+'\',\''+color+'\')" title="上へ検索"><input type="button" value="CLR" onclick="clearColor(\''+type+'\',\''+color+'\')" title="Alt押下時\n着色レス全て"><input type="button" value="DEL" onclick="clearColor(\''+type+'\',\''+color+'\')" title="Alt押下時\n着色レス全て">';
290+ fp.innerHTML+='<div id="c'+color[0]+'">'+nDIV+buttons+'</div>';
291+ fp.style.visibility="visible";searched=true;
292+}
293+// 対象レスにジャンプ
294+var markedDT;
295+function moveToSearchRes(type,color){
296+ if(color.match(/(.*?),/)){color=RegExp.$1}
297+ var scope = (event && event.srcElement.value=="∧") ? false : true ;
298+ var numArray= (type=="res") ? foundRes[color] : highlight[color];
299+ if(isNaN(numArray.justMovedRes)){numArray.justMovedRes=0}
300+ else{
301+ markedDT.style.borderColor="#999";
302+ if(scope){numArray.justMovedRes++;if(numArray.justMovedRes>=numArray.length){numArray.justMovedRes--;alert("これより下にはありません")}}
303+ else {numArray.justMovedRes--;if(numArray.justMovedRes<0){numArray.justMovedRes++;alert("これより上にはありません")}}
304+ }
305+ markedDT=getDTfromAnc(numArray[numArray.justMovedRes]); markedDT.style.borderColor="red";
306+ markedDT.scrollIntoView(true);
307+ setTimeout('markedDT.style.borderColor="#999"',5000);
308+}
309+// ポップアップとリスト表示切り替え
310+function changeSearchView(){
311+ var e=event.srcElement;
312+ if(e.value=="POP"){
313+ e.value="LST";
314+ e.parentElement.childNodes[0].style.display="inline";
315+ e.parentElement.childNodes[1].style.display="none";
316+ }else{
317+ e.value="POP";
318+ e.parentElement.childNodes[0].style.display="none";
319+ e.parentElement.childNodes[1].style.display="inline";
320+ }
321+}
322+
323+//==========単語検索
324+function findIt(arg){createSearchPanel(arg);}
325+var searchWindow=null;
326+// 検索ウィンドウの表示
327+function createSearchPanel(arg){ // 専用ブラウザでのmodelessDialogへの外部読み込みでは、dialogArgumentsが送れないので直接書き出す
328+ if(arg){word=arg}
329+ if(searchWindow && !searchWindow.closed){return}
330+ var skinPath=document.getElementsByName("SkinPath")[0].content;
331+ searchWindow=showModelessDialog("",window,'dialogWidth:500px;dialogHeight:200px;dialogTop:0px;dialogLeft:0px;help:no;resizable:yes;status:no;unadorned:yes;');
332+ var nWin='<html><head><title>単語の検索<\/title>'
333+ +'<script type="text/javascript">function submitEvent(){var fo=document.forms[0]; dialogArguments.word=fo.word.value; var i=-1;do{i++;dialogArguments.expression =fo.expression[i].value;}while(!fo.expression[i].checked); var i=0; while(fo.searchTarget[i]){dialogArguments.searchTarget[fo.searchTarget[i].value]=fo.searchTarget[i].checked;i++;} var i=-1;do{i++;dialogArguments.searchView =fo.searchView[i].value;}while(!fo.searchView[i].checked); dialogArguments.searchWord();}</script>'
334+ +'<style type="text/css">body{background:ThreeDFace;padding:0.5em;overflow:auto} fieldset{padding:0.5em;margin-top:0.5em;} legend,label,input{font:message-box;}</style>'
335+ +'<\/head><body onunload="unloadEvent()"><form onsubmit="submitEvent();return false;"><table width="100%"><tr><td valign="top" colspan="3">'
336+ +'<label for="word">検索文字列:</label><input type="text" name="word" id="word" size="50" value="'+word+'" tabindex="0"><br>'
337+ +'</td><td align="right" valign="top" rowspan="2">'
338+ +'<input type="submit" name="submit" value=" 検 索 " tabindex="7"><br><br><input type="button" name="cancel" value="キャンセル" onclick="window.close()" tabindex="8">'
339+ +'</td></tr><tr valign="top">'
340+ +'<td><fieldset><legend>検索方法</legend><input type="radio" name="expression" value="default" id="tDef" tabindex="1"> <label for="tDef">通常検索</label><br><input type="radio" name="expression" value="regExp" id="tReg"> <label for="tReg">正規表現</label><br><input type="radio" name="expression" value="multiAND" id="tAND"> <label for="tAND">AND検索</label><br><input type="radio" name="expression" value="multiOR" id="tOR"> <label for="tOR">OR検索</label></fieldset></td>'
341+ +'<td><fieldset><legend>検索対象</legend><input type="checkbox" name="searchTarget" value="name" id="tName" tabindex="2" checked> <label for="tName">名前</label><br><input type="checkbox" name="searchTarget" value="mail" id="tMail" tabindex="3" checked> <label for="tMail">メール</label><br><input type="checkbox" name="searchTarget" value="id" id="tID" tabindex="4" checked> <label for="tID">日付とID</label><br><input type="checkbox" name="searchTarget" value="mess" id="tMess" tabindex="5" checked> <label for="tMess">本文</label></fieldset></td>'
342+ +'<td><fieldset><legend>結果表示</legend><input type="radio" name="searchView" value="resList" id="rList" tabindex="6"> <label for="rList">レス番号を表示</label><br><input type="radio" name="searchView" value="resPopup" id="rPop"> <label for="rPop">レスをポップアップ</label><br><input type="radio" name="searchView" value="resJump" id="rJump"> <label for="rJump">レスへジャンプ</label></fieldset></td>'
343+ +'</tr></table></form><\/body><\/html>';
344+ searchWindow.document.write(nWin);
345+ sdf=searchWindow.document.forms[0]; sdf.elements[0].select();
346+ var ex=sdf.expression;for(var i=0;i<ex.length;i++){if(ex[i].value==expression){ex[i].checked=true}}
347+ var sv=sdf.searchView;for(var i=0;i<sv.length;i++){if(sv[i].value==searchView){sv[i].checked=true}}
348+ range=document.body.createTextRange();
349+}
350+// 検索処理メイン
351+var word="";var range;var searchTarget={"word":true};
352+function searchWord(){
353+ if(!word){return} word=word.replace(/(^\x20+|\x20+$)/g,"");
354+ var matchs=new Array(); var color=new Array();
355+ // 検索方法
356+ if(expression=="regExp" || expression=="default" || (expression.match(/multi/) && !word.match(/\s/))){ // AND/ORで一単語ならdefaultで検索
357+ // 検索語指定
358+ if(expression=="regExp"){
359+ var regWord=word.replace(/[\^\$]/g,"");
360+ var reg=new RegExp(regWord,"g"); var tmpArr=range.text.match(reg);
361+ if(!tmpArr || !tmpArr.length){tmpArr=new Array();}
362+ var tmpHash={}; for(var i=tmpArr.length;i--;){tmpHash[tmpArr[i]]=true} for(var i in tmpHash){matchs.push(i)} // 正規表現でのマッチパターンの重複を排除
363+ if(!matchs || !matchs.length){matchs[0]=word} // 検索結果0or1なら、配列作成
364+ }else{matchs[0]=word}
365+ // ハイライト→重複排除処理
366+ var tmpHash={};
367+ for(var i=0;i<matchs.length;i++){
368+ var tmp=setHighlight(matchs[i]);
369+ color[0]=tmp[0]; // 単色なので常にcolor[0]に入れる
370+ for(var j=tmp[1].length;j--;){tmpHash[tmp[1][j]]=true;} // 同一レス内部での複数マッチを排除
371+ }
372+ createHash(highlight,color[0],"",matchs[0]);
373+ for(var i in tmpHash){highlight[color[0]].push(i);}
374+ highlight[color[0]].sort(sortByInt);
375+ highlight[color[0]].word=word;
376+ }else{
377+ // 検索語指定
378+ var matchs=word.split(" "); var tmpArr=new Array();
379+ // ハイライト→重複処理
380+ for(var i=0;i<matchs.length;i++){
381+ var tmp=setHighlight(matchs[i]);
382+ color.unshift(tmp[0]);
383+ var tmpHash={};for(var j=tmp[1].length;j--;){tmpHash[tmp[1][j]]=true} for(var j in tmpHash){tmpArr.push(j);} // 同一レス内部での複数マッチを排除
384+ highlight[color[0]].word=matchs[i];
385+ }
386+ color.reverse();tmpArr.sort(sortByInt);
387+ createHash(highlight,color[0],"",matchs[0]); // 一旦初期化
388+ var tmpHash={};var judge=(expression=="multiAND") ? matchs.length+"<=tmpHash[i]" : "1";
389+ for(var i=0;i<tmpArr.length;i++){if(tmpHash[tmpArr[i]]){tmpHash[tmpArr[i]]++}else{tmpHash[tmpArr[i]]=1}}
390+ for(var i in tmpHash){if(eval(judge)){highlight[color[0]].push(i)}} // 検索結果はhighlight[color[0]]に入れる
391+ }
392+ // 結果表示
393+ if (searchView=="resList") {returnFound("search",color);searchWindow.close();}
394+ else if(searchView=="resPopup"){returnFound("search",color);searchWindow.close();}
395+ else if(searchView=="resJump") {returnFound("search",color);searchWindow.close();if(highlight[color[0]].length){moveToSearchRes("search",color.join(","))}}
396+}
397+// ハイライト検索
398+function setHighlight(reg){
399+ // カラー選択
400+ var c=selectColor("highlight"); if(!c){return} var nums=[];
401+ // 検索
402+ while(range.findText(reg)){
403+ var dt=range.parentElement();var tag=dt.tagName; var thisRange;
404+ // 検索対象で絞り込み
405+ if(tag=="B"||tag=="U"){thisRange="name"}
406+ else if(tag=="DT") {thisRange="mail"}
407+ else if(tag=="SPAN") {thisRange="id"}
408+ else if(tag=="DD" || tag=="A" && dt.parentElement.tagName=="DD"){thisRange="mess"}
409+ else if(tag=="STRONG"){thisRange="word"}
410+ else{/*alert("tag:"+tag+"\ndt:"+dt.outerHTML);*/range.collapse(false);continue;} // レス番号(A)や検索結果自体(TT)
411+ if(!searchTarget[thisRange]){range.collapse(false);continue;}
412+ // 正規表現の位置指定子がある場合、包含要素内部で再検索
413+ if(expression=="regExp" && word.match(/[\^|\$]/)){
414+ var thisReg=new RegExp(word); var targetText=(tag=="STRONG") ? dt.parentElement.innerText : dt.innerText;
415+ if(!targetText.match(thisReg)){range.collapse(false);continue}
416+ }
417+ // dt取得→レス番号取得→ハイライト
418+ if(dt.tagName!="DT"){
419+ while(dt.tagName!="DT" && dt.tagName!="DD"){dt=dt.parentElement}
420+ if(dt.tagName=="DD"){dt=dt.previousSibling}
421+ }
422+ var num=dt.firstChild.innerText;
423+ if(dt.parentElement.className!="refResult"){nums.push(num)} // 逆参照内のDTなら回避
424+ range.pasteHTML('<strong style="background-color:'+c+'">'+range.text+'</strong>');
425+ range.collapse(false);
426+ }
427+ range=document.body.createTextRange(); // レンジを元に戻しておく
428+ return([c,nums]);
429+}
430+//==========逆参照
431+function searchRef(obj){
432+ if(obj.name!='referred'){
433+ var num=obj.firstChild.innerText;
434+ if(refHash[num]){
435+ var refArr=refHash[num].split(/\s/); var refs="";
436+ for(var i=0;i<refArr.length;i++){refs+=returnString(refArr[i]);}
437+ obj.nextSibling.insertAdjacentHTML("beforeEnd",'<dl class="refResult">'+refs+'</dl>')
438+ obj.name="referred";
439+ }
440+ }else{
441+ obj.nextSibling.lastChild.removeNode(true);
442+ obj.name='';
443+ }
444+}
445+//==========クリップボードにコピー
446+function copyText(target){
447+ var num=event.srcElement.parentElement.name;
448+ var obj=getDTfromAnc(num);
449+ var textarea=document.createElement("TEXTAREA");
450+ var message=obj.nextSibling.innerText.replace(/\s(\r\n|$)/g,"\n");
451+ if (target=="res") {textarea.value=obj.firstChild.innerText+" :"+obj.childNodes[1].innerText+" :"+obj.lastChild.innerText+"\n"+message;}
452+ else if(target=="name"){textarea.value=obj.childNodes[1].innerText+"\n";}
453+ else if(target=="mail"){textarea.value=obj.childNodes[2].nodeValue+"\n";}
454+ else if(target=="id") {textarea.value="ID:"+(obj.lastChild.innerText.split(/ID:/))[1]+"\n";}
455+ var copyText=textarea.createTextRange();
456+ copyText.execCommand("Copy")
457+ event.srcElement.parentElement.removeNode(true);
458+}
459+//==========アンカーからDTを特定
460+var ancs=document.anchors;
461+function getDTfromAnc(num){
462+ var anc=ancs(anchorHead+num);
463+ if(!anc){return("")} //LABELNUMBER対応のあぼ〜ん若しくは未出番号なら終了
464+ var obj=anc.parentElement; //LABELNUMBER対応のもの
465+ if(!obj || !obj.tagName){return false;}
466+ if(obj.tagName!="DT"){ //LABELNUMBER非対応のもの
467+ if(num==1){if(anc){obj=anc.nextSibling} else{return("")}}
468+ else {if(!anc.nextSibling){obj=anc.parentElement.nextSibling}else{return("")}}
469+ }
470+ return(obj);
471+}
472+//==========sort関数
473+function sortByInt(x,y){return(x-y)}
474+
475+// 画像板関連
476+var regIMG=new RegExp(".*?\\s.*?\\s.*:.*?\\sIMG:(.*?)(\\s|$)"); // 画像も可能にしてみる
477+function getIMG(obj){
478+ if(regIMG.test(obj.innerText)){
479+ var filename=RegExp.$1;
480+ var tmp=filename.match(/(\d\d\d\d)(\d\d\d\d)(\d\d)/);
481+ var today=new Date();var last=new Date(today-7*24*60*60*1000);var date="";
482+ date+=last.getMonth()<9 ? "0"+(last.getMonth()+1) : last.getMonth()+1;
483+ date+=last.getDate()<10 ? "0"+last.getDate() : last.getDate();
484+ var log= (RegExp.$1+""+RegExp.$2 < last.getYear()+""+date) ? "_kako/" : "_img/";
485+ var fileurl="http://up01.2ch.io/"+log+RegExp.$1+"/"+RegExp.$1+RegExp.$2+"/"+RegExp.$3+"/"+filename;
486+ return(fileurl)
487+ }else{return(false)}
488+}
489+
--- /dev/null
+++ b/res/skin/skin30-3G_IE7/Bookmark.html
@@ -0,0 +1 @@
1+<dt style="text-align:center;"><a name="koko"></a>ココまで読んだ</dt><dd></dd>
\ No newline at end of file
--- /dev/null
+++ b/res/skin/skin30-3G_IE7/Footer.html
@@ -0,0 +1,8 @@
1+<dt id="sizeinfo"> <span><SIZEKB/>KB (<SIZE/>Byte) <script type="text/javascript">
2+ end_time = new Date();
3+ start_num=start_time.getMilliseconds()+1000*(start_time.getSeconds()+60*start_time.getMinutes()+3600*start_time.getHours());
4+ end_num =end_time.getMilliseconds() +1000*(end_time.getSeconds() +60*end_time.getMinutes() +3600*end_time.getHours());
5+ document.write((end_num-start_num)/1000+'秒');
6+</script></span></dt><dd style="display:none">dummy_for_searchRef</dd></dl>
7+</body>
8+</html>
\ No newline at end of file
--- /dev/null
+++ b/res/skin/skin30-3G_IE7/Header.html
@@ -0,0 +1,63 @@
1+<html lang="ja">
2+<head>
3+<title><THREADNAME/></title>
4+<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">
5+<meta name="ThreadURL" content="<THREADURL/>">
6+<meta name="SkinPath" content="<SKINPATH/>">
7+<meta name="GetRescount" content="<GETRESCOUNT/>">
8+<link rel="stylesheet" type="text/css" charset="Shift_JIS" href="<SKINPATH/>chie_blue.css">
9+<script type="text/javascript" charset="Shift_JIS" src="<SKINPATH/>chie_search.js"></script>
10+<script type="text/javascript" charset="Shift_JIS" src="<SKINPATH/>chie_image2.js"></script>
11+<script type="text/javascript" charset="Shift_JIS" src="<SKINPATH/>chie_popup.js"></script>
12+<script type="text/javascript" charset="Shift_JIS" src="<SKINPATH/>chie_event.js"></script>
13+<!--script type="text/javascript" charset="Shift_JIS" src="<SKINPATH/>chie_mail.js"></script-->
14+<script type="text/javascript" charset="Shift_JIS">
15+var start_time = new Date();
16+//==========グローバル変数
17+var anchorHead="";
18+var skinName="skin30-3 v3.7.1112";
19+var browser="ギコナビ";
20+//==========ギコナビ用アンカーの判定(0:処理無し,1:ポップアップ,2:ボタン挿入)
21+// ギコナビでは、レスアンカーは相対アドレスで記述される
22+function checkAnchor(href){if(!href){return(0)}
23+ if (href.match(/decoy:|about:/)){return(1)}
24+ else if(href.match(/menu:|be:|read\.cgi|\.2ch\.net\/.*\/kako/)){return(0)}
25+ else{return(2)}
26+}
27+//==========リンク設定
28+function addAnchor(inner,num){
29+ if(!t_url){threadurl()}
30+ var url=document.getElementsByName("ThreadURL")[0].content;
31+ if(url.match(/&/)){
32+ return('<a href="../test/read.cgi?bbs='+t_bbs+'&key='+t_key+'&st='+inner+'&to='+inner+'&nofirst=true" target="_blank" onclick="blur()">'+num+'</a>')
33+ }else{
34+ return('<a href="../test/read.cgi/'+t_bbs+'/'+t_key+'/'+inner+'" target="_blank" onclick="blur()">'+num+'</a>')
35+ }
36+}
37+// スレッドURLの取得
38+var t_url=false,t_domain,t_bbs,t_key;
39+function threadurl(){
40+ var threadurl=document.getElementsByName("ThreadURL")[0].content;
41+ if(threadurl.match(/&/)){
42+ threadurl.match(/bbs=(.*)&key=(\d*)/);
43+ }else{
44+ threadurl.match(/^.*\/test\/read.cgi\/(.*)\/(.*)\//);
45+ }
46+ t_url=true;
47+ t_bbs=RegExp.$1;
48+ t_key=RegExp.$2;
49+}
50+//==========非表示レスの表示-ギコナビのみ
51+function hiddenRes(e){
52+ var number=tohan(event.srcElement.innerText.replace(/>|>/g,""));
53+ var i=0;while(document.anchors[i].name.match(/\D/)){i++}
54+ var startRes=parseInt(document.anchors[i+1].name.replace(/\D/g,""));
55+ if(number.match(/(\d*)\D+(\d*)/)){var start=parseInt(RegExp.$1);}
56+ else {var start=parseInt(number);}
57+ //alert(startRes+">"+start+" && "+start+"!="+1);
58+ if(startRes>start && start!=1){return true}else{return false}
59+}
60+</script>
61+</head>
62+<body>
63+<dl>
--- /dev/null
+++ b/res/skin/skin30-3G_IE7/NewRes.html
@@ -0,0 +1 @@
1+<dt class="new"><NUMBER/><u><NAME/></u><MAIL/><span><DATE/></span></dt><dd><MESSAGE/></dd>
--- /dev/null
+++ b/res/skin/skin30-3G_IE7/Newmark.html
@@ -0,0 +1 @@
1+<dt style="text-align:center;" class="new"><a name="new"></a>新着レス − <NEWDATE/> 取得</dt><dd></dd>
\ No newline at end of file
--- /dev/null
+++ b/res/skin/skin30-3G_IE7/Res.html
@@ -0,0 +1 @@
1+<dt><NUMBER/><u><NAME/></u><MAIL/><span><DATE/></span></dt><dd><MESSAGE/></dd>
--- /dev/null
+++ b/res/skin/skin30-3G_IE7/chie_base.css
@@ -0,0 +1,93 @@
1+@charset "Shift_JIS";
2+* {font-family:"MS Pゴシック"}
3+/* ふち無し */
4+body {margin:0px;padding:0px;}
5+/* リンク */
6+dt a{text-decoration:none;}
7+dd a{text-decoration:underline;line-height:1.1}
8+
9+/* 検索結果 */
10+#foundPanel{color:LightSlateGray;}
11+#foundPanel div {font-family:"MS ゴシック";}
12+#foundPanel div span{font-family:Times;cursor:hand;}
13+#foundPanel a {color:LightSlateGray;}
14+#foundPanel a:hover{color:#000;}
15+
16+/* dt */
17+dt{
18+ padding:0.3em;
19+ border-width:1px 0px;
20+ border-color:#999;
21+ border-style:solid;
22+}
23+
24+/* 名前 */
25+dt u {
26+ margin:1ex;
27+ text-decoration:none;
28+ cursor:hand;
29+}
30+u a{border-width:0px;padding:0px;}
31+
32+/* ID */
33+dt span{
34+ float:right;
35+/* margin-left:1em;*/
36+ margin-top:-23px;
37+ margin-right:0.5em;
38+ font-family:"MS ゴシック";
39+ font-size:95%;
40+ cursor: hand;
41+}
42+dt span a{font-family:"MS ゴシック";}
43+
44+/* dd */
45+dd{
46+ padding:0.5em 1em 0.5em 0em;
47+ word-break:break-all;
48+ word-wrap:break-word;
49+}
50+
51+/* ボタン */
52+input,button{ /*ここでの指定はimage.cssで上書きされる*/
53+ font-family:"Terminal";
54+ font-size:8px;
55+ margin:2px;
56+ border:1px solid #BCB5B5;
57+}
58+#controlPanel{
59+ position:absolute;
60+ top:expression(body.scrollTop+3);
61+ right:3px;
62+ padding:2px 3px;
63+ background-color:#789;
64+ z-index:6;
65+ visibility:hidden;
66+}
67+#command {text-align:center}
68+#command input{
69+ font-family:"MS ゴシック";
70+ font-size:9pt;
71+ margin:1px;
72+ width:98px;
73+}
74+#context {
75+ position:absolute;
76+ visibility:hidden;
77+ background-color:Menu;
78+ border-style:solid;
79+ border-width:2px;
80+ border-color:ThreeDHighlight ThreeDDarkShadow ThreeDDarkShadow ThreeDHighlight;
81+ padding:1px;
82+ z-index:7;
83+}
84+#context div{
85+ display:block;
86+ font:menu;
87+ padding:4px 17px;
88+ cursor:hand;
89+}
90+#sizeinfo{
91+ background-color:transparent;
92+ border:none;
93+}
--- /dev/null
+++ b/res/skin/skin30-3G_IE7/chie_blue.css
@@ -0,0 +1,19 @@
1+@import url(chie_base.css);
2+/* リンク */
3+a{color:#000;}
4+dt a {border:1px solid #EEE;}
5+dt.new a {border:1px solid #DCEAF5;}
6+dt a:active {color:#F00; background-color:#FDD; border-color:#F44;}
7+dt a:hover {color:#F00; background-color:#FDD; border-color:#F44;}
8+
9+dd a:link {color:#06559B;}
10+dd a:visited{color:#669;}
11+dd a:active {color:#F55; background-color:#FDD;}
12+dd a:hover {color:#F55; background-color:#FDD;}
13+
14+/* dt */
15+dt {background-color: #EEE;}
16+dt.new {background-color:#DCEAF5;}
17+
18+/* 逆参照内部 */
19+.refResult dt a{color:#000;text-decoration:none}
--- /dev/null
+++ b/res/skin/skin30-3G_IE7/chie_event.js
@@ -0,0 +1,285 @@
1+try{document.charset='Shift_JIS'}catch(e){}
2+//========新着ジャンプ設定
3+var buffer=1; // 低速回線や低速マシンの場合にはbufferの数値を増やすとより正確にジャンプ(1増やすと0.1秒遅れる)
4+var newResJump=1; // 新着レスジャンプ(0:ブラウザ任せ、1:読了時のみ、2:常時)*かちゅ、OpenJane、twintailのみの設定
5+//==========以下はスクリプト本文ですよ。
6+//イベントハンドラ定義
7+//外部関数:tohan
8+//外部変数:anchorHead,lightmode,getID,skinName,browser,dts
9+//=========外部ファイル共用のグローバル変数
10+var waited=false;//command表示後trueにし、選択後にfalseにする。
11+var viewed=false;//thumb読込み後trueにし、thumbPanelに乗降後falseにする。
12+var searched=false; //検索後に、trueにし、foundPanelに乗降後falseにする。
13+var cp,tp,vp,fp;
14+//========Click処理→search,他
15+ document.onclick = clickEvent;
16+function clickEvent(){
17+ if(clickCancel){return false}else{clearTimeout(clickTimer);if(document.getElementById("context")){document.getElementById("context").removeNode(true);}}
18+ var obj=window.event.srcElement;
19+ var tag=obj.tagName;
20+ if(tag=="B"||tag=="U"||tag=="SPAN"){searchPerson(obj)} //名前,トリップ,ID
21+ else if(tag=="DT") {searchRef(obj)}
22+ else if(tag=="DD") {defaultPopup()}
23+ else if(tag=="A"){
24+ if(obj.rel){obj.href=obj.rel;}
25+ //if(obj.parentElement.tagName!="DIV"){setHistory(obj);}
26+ //#付きリンク
27+ if(browser=="Live2ch" || browser=="かちゅ〜しゃ"){
28+ if(obj.href.match(/^http:.*#/)){window.open(obj.href,"_parent");return false}
29+ }
30+ //A Bone補正(非表示レスの表示)
31+ if((browser=="A Bone"||browser=="ギコナビ") && hiddenRes(obj)){showModelessDialog(document.getElementsByName("ThreadURL")[0].content.replace(/\/l50$/,"/")+tohan(obj.innerText.replace(/[>>]/g,"")),window,"dialogWidth:"+document.body.clientWidth+"px;help:no;resizable:yes;status:no;unadorned:yes;");window.focus();}
32+ //Jane,Live,ギコナビ補正(skin30-2Normal及びギコナビ)*レスジャンプがscrollIntoViewでないものに係る補正
33+ if(browser=="A Bone" || browser=="OpenJane" || browser=="Live2ch" || browser=="ギコナビ"){if(obj.href.match(/^about|jumpres/)){
34+ var h=tohan(obj.innerText.replace(/[>>]/g,""));
35+ var anchor=document.anchors(anchorHead+h);
36+ if(anchor){anchor.scrollIntoView(true);return false}
37+ }}
38+ return true;
39+ }
40+ else{panelOver();return}
41+}
42+
43+//=========MouseOver処理→image,popup
44+ document.onmouseover = mouseOverEvent;
45+function mouseOverEvent() {
46+ var e = window.event.srcElement;
47+ if(e.tagName=='B'){if(browser!="twintail2"){
48+ if(e.innerText.match(/^([^\d0-9]*)([\d0-9]+)([^\d0-9]*.*)/)){namePopup(e,RegExp.$1,RegExp.$2,RegExp.$3);}
49+ else if(e.innerText.match(/^あぼ〜ん$/)) {abonePopup(e);}
50+ }}
51+ if(e.tagName=='A'){
52+ if(!e.innerText.match(/%/)){ // URLエンコードでありがちな%がなければ
53+ //e.href=e.href.replace(/>/g,"");
54+ //e.href=e.href.replace(/\/ime.\w+/g,"");
55+ }else{
56+ try{
57+ e.title=decodeURI(e.innerText);
58+ }catch(err){
59+ // ShiftJIS,EUC-JPのデコードは面倒だからつけない。
60+ }
61+ }
62+ try{e.href}catch(err){return} // IE7だと何故かe.hrefが取得出来ないA要素がある
63+ if (checkAnchor(e.href)==2){insButton(e);return;}
64+ else if(checkAnchor(e.href)==1){ // 多段ポップアップ
65+ if(event.shiftKey){if(e.rel){e.href=e.rel}return}
66+ var parent=e.parentElement;
67+ var aNum= (parent.tagName!="DD") ? parent.firstChild.sourceIndex : parent.previousSibling.firstChild.innerText;
68+ if(!document.getElementById("p"+aNum)){
69+ var obj=e;var onPopup;
70+ while(obj.tagName!="BODY"){if(obj.id.match(/p\d+/)){onPopup=true;break}else{obj=obj.parentElement}}
71+ if(!onPopup){removePopup()}
72+ makePopContent(e);return;
73+ }
74+ }else if(checkAnchor(e.href)==0){ // 逆参照ポップアップ
75+ if(e.href.match(/menu:/) && event.shiftKey){searchPopup(e)}
76+ }
77+ }else if(e.tagName=="SPAN"||e.tagName=="TT"){
78+ var obj=e;var onPopup;
79+ while(obj.tagName!="BODY"){if(obj.id.match(/p\d+/)){onPopup=true;break}else{obj=obj.parentElement}}
80+ if(e.tagName=="SPAN"){
81+ if(!onPopup && event.shiftKey){searchPopup(e)}
82+ }else{searchPopup(e)}
83+ }else{ // 多段ポップアップ消去
84+ var obj=e;var onPopup;
85+ if(obj.sourceIndex<0){obj=document.body;if(document.getElementById("popupBase")){onPopup=true;}} // namePopupとの競合でノードが外れる瞬間の回避
86+ while(obj.tagName!="BODY"){if(obj.id.match(/(p\d+)/)){onPopup=true;break}else{obj=obj.parentElement;}}
87+ if(onPopup){while(obj.id!=obj.parentElement.lastChild.id){obj.parentElement.lastChild.removeNode(true)}}
88+ else {removePopup()}
89+ }
90+}
91+//=========MouseMove処理→panelOver()
92+ document.onmousemove=mouseMoveEvent;
93+function mouseMoveEvent() {
94+ if(!cp){
95+ var nHTML ='<div id="controlPanel"><input type="button" value="TOP" onclick="scroll_Top();blur()"><input type="button" value="END" onclick="scroll_End();blur()"><input type="button" value="IMG" onmouseup="imgCommand();blur()"><input type="button" value="FND" onclick="fndCommand();blur();"></div><div id="foundPanel" onmouseout="searched=false"></div>';
96+ if(skinName.match(/30-2/)){nHTML+='<div id="thumbPanel" onmouseout="viewed=false"></div><div id="viewPanel"></div>';}
97+ document.body.insertAdjacentHTML("afterBegin",nHTML);
98+ cp=document.getElementById("controlPanel");fp=document.getElementById("foundPanel");
99+ if(skinName.match(/30-2/)){tp=document.getElementById("thumbPanel");vp=document.getElementById("viewPanel");}else{tp=vp=new Object()}
100+ cp.condition="waited";tp.condition="vp.firstChild || viewed || !lightmode";fp.condition=resultView ? "fp.hasChildNodes()" : "searched";
101+ cp.territory="<25"; tp.territory=">20"; fp.territory="<(30+fp.clientHeight) && fp.hasChildNodes()";
102+ }
103+ if(event){panelOver();}
104+ if(!idHash.length){setHash();searchColoring();}
105+}
106+// 各パネル
107+function panelOver(){
108+ var territoryW=document.body.clientWidth-120;var territoryH=25;
109+ var panels=new Array("cp","tp","fp");
110+ for(var i in panels){
111+ if(skinName.match(/30-3/)&&panels[i]=="tp"){continue}
112+ var panel=eval(panels[i]); var territoryY=eval("event.y"+panel.territory); var territoryX=eval(event.x>document.body.clientWidth-panel.offsetWidth-15);
113+ if(eval(panel.condition)){panel.style.visibility="visible";return}
114+ if(territoryY && territoryX){panel.style.visibility="visible";}else{panel.style.visibility="hidden";}
115+ }
116+}
117+// TOP,END
118+function scroll_Top(){document.getElementsByTagName("DL")[0].firstChild.scrollIntoView(true);}
119+function scroll_End(){document.getElementsByTagName("DL")[0].lastChild.scrollIntoView(true);}
120+// IMG
121+function imgCommand(mode,s){
122+ if(!waited){
123+ var nHTML='<div id="command" onclick="clearCommand()"><input type="button" onclick="allImageLoad(\'all\')" value="全レス一括読込"><br><input type="button" onclick="allImageLoad(\'new\')" value="新レス一括読込"><br><input type="button" onclick="removeError()" value="Error画像削除"><br></div>';
124+ event.srcElement.parentElement.insertAdjacentHTML('beforeEnd',nHTML);
125+ if(skinName.match(/30-2/)){
126+ //if(!lightmode){document.getElementById("command").insertAdjacentHTML('afterBegin','<input type="button" onclick="changePanel()" value="パネル切替"><br>')}
127+ document.getElementById("command").insertAdjacentHTML('beforeEnd','<input type="button" onclick="changeMode()" value="モード切替">')
128+ }
129+ waited=true;
130+ }else{
131+ clearCommand();
132+ }
133+}
134+function fndCommand(mode,s){
135+ if(!waited){
136+ findIt(document.selection.createRange().text);
137+ event.cancelBubble=true;
138+ }else{
139+ clearCommand();
140+ }
141+}
142+function clearCommand(){
143+ waited=false;
144+ document.getElementById("command").removeNode(true);
145+}
146+//=========左長押処理→copyMenu()
147+ document.onmousedown=mousedownEvent;
148+var clickCancel,e,ex,ey,clickTimer;
149+function mousedownEvent(){
150+ var obj=e=event.srcElement;ex=event.x;ey=event.y;
151+ if(document.getElementById("context") && obj.innerText==document.getElementById("context").name){return}
152+ clickCancel=false;
153+ if(obj.nextSibling && obj.nextSibling.tagName=="U" && event.button==1){
154+ clickTimer=setTimeout("copyMenu()",500);
155+ }
156+}
157+
158+//コピーメニュー→colorChange(),search::copyText()
159+function copyMenu(){
160+ clickCancel=true; clearTimeout(clickTimer);
161+ if(document.getElementById("context")){document.getElementById("context").removeNode(true);}
162+ var nHTML='<div id="context" name="'+e.innerText+'"><div onclick="copyText(\'res\')" onmouseover="colorChange()" onmouseout="colorChange()">レスをコピー</div><div onclick="copyText(\'name\')" onmouseover="colorChange()" onmouseout="colorChange()">名前をコピー</div><div onclick="copyText(\'id\')" onmouseover="colorChange()" onmouseout="colorChange()">IDをコピー</div></div>';
163+ document.body.insertAdjacentHTML("afterBegin",nHTML);
164+ var context=document.getElementById("context");
165+ context.style.pixelLeft=document.body.scrollLeft+ex
166+ context.style.pixelTop =document.body.scrollTop+ey;
167+ context.style.visibility="visible";
168+}
169+function colorChange(){
170+ var style=event.srcElement.style;
171+ if(event.type=="mouseout"){style.backgroundColor="Menu"; style.color="MenuText";}
172+ else {style.backgroundColor="Highlight";style.color="HighlightText";}
173+}
174+
175+//=========キーボード入力(skin30-2でのキー無効の回避+α)
176+ document.onkeydown=key;
177+function key(){
178+ var dl=document.getElementsByTagName("DL").item(0);
179+ var code=event.keyCode;
180+ if (code=="32" && !event.shiftKey || code=="34"){dl.scrollTop+=dl.offsetHeight;}
181+ else if(code=="32" && event.shiftKey || code=="33"){dl.scrollTop-=dl.offsetHeight;}
182+// else if(code=="37" && event.altKey || code=="8"){jumpHis.back();if(code=="8"){return false}}
183+// else if(code=="39" && event.altKey){jumpHis.forward();return false;}
184+ else if(code=="40"){dl.scrollTop+=36;}
185+ else if(code=="38"){dl.scrollTop-=36;return true;}
186+ else if(code=="36"){scroll_Top()}
187+ else if(code=="35"){scroll_End()}
188+ else if(code=="73" && event.shiftKey){changePanel();return false;} // shift+I
189+ else if(code=="70" && event.shiftKey){findIt(document.selection.createRange().text);return false;} // shift+F
190+ else if(code=="78" && event.shiftKey && firstNew){firstNew.scrollIntoView(true)} // shift+N
191+ else if(code=="82" && event.shiftKey && event.ctrlKey){ // ctrl+shift+R
192+ //かちゅ〜しゃ補正(板更新のショートカットキー)
193+ if(browser=="かちゅ〜しゃ"){
194+ if(!t_url){threadurl();}
195+ window.open("http://"+t_domain+"/"+t_bbs+"/","_blank");
196+ return false;
197+ }
198+ }
199+}
200+
201+//=========新着レス取得後処理(標準スキン未対応ブラウザ用)←Timer又はFooterから呼び出し
202+//=========かちゅ、ABone、ゾヌ2
203+var newResNum=parseInt(document.getElementsByName("GetRescount")[0].content)+1;
204+var k=0;
205+function loadEvent(num){
206+ //====新着レスジャンプ
207+ if(newResJump==0){clearInterval(timerID);return} //「ブラウザ任せ」なら終了
208+ //新着レスの開始番号を取得
209+ if (browser=="かちゅ〜しゃ"){if(isNaN(newResNum)){while(dts[k]){if(dts[k].className=="new"){newResNum=parseInt(dts[k].firstChild.innerText);break;} k++;}}}
210+ else if(browser=="ホットゾヌ2"){newResNum=num+1;}
211+ var anc=document.anchors(anchorHead+newResNum);
212+ if(!anc || !anc.parentElement){return} // 透明あぼ〜んされてたら終了
213+ //新着レスジャンプ
214+ scr=lightmode ? document.body : document.getElementById("dl");
215+ viewPos=scr.scrollTop+scr.clientHeight;// スクロール後の画面下部位置
216+ endPos =anc.offsetTop+20; // 新レスアンカー位置
217+ //最後まで読了 or 「常に新着ジャンプ」ならジャンプ
218+ if(viewPos>endPos || newResJump==2){clearInterval(timerID);setTimeout("moveToNew("+newResNum+")",buffer*100)}
219+ else{firstNew=document.anchors(anchorHead+newResNum).parentElement.nextSibling;}
220+}
221+//=========新着レス取得後処理(標準スキン対応ブラウザ用)←NewMarkから呼び出し
222+//=========OpenJ、twin
223+var scr,viewPos,endPos=0;
224+function reloadEvent(){
225+ //====既読化
226+ var lastDt=dts[dts.length-2];if(!lastDt){return}// 全部新着なら終了
227+ while(lastDt && lastDt.className=="new"){lastDt.className="";lastDt=lastDt.previousSibling.previousSibling;}
228+ //====新着レスジャンプ
229+ if(newResJump==0){return} //「ブラウザ任せ」なら終了
230+ var ancs=document.anchors;
231+ var newResNum=parseInt(ancs[ancs.length-1].name)+1;
232+ scr=lightmode ? document.body : document.getElementById("dl");
233+ viewPos=scr.scrollTop;
234+ endPos =scr.scrollHeight-scr.clientHeight-20;
235+ //最後まで読了 or 「常に新着ジャンプ」ならジャンプ
236+ if(viewPos>endPos || newResJump==2){setTimeout("moveToNew("+newResNum+")",buffer*100);}
237+}
238+
239+// 新着レス移動+新着レスの位置を記憶
240+var firstNew;
241+function moveToNew(num){
242+ firstNew=getDTfromAnc(num);
243+ while(!firstNew){num--;firstNew=getDTfromAnc(num);} //対象が透明あぼ〜んなら数を減らす
244+ firstNew.scrollIntoView(true);
245+}
246+
247+//=========DoubleClick処理→defaultPopup()
248+ document.ondblclick=defaultPopup;
249+function defaultPopup(){
250+ var num=document.selection.createRange().text.replace(/\s$/,"");
251+ var hnum=tohan(num);
252+ if(!isNaN(hnum) && hnum<=1000){
253+ var obj=document.createElement("a");
254+ obj.innerText=num;
255+ obj.href="#"+hnum;
256+ makePopContent(obj);
257+ }else if(num.match(/\w{8,9}/)){ //\w{8}ではだめぽ?
258+ var obj=document.createElement("DT");
259+ obj.innerHTML="<span>date time ID:"+num+"</span>";
260+ searchPerson(obj.firstChild);
261+ }
262+}
263+
264+//=========Copy処理
265+//headから読むとbodyは見えないので、専用ブラウザの特質を利用してbodyの後ろに書き出す
266+//本来どおりheadに書き出すSkinManager対策で判定を一つ入れる
267+ if(document.body) document.write('<script type="text/javascript">document.body.oncopy=copyEvent</script>\n');
268+function copyEvent(){
269+ var textarea=document.createElement("TEXTAREA");
270+ textarea.value=document.selection.createRange().text.replace(/\s(\r\n|$)/g,"\n");
271+ var copyText=textarea.createTextRange();
272+ copyText.execCommand("Copy");
273+ return false;
274+}
275+//=========onScroll処理
276+//window.onscroll=function(){clearInterval(beforeScrollTimer);onLoadEvent()}
277+window.onscroll=function(){onLoadEvent()}
278+if(document.getElementById("dl")){
279+ document.getElementById("dl").onscroll=function(){onLoadEvent()}
280+}
281+//=========onLoad処理
282+window.onload=onLoadEvent;
283+function onLoadEvent(){mouseMoveEvent();setHash();searchColoring();}
284+setTimeout("onLoadEvent()",1000); // 一回だけ着色
285+
--- /dev/null
+++ b/res/skin/skin30-3G_IE7/chie_green.css
@@ -0,0 +1,19 @@
1+@import url(chie_base.css);
2+/* リンク */
3+a{color:#000;}
4+dt a {border:1px solid #EEE;}
5+dt.new a {border:1px solid #CEC;}
6+dt a:active {color:#F00; background-color:#FDD; border-color:#F44;}
7+dt a:hover {color:#F00; background-color:#FDD; border-color:#F44;}
8+
9+dd a:link {color:#060;}
10+dd a:visited {color:#696;}
11+dd a:active {color:#F55; background-color:#FDD;}
12+dd a:hover {color:#F55; background-color:#FDD;}
13+
14+/* dt */
15+dt {background-color: #EEE;}
16+dt.new {background-color:#CEC;}
17+
18+/* 逆参照内部 */
19+.refResult dt a{color:#000;text-decoration:none}
--- /dev/null
+++ b/res/skin/skin30-3G_IE7/chie_image2.css
@@ -0,0 +1,35 @@
1+body{overflow:hidden}
2+/* リンク横ボタン */
3+input,button{
4+ font-family:"Terminal";
5+ font-size:8px;
6+ margin: 0px 2px 2px 4px;
7+ border: 1px solid #BCB5B5;
8+}
9+/* サムネイル */
10+#thumbPanel{
11+ width :118px;
12+ height:100%;
13+ overflow-y:auto;
14+}
15+#thumbPanel div{
16+ width:100px;
17+ margin-bottom:0px;
18+ border:solid 1px #D6DCE1;
19+ background-color:#FFF;
20+ text-align:right;
21+}
22+#thumbPanel img {width:100px; height:75px; display:none; filter: Alpha(opacity=30);}
23+#thumbPanel embed{width:100px; height:75px; display:block;}
24+#thumbPanel a{margin-right:8px;}
25+/* ビュー */
26+#viewPanel{
27+ position:absolute;
28+ top :0px;
29+ left:120px;
30+ overflow:auto;
31+}
32+#viewPanel img {position:absolute;}
33+#viewPanel embed,#viewPanel object
34+ {width:100%;height:100%;}
35+/*#viewPanel button{width:48%;}*/
--- /dev/null
+++ b/res/skin/skin30-3G_IE7/chie_image2.js
@@ -0,0 +1,128 @@
1+// イベントハンドラ:onMouseover
2+// 外部変数:anchorHead,dds
3+//======画像読み込みの設定 (注)WindowsXP SP2ではこれらの設定は有効に機能しません。
4+var onOpenLoad =1; // 0:読み込まない、1:新着レスのみ、2:全部
5+var onMouseLoad=true; // true:カーソルを合わせただけ、false:LOADボタンをクリックしてから
6+//==========グローバル変数
7+var lightmode=true; // Live,twinのジャンプ用判定で用いているので必須
8+//==========画像処理等
9+// 外部用addAnchor
10+function addAnchor2(inner,num){
11+ return('<a onclick="dialogArguments.document.getElementsByName(\''+anchorHead+num+'\')[0].scrollIntoView(true)" style="cursor:hand">'+num+'</a>')
12+}
13+// モード切替(30-3はモードは一定)
14+function changeMode(){}
15+// パネルの展開
16+var thumbWindow=null;
17+function changePanel(){
18+ if(thumbWindow && !thumbWindow.closed){return}
19+ var skinPath=document.getElementsByName("SkinPath")[0].content;
20+ thumbWindow=showModelessDialog("",window,'dialogWidth:127px;dialogHeight:125px;dialogTop:0px;dialogLeft:0px;help:no;resizable:yes;status:no;unadorned:yes;');
21+ thumbWindow.document.write('<html><head><title>画像パネル<\/title>');
22+ thumbWindow.document.write('<link rel="stylesheet" type="text\/css" href="'+skinPath+'chie_image2.css">');
23+ thumbWindow.document.write('<script type="text\/javascript" src="'+skinPath+'chie_thumbPanel.js"><\/script>');
24+ thumbWindow.document.write('<\/head>');
25+ thumbWindow.document.write('<body><div id="thumbPanel"><\/div><div id="viewPanel" onclick="changeView()"><\/div><\/body>');
26+ thumbWindow.document.write('<\/html>');
27+ window.focus();
28+}
29+// LOADボタン
30+function insButton(a,hRH) {
31+ if(a.className!='replaced' && a.parentElement.tagName!='DIV'){
32+ if(imageExt2(a.href)){
33+ var nHTML='<input type="button" value="LOAD" onClick=\'loadImage(this,"'+a.href+'");blur()\'>';
34+ }else if(imageExt(a.href)){
35+ var nHTML='<input type="button" value="LOAD" onClick=\'loadImage(this,"'+a.href+'");blur()\'>'
36+ +'<input type="button" value="VIEW" onClick=\'loadDirect("swf","'+a.href+'");blur()\'>';
37+ }else{
38+ if(hRH){var ahref=hRH}else{var ahref=a.href}
39+ var nHTML='<input type="button" value="VIEW" onClick=\'loadDirect("html","'+ahref+'");blur()\'>'
40+ +'<input type="button" value="CHECK" onClick=\'loadDirect("html","http://www.tekijuku.com/URL/?url='+ahref+'");blur()\'>';
41+ }
42+ a.insertAdjacentHTML('AfterEnd',nHTML);
43+ a.className = 'replaced';
44+ if(onMouseLoad && imageExt2(a.href)){loadImage(a.nextSibling,a.href)}
45+ return;
46+ }
47+}
48+// HTMLの読込
49+function loadDirect(mode,href){
50+ changePanel();
51+ var nHTML,buttons;
52+ if(mode=="swf"){nHTML='<embed src="'+href+'"></embed>'}
53+ else {nHTML='<object data="'+href+'" onError="changeView()"></object>'}
54+ if(browser!="ホットゾヌ2"){buttons='<button onclick="window.open(\''+href+'\',\'_parent\');clearView()">OPEN</button><button onclick="clearView()">CLOSE</button>';}
55+ else {buttons='<button onclick="window.open(\''+href+'\',\'_blank\');clearView()">OPEN</button><button onclick="clearView()">CLOSE</button>';}
56+ thumbWindow.dialogWidth =screen.availWidth+"px";
57+ thumbWindow.dialogHeight=screen.availHeight+"px";
58+ thumbWindow.viewPanel.innerHTML=nHTML+buttons;
59+ thumbWindow.viewPanel.style.visibility="visible";
60+ thumbWindow.viewPanel.firstChild.style.posHeight=thumbWindow.document.body.clientHeight-20;
61+}
62+
63+// 画像読込
64+function loadImage(btn,href){
65+ changePanel();
66+ var tp = thumbWindow.document.getElementById("thumbPanel");
67+ if(btn.tagName!="A"){
68+ var thumbs = thumbWindow.document.images;
69+ var l=thumbs.length;
70+ for(i=l;i--;){if(thumbs[i].src==href){imgOver(tp,100);imgOver(thumbs[i],100);return true;}}
71+ }
72+ if(btn.parentElement.tagName=="DD"){var dt = btn.parentElement.previousSibling;}
73+ else {var dt = btn.parentElement;}
74+ var num = dt.firstChild.innerText;
75+ if(href.search(/\.swf/i)==-1){
76+ var nHTML = '<div><img src="'+href+'" onLoad="imgResult(this)" onError="imgResult(this)" onClick="changeView(\'img\')" onmouseover="imgOver(this,100)" onmouseout="imgOver(this,30)">'
77+ +addAnchor2(num,num)+' '
78+ +'<button onClick="changeSize(this);blur()">...</button>'
79+ +'<button onClick="removeThumb(this)">DEL</button>'
80+ +'</div>';
81+ }else{
82+ var nHTML = '<div><embed src="'+href+'" onFocus="changeView(\'swf\')"></embed>'
83+ +addAnchor2(num,num)+' '
84+ +'<button onClick="blur()">___</button>'
85+ +'<button onClick="removeThumb(this)">DEL</button>'
86+ +'</div>';
87+ var h=(tp.childNodes.length+1)*98+27;
88+ if(h < screen.availHeight){thumbWindow.dialogHeight=h+"px"}
89+ }
90+ if(btn.tagName=="INPUT"){btn.value = 'LOADED';}
91+ tp.insertAdjacentHTML('BeforeEnd',nHTML);
92+}
93+// エラー画像の削除
94+function removeError(){
95+ if(thumbWindow){
96+ var thumbs = thumbWindow.document;
97+ var l=thumbs.images.length;
98+ for(var i=l;i--;){
99+ var stateBtn=thumbs.getElementById("thumbPanel").childNodes[i].childNodes[2];
100+ if(stateBtn.tagName=="BUTTON" && stateBtn.innerText=="NONE"){stateBtn.parentElement.removeNode(true);}
101+ }
102+ }
103+}
104+// LOADボタン挿入対象拡張子(通常用)
105+function imageExt(isu) {if(isu.search(/\.png$|\.jp(g|e|eg)$|\.gif$|\.bmp$|\.swf/i)!=-1){return true}else{return false}}
106+// LOADボタン挿入対象拡張子(一括読込用)
107+function imageExt2(isu){if(isu.search(/\.png$|\.jp(g|e|eg)$|\.gif$|\.bmp$/i)!=-1){return true}else{return false}}
108+
109+// 画像一括読み込み
110+function allImageLoad(mode){
111+ var ddl=dds.length;var exist;
112+ for(i=0;i<ddl;i++){
113+ if(mode=="new"){if(dds[i].previousSibling.className!="new"){continue}}
114+ cl=dds[i].childNodes.length;
115+ for(j=0;j<cl;j++){
116+ cn=dds[i].childNodes[j];
117+ if(cn.tagName == "A"){
118+ if(imageExt2(cn.href)){loadImage(cn,cn.href);exist=true}
119+ }
120+ }
121+ }
122+ if(!exist){
123+ if(mode=="new"){var target="新着レスに"}else{var target="全てのレスに"}
124+ alert(target+"画像はないよ\ ")
125+ }
126+}
127+// モザイク処理
128+function imgOver(my,num) {my.style.filter="Alpha(opacity="+num+")"}
--- /dev/null
+++ b/res/skin/skin30-3G_IE7/chie_popup.js
@@ -0,0 +1,114 @@
1+//==========以下はスクリプト本文ですよ。
2+// イベントハンドラ:onMouseover
3+// 外部変数:idHash,refHash,foudRes,highlight
4+// 外部関数:addAnchor,getDTfromAnc
5+// 特徴:DIV#popupBase下に「フラットでリニア」にDL#p\dを作成する。
6+//==========CSSの出力
7+var nCSS=''
8+nCSS+='#popupBase{font-size:90%;}'; //フォントサイズの指定
9+nCSS+='#popupBase{position:absolute;width:100%;height:100%;z-index:7}';
10+nCSS+='#popupBase dl{position:absolute; background-color:window; border:outset 1px infobackground; overflow-y:auto; z-index:5; border-top:none}';
11+nCSS+='#popupBase dt span{float:none; margin-left:1em;}';
12+nCSS+='#popupBase dd{margin:auto 1em}';
13+document.write('<style type="text/css">'+nCSS+'</style>\n');
14+//=========外部ファイル共用のグローバル変数
15+//=========ナンバーな名前のポップアップ
16+function namePopup(e,before,num,after){
17+ var hnum=tohan(num);
18+ if(hnum==774 || hnum==21 || hnum==1 || hnum==30){return} // Socket774、774KB、21禁、[1-30]、などは無視
19+ if(before && before.match(/名無/)){return} //名無しっぽいのは無視
20+ if(after) {if(after=="周年"){return}} // デフォルトな"n周年"は無視
21+ var nB = before ? "<b>"+before+"</b><b>":"<b>"; nB+=addAnchor(hnum,num); nB+=after ? "</b><b>"+after+"</b>":"</b>";
22+ e.outerHTML=nB;
23+}
24+//=========弱あぼ〜んのポップアップ
25+function abonePopup(e){e.outerHTML = "<b>"+addAnchor(e.parentElement.previousSibling.innerText,'あぼ〜ん')+"</b>";}
26+//=========検索したレスのポップアップ
27+function searchPopup(obj){
28+ var reg,cArray;var tag=obj.tagName;
29+ /*ref Popup*/if (tag=="A") {if(refHash[obj.innerText]){cArray=refHash[obj.innerText].split(" ")}else{return}}
30+ /*ID Popup*/ else if(tag=="SPAN"){reg=getID(obj);if(reg&&reg.length>3){cArray=idHash[reg].split(" ");}else{return} if(cArray.length==1){return}}
31+ /*検索Popup*/else if(tag=="TT") {var cHash=(obj.parentElement.rel=="res")?foundRes:highlight;cArray=cHash[obj.parentElement.firstChild.style.backgroundColor];if(!cArray){return}}
32+ var targetString=""; for(var i=0;i<cArray.length;i++){targetString+=returnString(cArray[i]);} //中身の切り出し
33+ if(targetString){popup(targetString);} //対象が存在したらポップアップ
34+}
35+//=========多段ポップアップ
36+//・ポップアップの作成
37+function makePopContent(obj){
38+ //事前準備
39+ var num=obj.innerText.replace(/[>>]/g,""); var number=tohan(num);
40+ if(!obj.rel){obj.rel=obj.href;} obj.href="decoy:"; // ブラウザ本体のポップアップ回避
41+ //番号調査
42+ if(number.match(/(\d*)\D+(\d*)/)){var start=parseInt(RegExp.$1); var end=parseInt(RegExp.$2);}
43+ else {var start=end=parseInt(number);}
44+ if(end-start>100){end=start+100} // 100以上表示しない
45+ //中身の切り出し
46+ var targetString=""; for(var i=0;i<=end-start;i++){targetString+=returnString(start+i)}
47+ //対象が存在したらrelに退避してポップアップ
48+ if(targetString){popup(targetString);}else{obj.href=obj.rel;}
49+}
50+//・中身の切り出し
51+function returnString(num){
52+ var obj=getDTfromAnc(num);
53+ setSearchColor(obj);//ポップアップ先の着色
54+ if(!obj){return("")} //対象が透明あぼ〜んなら終了
55+ var dt=obj.cloneNode(true);
56+ var dtOuter=dt.outerHTML.replace(/name=.*?>/g,">"); // LABELNUMBER対応のものに係るリンクアンカーの除去
57+ var dd=obj.nextSibling.cloneNode(true);
58+ if(dd.hasChildNodes()){
59+ while(dd.lastChild.name){dd.lastChild.removeNode(true)} // LABELNUMBER非対応のものに係るリンクアンカーの除去
60+ if(dd.lastChild.tagName=="DL"){dd.lastChild.removeNode(true)} // 逆参照の除去
61+ }
62+ var ddOuter=dd.outerHTML;
63+ return(dtOuter+ddOuter);
64+}
65+//・ポップアップ
66+var pb;
67+function popup(inner){
68+ if(!pb){document.body.insertAdjacentHTML('afterBegin','<div id="popupBase"></div>');pb=document.getElementById("popupBase")}
69+ //要素の作成
70+ var parent=event.srcElement.parentElement;
71+ //var aNum= (parent.tagName!="DD") ? parent.firstChild.sourceIndex : parent.previousSibling.firstChild.innerText; // DD以外=名前欄、画像、ID検索
72+ var aNum=event.srcElement.sourceIndex;if(!aNum){alert("aNum取得エラー")}
73+ if(document.getElementById('p'+aNum)){return} // ポップアップしてたら終了
74+ pb.insertAdjacentHTML("beforeEnd",'<dl id="p'+aNum+'">'+inner+'</dl>');
75+ //要素の配置
76+ var p=document.getElementById('p'+aNum);
77+ // y軸調整
78+ var pos=Math.min(event.y,document.body.clientHeight-event.y);
79+ var scTop=document.body.scrollTop+event.y;
80+ if(pos==event.y){var y=scTop-30;} // カーソルの下へ表示
81+ else {var y=scTop+10-p.clientHeight;} // カーソルの上へ表示
82+ if(y<0){y=0}
83+ if(event.srcElement.parentElement.tagName=="TT"){y+=35;}
84+ p.style.pixelTop=y;
85+ // x軸調整
86+ var pos=Math.min(event.x,document.body.clientWidth-event.x);
87+ var scLeft=document.body.scrollLeft+event.x;
88+ if(pos==event.x){var x=scLeft-2} // カーソルの右へ表示
89+ else {var x=scLeft-4-p.clientWidth;} // カーソルの左へ表示
90+ if(x<0){x=0}
91+ p.style.pixelLeft=x;
92+ // 高さ調整(scrollBarを要す場合と要しない場合がある)→y軸調整
93+ if(p.clientHeight>Math.max(event.y,document.body.clientHeight-event.y)){
94+ if(p.clientHeight>document.body.clientHeight){p.style.pixelHeight=document.body.clientHeight-2;}
95+ p.style.pixelTop=document.body.scrollTop;
96+ }
97+}
98+//・ポップアップ消去
99+function removePopup(popid){
100+ if(pb){while(pb.lastChild){pb.lastChild.removeNode(true)}}
101+}
102+//数値変換(to半角)
103+function tohan(num){
104+ var zen="0123456789";
105+ var han="0123456789";
106+ var hnum="";
107+ if(zen.indexOf(num.charAt(0))!=-1){
108+ for(var i=0;i<num.length;i++){
109+ var at=zen.indexOf(num.charAt(i));
110+ hnum+=han.charAt(at);
111+ }
112+ }else{hnum=num}
113+ return hnum;
114+}
--- /dev/null
+++ b/res/skin/skin30-3G_IE7/chie_search.js
@@ -0,0 +1,489 @@
1+beID=false; // beにログイン出来る場合は、true
2+//==========検索設定
3+var expression="multiAND"; // 検索方法  default:標準、regExp:正規表現、multiAND:AND検索、multiOR:OR検索
4+var searchView="resList"; // 検索結果表示  resList:該当レス番号表示、resPopup:該当レスポップアップ、
5+var resultView=false; // 検索結果の常時表示  true:常時表示、false:マウスで近づけたときのみ表示
6+var listLimit =10; // searchViewがresPopupでない場合の、レス番号の表示制限
7+//==========レス番号、日付文字列の着色設定
8+coloring=1; // 着色する:1 着色しない:0
9+threshold1=[2,"#0000ff"]; // 書き込みが複数あるID のしきい値と色
10+threshold2=[5,"#aaaa00"]; // 書き込みが多数あるID のしきい値と色
11+threshold3=[8,"#ff0000"]; // 書き込みが多数あるID のしきい値と色
12+threshold4=[1,"#0000FF"]; // 書き込みがある レス のしきい値とレス番号の色
13+threshold5=[4,"#aaaa00"]; // 書き込みが多数あるレス のしきい値とレス番号の色
14+threshold6=[7,"#ff0000"]; // 書き込みが多数あるレス のしきい値とレス番号の色
15+//==========名前・ID検索によるレスの帯の色指定(16進数又はWeb形式の色名で指定。いくつでも可。アルファベットは小文字でお願い)
16+var foundResColor =new Array("#ffdfee","#eeffdf","#ffeedf","#dfffee","#eedfff","#ffffe1");
17+//==========単語検索によるハイライト色指定(同上)
18+var highlightColor=new Array("#ffff66","#a0ffff","#99ff99","#ff9999","#ff66ff","#880000","#00aa00","#886800","#004699","#990099");
19+//==========以下はスクリプト本文ですよ。
20+// イベントハンドラ:onClick,onScroll,onMousemove
21+// 外部関数:addAnchor,checkAnchor,tohan,searchPopup
22+// 外部変数:anchorHead,browser,fp
23+// 逆参照の特徴:イベント発生DTに対応するDD下に、DL-DT-DD構造を作成する。
24+//==========CSSの出力
25+var nCSS='';
26+nCSS+='#foundPanel {position:absolute;top:expression(body.scrollTop+25);right:18px;padding:2px 5px;z-index:6;background-color:white;border:1px solid #999;visibility:hidden}';
27+nCSS+='#foundPanel div{padding-left:5px;text-align:right;font-size:100%;}';
28+nCSS+='.refResult{margin:0.5em 0.3em; border:1px solid #666;padding-right:0px}';
29+nCSS+='.refResult{border-top:none}';
30+nCSS+='.refResult dt{margin-right:0px;}';
31+nCSS+='.refResult dd{margin-left:0.8em;}';
32+document.write('<style type="text/css">'+nCSS+'</style>\n');
33+var nCSS='';
34+for(var css in foundResColor){
35+ var c=foundResColor[css].replace(/#/,"");
36+ nCSS+='#COLOR'+c+" a{border-color:"+foundResColor[css]+"}\n";
37+ nCSS+='#COLOR'+c+" a:hover{border-color:red}\n";
38+}
39+document.write('<style type="text/css">'+nCSS+'</style>\n');
40+//=========外部ファイル共用のグローバル変数
41+var dts=document.getElementsByTagName('DT');
42+var dds=document.getElementsByTagName('DD');
43+var idHash=new Array(); var refHash=new Array();
44+var foundRes,highlight;
45+//==========IDと参照をハッシュに格納
46+// 配列のハッシュより軽いっぽいので、空白区切りの値による単純なハッシュにしてみるテスト。
47+// setEndIdx:本文の同レスを重複処理しないように、Hash化位置としてのdtsの最終indexを記憶
48+// setEndNum:本文以外レスを重複処理しないように、最終レス番号を記憶
49+var setEndIdx=setEndNum=0;
50+function setHash(){
51+ //var t0=new Date();
52+ var l=Math.min(dts.length,dds.length);
53+ var lastNum=l ? parseInt(dts[l-1].firstChild.innerText) : 0;
54+ if(isNaN(lastNum)&&l>1){lastNum=parseInt(dts[l-2].firstChild.innerText)} //Footerありなら一つ前
55+ if(l==0 || lastNum<=setEndNum){return} // 最後まで調査済みなら回避
56+ for(var i=setEndIdx;i<l;i++){
57+ if(dds[i].parentElement.className=="refResult"){continue} // 逆参照内のDDなら回避
58+ var num=dts[i].firstChild.innerText; var span=dts[i].lastChild;
59+ // ID
60+ var t=getID(span); if(t&&t.length>3){idHash[t] = idHash[t] ? idHash[t]+" "+num : num;} // ???やID:0,ID:#(@ゾヌ)はスルー。
61+ // 画像板
62+ var imgURL=getIMG(span);
63+ if(imgURL){
64+ var dd=dts[i].nextSibling;
65+ if(tp && imgURL && !dd.getElementsByTagName("IMG").length){
66+ var aObj=(dd.innerText)?'<br><a href="'+imgURL+'">'+imgURL+'</a>':'<a href="'+imgURL+'">'+imgURL+'</a>';
67+ if(!beID && imgURL.match(/kako/)){/*dd.insertAdjacentHTML("beforeEnd","<br>Beにログインしてないと取得できません");*/}else{dd.insertAdjacentHTML("beforeEnd",aObj)}
68+ }
69+ }
70+ // ref,IMG
71+ var ddAnc=dds[i].getElementsByTagName("A");
72+ for(var j=0;j<ddAnc.length;j++){
73+ try{ddAnc[j].href}catch(err){continue} // IE7だと何故かhrefが取得出来ないA要素がある
74+ var ancType=checkAnchor(ddAnc[j].href);
75+ if (ancType==0){
76+ continue;
77+ }else if(ancType==1){
78+ var anc=tohan(ddAnc[j].innerText.replace(/[>>]/g,""));var start,end;
79+ if(anc.match(/(\d*)\D+(\d*)/)){
80+ start=parseInt(RegExp.$1); end=parseInt(RegExp.$2);
81+ if( (end-start>100) || (num-end<4 && start==1) ){continue} // >>1-1000とか>>1-n(直前レス)とかは華麗にスルー
82+ }else{
83+ start=end=parseInt(anc);
84+ }
85+ var k=start-1;do{k++;
86+ if((!refHash[k] || refHash[k].indexOf(num)==-1) && num>k){refHash[k]=refHash[k] ? refHash[k]+" "+num : num;} // 重複や未来へのアンカーはスルー
87+ }while(k<end);
88+ }else if(imageExt2(ddAnc[j].href) && onOpenLoad!=0){
89+ if(onOpenLoad==1){if(dds[i].previousSibling.className!="new"){continue}}
90+ insButton(ddAnc[j],ddAnc[j].href);
91+ }
92+ }
93+ }
94+ setEndIdx=l;setEndNum=lastNum;
95+ //var t1=new Date(); var t=(t1-t0)/1000; if(t){alert(t+"秒");}
96+}
97+// スレッドウィンドウ中心に前後5レスを着色
98+var resUnit=new Array();
99+function searchColoring(){
100+ if(!coloring){return;} // 着色不要なら終了
101+ if(!scr){scr=lightmode ? document.body : document.getElementById("dl");}
102+ var nowScrollPos=scr.scrollTop+document.body.clientHeight/2;
103+ var l=Math.min(dts.length,dds.length);var st,ed;
104+ // dtのoffsetTopを格納(25レス単位)
105+ if(resUnit.length<=Math.floor(dts.length/25)){resUnit[0]=0;
106+ for(var i=25;i<l;i+=25){resUnit[i/25]=dts[i].offsetTop;}
107+ }
108+ // 現在どのあたりまでスクロールしてるか調査
109+ var rul=resUnit.length-1;
110+ if (rul==0) {st=0;ed=l-1;} //25未満
111+ else if(resUnit[0]>nowScrollPos) {st=0;ed=24;} //0-24
112+ else if(resUnit[rul]<nowScrollPos){st=l-26;ed=l-1;} // 最終25レス
113+ else{
114+ for(var i=rul;i--;){
115+ if(resUnit[i+1]>nowScrollPos&&resUnit[i]<=nowScrollPos){st=i*25;ed=st+25;break}
116+ }
117+ }
118+ // 現在の範囲内からウィンドウの真ん中あたりに表示してるレスを取得(ここで着色すると、25レス単位の切替時に数レスが着色されない)
119+ var dtIdx=0; //if(cp){cp.childNodes[1].value=(st+1)+"-"+(ed+1);cp.style.visibility="visible";}
120+ for(var i=st;i<=ed;i++){if(!dts[i+1]){dtIdx=ed;break;}
121+ if(dts[i+1].offsetTop>nowScrollPos && dts[i].offsetTop<=nowScrollPos){dtIdx=i;break;}
122+ }
123+ // dtIdxからその周辺を特定
124+ var start=dtIdx-5;var end=dtIdx+5;//
125+ for(var i=start;i<=end;i++){
126+ if(dts[i]){setSearchColor(dts[i])}
127+ }
128+}
129+// IDHash、refHashを元に着色
130+function setSearchColor(dt){
131+ if(!dt.innerText){return}
132+ // ID
133+ var span=dt.lastChild; var t=getID(span);//alert(t +"&&"+ idHash[t] +"&&"+ span);
134+ if (browser=="ホットゾヌ2"){span=span.lastChild}
135+ else if(browser=="A Bone") {span=span.childNodes[1]}
136+ if(t && idHash[t] && span){
137+ var idResult=idHash[t].split(" "); if(t.match(/\?\?\?/)){idResult="";idHash[t]="";}
138+ if (idResult.length>=threshold3[0]){span.style.color=threshold3[1];span.title="同一ID ("+idResult.length+"回)\n"+idHash[t]}
139+ else if(idResult.length>=threshold2[0]){span.style.color=threshold2[1];span.title="同一ID ("+idResult.length+"回)\n"+idHash[t]}
140+ else if(idResult.length>=threshold1[0]){span.style.color=threshold1[1];span.title="同一ID ("+idResult.length+"回)\n"+idHash[t]}
141+ else if(idResult.length==1){span.title="同一IDは\nありません"}
142+ }
143+ // ref
144+ var numA=dt.firstChild; var num=numA.innerText;
145+ if(refHash[num]){
146+ var refResult=refHash[num].split(" ");
147+ if (refResult.length>=threshold6[0]){numA.style.color=threshold6[1];dt.title="これへのレス ("+refResult.length+"個)\n"+refHash[num];}
148+ else if(refResult.length>=threshold5[0]){numA.style.color=threshold5[1];dt.title="これへのレス ("+refResult.length+"個)\n"+refHash[num];}
149+ else if(refResult.length>=threshold4[0]){numA.style.color=threshold4[1];dt.title="これへのレス ("+refResult.length+"個)\n"+refHash[num];}
150+ else{numA.title="これへのレスはない模様"}
151+ }
152+ // anc
153+ var dd=dt.nextSibling; if(!dd){return} // footerのdtから呼ばれると次のddは不存在
154+ ddAnc=dd.getElementsByTagName("A");
155+ for(var i=ddAnc.length;i--;){
156+ var h=tohan(ddAnc[i].innerText);var tNum=h.replace(/\D/g,"");
157+ if(refHash[tNum]){
158+ var refResult=refHash[tNum].split(" ");
159+ if (refResult.length>=threshold6[0]){ddAnc[i].style.color=threshold6[1];}
160+ else if(refResult.length>=threshold5[0]){ddAnc[i].style.color=threshold5[1];}
161+ else if(refResult.length>=threshold4[0]){ddAnc[i].style.color=threshold4[1];}
162+ }
163+ }
164+}
165+//==========名前・ID検索等
166+function searchPerson(obj){
167+ var by,thisDT,reg;
168+ if (obj.tagName=="DT") {by="ID"; thisDT=obj; reg=getID(obj)}
169+ else if(obj.tagName=="SPAN"){by="ID"; thisDT=obj.parentElement;reg=getID(obj)}
170+ else if(obj.tagName=="U") {by="NAME";thisDT=obj.parentElement; reg=obj.innerHTML.replace(/<B>(.*?)<\/B>/ig,"");if(!reg){reg=RegExp.$1.replace(/<.*?A.*?>/ig,"")}/*名前が数字*/}
171+ else if(obj.tagName=="B") {by="NAME";thisDT=obj.parentElement.parentElement;reg=obj.innerText}
172+ else{return}
173+ if(!thisDT.rel){
174+ var c=selectColor("res"); if(!c){return} var color=new Array(c); // カラー選択
175+ if(by=="ID"){
176+ if(!reg || !idHash[reg]){return} // IDなし、ID:???、本文中の他スレのコピペID
177+ // 検索ハッシュに値を設定して、それに基づきレス着色
178+ foundRes[c]=idHash[reg].split(" "); foundRes[c].word="ID:"+reg;
179+ for(i in foundRes[c]){var dt=getDTfromAnc(foundRes[c][i]);toggleResColor(dt,c);}
180+ }else{
181+ var us=document.getElementsByTagName("U"); var l=us.length;
182+ var regName=new RegExp();regName.compile(reg);
183+ // ループ中にレス着色・値の設定を同時実行
184+ for(var i=l;i--;){var dt=us[i].parentElement;
185+ if(dt.parentElement.className=="refResult"){continue} // 逆参照内のDTなら回避
186+ if(regName.test(us[i].innerText)){toggleResColor(dt,c);foundRes[c].unshift(dt.firstChild.innerText);}
187+ }
188+ foundRes[c].word=reg;
189+ }
190+ returnFound("res",color);
191+ }else{
192+ clearColor("res",thisDT.style.backgroundColor);
193+ }
194+}
195+// ID文字列の抽出
196+var regID=new RegExp(); // HOSTも可能にしてみる
197+regID.compile(".*?\\s.*?\\s.*:(.*?)(\\s|$)"); // 1000resで0.02秒ほど高速
198+function getID(span){
199+ if(regID.test(span.innerText)){return(RegExp.$1)}else{return(false)}
200+}
201+//==========色設定解除
202+// オブジェクトの初期化
203+function createHash(name,key,arr,word){
204+ name[key]=arr?arr:new Array();
205+ name[key].word=word?word:"";
206+ name[key].justMovedRes=undefined;
207+}
208+// 色選択(該当レス番号配列を持たないキーを返す)
209+function selectColor(type){
210+ if(!foundRes) {foundRes =new Array();for(var i in foundResColor) {createHash(foundRes,foundResColor[i]);}} // Hash foundRes ={色:該当レス番号配列}
211+ if(!highlight){highlight=new Array();for(var i in highlightColor){createHash(highlight,highlightColor[i]);}} // Hash hightLight={色:該当レス番号配列}
212+ var cHash,cArray,cMess;
213+ if(type=="res"){cHash=foundRes; cArray=foundResColor; cMess="今までのレス着色を解除しますか?";}
214+ else {cHash=highlight;cArray=highlightColor;cMess="今までのハイライトを解除しますか?";}
215+ var i=0; while(cHash[cArray[i]].word){
216+ i++; if(i==cArray.length){if(confirm(cMess)){clearColor(type);i=0;break}else{i=null;break}}
217+ }
218+ return(cArray[i]);
219+}
220+// 色解除(ハッシュ、対象、foundPanel)
221+function clearColor(type,color){
222+ var cHash=(type=="res")?foundRes:highlight;
223+ if(event && event.altKey){color=""}
224+ for(var i in cHash){
225+ if(type=="res"){
226+ if(color && i!=color){continue} // 指定色でなければスルー
227+ for(var j in cHash[i]){
228+ if(event.srcElement.value=="DEL"){removeRes(getDTfromAnc(cHash[i][j]))}else{toggleResColor(getDTfromAnc(cHash[i][j]))}
229+ }
230+ cHash[i]=new Array();
231+ document.getElementById("c"+i).removeNode(true);
232+ }else{
233+ var strongs=document.getElementsByTagName("STRONG");
234+ var reg=new RegExp(i);
235+ if(!color.match(i)){continue} // 指定色でなければスルー
236+ for(var j=0;j<strongs.length;j++){
237+ if(strongs[j].style.backgroundColor==i){
238+ if(event.srcElement.value=="DEL"){removeRes(strongs[j].parentElement.previousSibling);j--}else{strongs[j].removeNode(false);j--}
239+ }
240+ }
241+ cHash[i]=new Array();
242+ if(document.getElementById("c"+i)){document.getElementById("c"+i).removeNode(true);} // and,or検索で1色目のみ
243+ }
244+ }
245+ if(!fp.hasChildNodes()){fp.style.visibility="hidden";searched=false;}
246+}
247+// レス色トグル
248+function toggleResColor(dt,c){
249+ if(!dt){return} // for-inで送られる番号以外のobjなら終了
250+ if(c){
251+ dt.rev=dt.style.backgroundColor;
252+ dt.rel="colored";
253+ dt.id ="COLOR"+c.replace(/#/,"");
254+ dt.style.backgroundColor=c;
255+ }else{
256+ dt.style.backgroundColor=dt.rev;
257+ if(dt.id.match(/COLOR/)){dt.removeAttribute("id")}//else{alert("dtにCOLOR***以外のid("+dt.id+")が設定されています")}
258+ dt.removeAttribute("rev");
259+ dt.removeAttribute("rel");
260+ }
261+}
262+// 検索結果に基づき消去
263+function removeRes(dt){if(!dt){return} // cHash[i][j]=ID:xxxxxxxxのとき
264+ if(browser=="Live2ch"){location.href='func:ABONECLEAR?'+dt.firstChild.innerText;} // Liveのみ-透明あぼ〜ん
265+ dt.nextSibling.removeNode(true);dt.removeNode(true);
266+}
267+//==========結果表示
268+// レス番号リスト(ポップアップアンカーを含む)
269+function returnFound(type,color){
270+ var nDIV="";
271+ var cHash,numArray;
272+ // 対象オブジェクト(検索の時は重複排除)
273+ if(type=="res"){
274+ cHash=foundRes;numArray=cHash[color[0]];
275+ }else{
276+ cHash=highlight;numArray=cHash[color[0]];
277+ }
278+ // 表示方法
279+ var display=new Array(["none","POP"],["inline","LST"]);
280+ if(searchView=="resPopup" || numArray.length==0 || numArray.length>=listLimit){display=display.reverse();}
281+ // ポップアップ
282+ var nTT="";for(var i=0;i<color.length;i++){nTT+='<tt style="background-color:'+color[i]+'"> '+cHash[color[i]].word+'</tt>';}
283+ nDIV+='<span rel="'+type+'" style="display:'+display[0][0]+'">'+nTT+'</span>';
284+ // リスト
285+ var nA="";for(var i=0;i<numArray.length;i++){nA+=addAnchor(numArray[i],numArray[i])+" "}
286+ nDIV+='<tt style="background-color:'+color[0]+'" style="display:'+display[1][0]+'"> '+nA+'</tt>';
287+ // 個数
288+ nDIV+='&nbsp;'+numArray.length+' ';
289+ var buttons='<input type="button" value="'+display[0][1]+'" onclick="changeSearchView();blur()"><input type="button" value="∨" onclick="moveToSearchRes(\''+type+'\',\''+color+'\')" title="下へ検索"><input type="button" value="∧" onclick="moveToSearchRes(\''+type+'\',\''+color+'\')" title="上へ検索"><input type="button" value="CLR" onclick="clearColor(\''+type+'\',\''+color+'\')" title="Alt押下時\n着色レス全て"><input type="button" value="DEL" onclick="clearColor(\''+type+'\',\''+color+'\')" title="Alt押下時\n着色レス全て">';
290+ fp.innerHTML+='<div id="c'+color[0]+'">'+nDIV+buttons+'</div>';
291+ fp.style.visibility="visible";searched=true;
292+}
293+// 対象レスにジャンプ
294+var markedDT;
295+function moveToSearchRes(type,color){
296+ if(color.match(/(.*?),/)){color=RegExp.$1}
297+ var scope = (event && event.srcElement.value=="∧") ? false : true ;
298+ var numArray= (type=="res") ? foundRes[color] : highlight[color];
299+ if(isNaN(numArray.justMovedRes)){numArray.justMovedRes=0}
300+ else{
301+ markedDT.style.borderColor="#999";
302+ if(scope){numArray.justMovedRes++;if(numArray.justMovedRes>=numArray.length){numArray.justMovedRes--;alert("これより下にはありません")}}
303+ else {numArray.justMovedRes--;if(numArray.justMovedRes<0){numArray.justMovedRes++;alert("これより上にはありません")}}
304+ }
305+ markedDT=getDTfromAnc(numArray[numArray.justMovedRes]); markedDT.style.borderColor="red";
306+ markedDT.scrollIntoView(true);
307+ setTimeout('markedDT.style.borderColor="#999"',5000);
308+}
309+// ポップアップとリスト表示切り替え
310+function changeSearchView(){
311+ var e=event.srcElement;
312+ if(e.value=="POP"){
313+ e.value="LST";
314+ e.parentElement.childNodes[0].style.display="inline";
315+ e.parentElement.childNodes[1].style.display="none";
316+ }else{
317+ e.value="POP";
318+ e.parentElement.childNodes[0].style.display="none";
319+ e.parentElement.childNodes[1].style.display="inline";
320+ }
321+}
322+
323+//==========単語検索
324+function findIt(arg){createSearchPanel(arg);}
325+var searchWindow=null;
326+// 検索ウィンドウの表示
327+function createSearchPanel(arg){ // 専用ブラウザでのmodelessDialogへの外部読み込みでは、dialogArgumentsが送れないので直接書き出す
328+ if(arg){word=arg}
329+ if(searchWindow && !searchWindow.closed){return}
330+ var skinPath=document.getElementsByName("SkinPath")[0].content;
331+ searchWindow=showModelessDialog("",window,'dialogWidth:500px;dialogHeight:200px;dialogTop:0px;dialogLeft:0px;help:no;resizable:yes;status:no;unadorned:yes;');
332+ var nWin='<html><head><title>単語の検索<\/title>'
333+ +'<script type="text/javascript">function submitEvent(){var fo=document.forms[0]; dialogArguments.word=fo.word.value; var i=-1;do{i++;dialogArguments.expression =fo.expression[i].value;}while(!fo.expression[i].checked); var i=0; while(fo.searchTarget[i]){dialogArguments.searchTarget[fo.searchTarget[i].value]=fo.searchTarget[i].checked;i++;} var i=-1;do{i++;dialogArguments.searchView =fo.searchView[i].value;}while(!fo.searchView[i].checked); dialogArguments.searchWord();}</script>'
334+ +'<style type="text/css">body{background:ThreeDFace;padding:0.5em;overflow:auto} fieldset{padding:0.5em;margin-top:0.5em;} legend,label,input{font:message-box;}</style>'
335+ +'<\/head><body onunload="unloadEvent()"><form onsubmit="submitEvent();return false;"><table width="100%"><tr><td valign="top" colspan="3">'
336+ +'<label for="word">検索文字列:</label><input type="text" name="word" id="word" size="50" value="'+word+'" tabindex="0"><br>'
337+ +'</td><td align="right" valign="top" rowspan="2">'
338+ +'<input type="submit" name="submit" value=" 検 索 " tabindex="7"><br><br><input type="button" name="cancel" value="キャンセル" onclick="window.close()" tabindex="8">'
339+ +'</td></tr><tr valign="top">'
340+ +'<td><fieldset><legend>検索方法</legend><input type="radio" name="expression" value="default" id="tDef" tabindex="1"> <label for="tDef">通常検索</label><br><input type="radio" name="expression" value="regExp" id="tReg"> <label for="tReg">正規表現</label><br><input type="radio" name="expression" value="multiAND" id="tAND"> <label for="tAND">AND検索</label><br><input type="radio" name="expression" value="multiOR" id="tOR"> <label for="tOR">OR検索</label></fieldset></td>'
341+ +'<td><fieldset><legend>検索対象</legend><input type="checkbox" name="searchTarget" value="name" id="tName" tabindex="2" checked> <label for="tName">名前</label><br><input type="checkbox" name="searchTarget" value="mail" id="tMail" tabindex="3" checked> <label for="tMail">メール</label><br><input type="checkbox" name="searchTarget" value="id" id="tID" tabindex="4" checked> <label for="tID">日付とID</label><br><input type="checkbox" name="searchTarget" value="mess" id="tMess" tabindex="5" checked> <label for="tMess">本文</label></fieldset></td>'
342+ +'<td><fieldset><legend>結果表示</legend><input type="radio" name="searchView" value="resList" id="rList" tabindex="6"> <label for="rList">レス番号を表示</label><br><input type="radio" name="searchView" value="resPopup" id="rPop"> <label for="rPop">レスをポップアップ</label><br><input type="radio" name="searchView" value="resJump" id="rJump"> <label for="rJump">レスへジャンプ</label></fieldset></td>'
343+ +'</tr></table></form><\/body><\/html>';
344+ searchWindow.document.write(nWin);
345+ sdf=searchWindow.document.forms[0]; sdf.elements[0].select();
346+ var ex=sdf.expression;for(var i=0;i<ex.length;i++){if(ex[i].value==expression){ex[i].checked=true}}
347+ var sv=sdf.searchView;for(var i=0;i<sv.length;i++){if(sv[i].value==searchView){sv[i].checked=true}}
348+ range=document.body.createTextRange();
349+}
350+// 検索処理メイン
351+var word="";var range;var searchTarget={"word":true};
352+function searchWord(){
353+ if(!word){return} word=word.replace(/(^\x20+|\x20+$)/g,"");
354+ var matchs=new Array(); var color=new Array();
355+ // 検索方法
356+ if(expression=="regExp" || expression=="default" || (expression.match(/multi/) && !word.match(/\s/))){ // AND/ORで一単語ならdefaultで検索
357+ // 検索語指定
358+ if(expression=="regExp"){
359+ var regWord=word.replace(/[\^\$]/g,"");
360+ var reg=new RegExp(regWord,"g"); var tmpArr=range.text.match(reg);
361+ if(!tmpArr || !tmpArr.length){tmpArr=new Array();}
362+ var tmpHash={}; for(var i=tmpArr.length;i--;){tmpHash[tmpArr[i]]=true} for(var i in tmpHash){matchs.push(i)} // 正規表現でのマッチパターンの重複を排除
363+ if(!matchs || !matchs.length){matchs[0]=word} // 検索結果0or1なら、配列作成
364+ }else{matchs[0]=word}
365+ // ハイライト→重複排除処理
366+ var tmpHash={};
367+ for(var i=0;i<matchs.length;i++){
368+ var tmp=setHighlight(matchs[i]);
369+ color[0]=tmp[0]; // 単色なので常にcolor[0]に入れる
370+ for(var j=tmp[1].length;j--;){tmpHash[tmp[1][j]]=true;} // 同一レス内部での複数マッチを排除
371+ }
372+ createHash(highlight,color[0],"",matchs[0]);
373+ for(var i in tmpHash){highlight[color[0]].push(i);}
374+ highlight[color[0]].sort(sortByInt);
375+ highlight[color[0]].word=word;
376+ }else{
377+ // 検索語指定
378+ var matchs=word.split(" "); var tmpArr=new Array();
379+ // ハイライト→重複処理
380+ for(var i=0;i<matchs.length;i++){
381+ var tmp=setHighlight(matchs[i]);
382+ color.unshift(tmp[0]);
383+ var tmpHash={};for(var j=tmp[1].length;j--;){tmpHash[tmp[1][j]]=true} for(var j in tmpHash){tmpArr.push(j);} // 同一レス内部での複数マッチを排除
384+ highlight[color[0]].word=matchs[i];
385+ }
386+ color.reverse();tmpArr.sort(sortByInt);
387+ createHash(highlight,color[0],"",matchs[0]); // 一旦初期化
388+ var tmpHash={};var judge=(expression=="multiAND") ? matchs.length+"<=tmpHash[i]" : "1";
389+ for(var i=0;i<tmpArr.length;i++){if(tmpHash[tmpArr[i]]){tmpHash[tmpArr[i]]++}else{tmpHash[tmpArr[i]]=1}}
390+ for(var i in tmpHash){if(eval(judge)){highlight[color[0]].push(i)}} // 検索結果はhighlight[color[0]]に入れる
391+ }
392+ // 結果表示
393+ if (searchView=="resList") {returnFound("search",color);searchWindow.close();}
394+ else if(searchView=="resPopup"){returnFound("search",color);searchWindow.close();}
395+ else if(searchView=="resJump") {returnFound("search",color);searchWindow.close();if(highlight[color[0]].length){moveToSearchRes("search",color.join(","))}}
396+}
397+// ハイライト検索
398+function setHighlight(reg){
399+ // カラー選択
400+ var c=selectColor("highlight"); if(!c){return} var nums=[];
401+ // 検索
402+ while(range.findText(reg)){
403+ var dt=range.parentElement();var tag=dt.tagName; var thisRange;
404+ // 検索対象で絞り込み
405+ if(tag=="B"||tag=="U"){thisRange="name"}
406+ else if(tag=="DT") {thisRange="mail"}
407+ else if(tag=="SPAN") {thisRange="id"}
408+ else if(tag=="DD" || tag=="A" && dt.parentElement.tagName=="DD"){thisRange="mess"}
409+ else if(tag=="STRONG"){thisRange="word"}
410+ else{/*alert("tag:"+tag+"\ndt:"+dt.outerHTML);*/range.collapse(false);continue;} // レス番号(A)や検索結果自体(TT)
411+ if(!searchTarget[thisRange]){range.collapse(false);continue;}
412+ // 正規表現の位置指定子がある場合、包含要素内部で再検索
413+ if(expression=="regExp" && word.match(/[\^|\$]/)){
414+ var thisReg=new RegExp(word); var targetText=(tag=="STRONG") ? dt.parentElement.innerText : dt.innerText;
415+ if(!targetText.match(thisReg)){range.collapse(false);continue}
416+ }
417+ // dt取得→レス番号取得→ハイライト
418+ if(dt.tagName!="DT"){
419+ while(dt.tagName!="DT" && dt.tagName!="DD"){dt=dt.parentElement}
420+ if(dt.tagName=="DD"){dt=dt.previousSibling}
421+ }
422+ var num=dt.firstChild.innerText;
423+ if(dt.parentElement.className!="refResult"){nums.push(num)} // 逆参照内のDTなら回避
424+ range.pasteHTML('<strong style="background-color:'+c+'">'+range.text+'</strong>');
425+ range.collapse(false);
426+ }
427+ range=document.body.createTextRange(); // レンジを元に戻しておく
428+ return([c,nums]);
429+}
430+//==========逆参照
431+function searchRef(obj){
432+ if(obj.name!='referred'){
433+ var num=obj.firstChild.innerText;
434+ if(refHash[num]){
435+ var refArr=refHash[num].split(/\s/); var refs="";
436+ for(var i=0;i<refArr.length;i++){refs+=returnString(refArr[i]);}
437+ obj.nextSibling.insertAdjacentHTML("beforeEnd",'<dl class="refResult">'+refs+'</dl>')
438+ obj.name="referred";
439+ }
440+ }else{
441+ obj.nextSibling.lastChild.removeNode(true);
442+ obj.name='';
443+ }
444+}
445+//==========クリップボードにコピー
446+function copyText(target){
447+ var num=event.srcElement.parentElement.name;
448+ var obj=getDTfromAnc(num);
449+ var textarea=document.createElement("TEXTAREA");
450+ var message=obj.nextSibling.innerText.replace(/\s(\r\n|$)/g,"\n");
451+ if (target=="res") {textarea.value=obj.firstChild.innerText+" :"+obj.childNodes[1].innerText+" :"+obj.lastChild.innerText+"\n"+message;}
452+ else if(target=="name"){textarea.value=obj.childNodes[1].innerText+"\n";}
453+ else if(target=="mail"){textarea.value=obj.childNodes[2].nodeValue+"\n";}
454+ else if(target=="id") {textarea.value="ID:"+(obj.lastChild.innerText.split(/ID:/))[1]+"\n";}
455+ var copyText=textarea.createTextRange();
456+ copyText.execCommand("Copy")
457+ event.srcElement.parentElement.removeNode(true);
458+}
459+//==========アンカーからDTを特定
460+var ancs=document.anchors;
461+function getDTfromAnc(num){
462+ var anc=ancs(anchorHead+num);
463+ if(!anc){return("")} //LABELNUMBER対応のあぼ〜ん若しくは未出番号なら終了
464+ var obj=anc.parentElement; //LABELNUMBER対応のもの
465+ if(!obj || !obj.tagName){return false;}
466+ if(obj.tagName!="DT"){ //LABELNUMBER非対応のもの
467+ if(num==1){if(anc){obj=anc.nextSibling} else{return("")}}
468+ else {if(!anc.nextSibling){obj=anc.parentElement.nextSibling}else{return("")}}
469+ }
470+ return(obj);
471+}
472+//==========sort関数
473+function sortByInt(x,y){return(x-y)}
474+
475+// 画像板関連
476+var regIMG=new RegExp(".*?\\s.*?\\s.*:.*?\\sIMG:(.*?)(\\s|$)"); // 画像も可能にしてみる
477+function getIMG(obj){
478+ if(regIMG.test(obj.innerText)){
479+ var filename=RegExp.$1;
480+ var tmp=filename.match(/(\d\d\d\d)(\d\d\d\d)(\d\d)/);
481+ var today=new Date();var last=new Date(today-7*24*60*60*1000);var date="";
482+ date+=last.getMonth()<9 ? "0"+(last.getMonth()+1) : last.getMonth()+1;
483+ date+=last.getDate()<10 ? "0"+last.getDate() : last.getDate();
484+ var log= (RegExp.$1+""+RegExp.$2 < last.getYear()+""+date) ? "_kako/" : "_img/";
485+ var fileurl="http://up01.2ch.io/"+log+RegExp.$1+"/"+RegExp.$1+RegExp.$2+"/"+RegExp.$3+"/"+filename;
486+ return(fileurl)
487+ }else{return(false)}
488+}
489+
--- /dev/null
+++ b/res/skin/skin30-3G_IE7/chie_thumbPanel.js
@@ -0,0 +1,95 @@
1+var orgDialogW=dialogWidth;var orgDialogH=dialogWidth;
2+// 画像読込判定\
3+function imgResult(img){
4+ var btn=img.parentElement.children.item(2);
5+ if(event.type=="load"){btn.innerText="___"; img.style.display="block";}
6+ else{btn.innerText="NONE";btn.style.color="#C00";}
7+ var y=27+Math.max(document.getElementById("thumbPanel").clientHeight,document.getElementById("thumbPanel").scrollHeight);
8+ if(y>screen.availHeight){y=screen.availHeight};
9+ window.self.dialogHeight=y+"px";
10+ orgDialogH=dialogHeight;
11+}
12+// サイズの切替
13+function changeSize(btn){
14+ var div=document.getElementById("viewPanel");
15+ var img=div.firstChild;
16+ if(!img){return}
17+ if(btn.innerText.match(/100%|_+/)){
18+ var hRatio=div.style.pixelWidth /img.offsetWidth;
19+ var vRatio=div.style.pixelHeight/img.offsetHeight;
20+ var ratio =(hRatio>vRatio) ? vRatio : hRatio;
21+ if(ratio>1){ratio=1}else{img.style.zoom=ratio*100+'%';}
22+ btn.innerText=Math.round(ratio*100-0.5)+"%";
23+ }else{
24+ img.style.zoom="100%";
25+ btn.innerText="100%";
26+ }
27+}
28+// サムネイルの削除
29+function removeThumb(btn){
30+ btn.parentElement.removeNode(true);
31+ if(!thumbPanel.innerHTML&&!viewPanel.innerHTML){self.window.close();return;}
32+ var y=27+Math.min(document.body.clientHeight,document.body.scrollHeight);
33+ window.self.dialogHeight=y+"px";
34+ orgDialogH=dialogHeight;
35+}
36+// 画像表示の切替
37+function changeView(mode,href){
38+ if(!href){href=event.srcElement.src}
39+ var div = document.getElementById("viewPanel");
40+ var thumbs=document.getElementById("thumbPanel");
41+ if(thumbs){
42+ var l=thumbs.childNodes.length;
43+ for(var i=l;i--;){
44+ var stateBtn=thumbs.childNodes[i].childNodes[2];
45+ if(stateBtn.tagName=="BUTTON" && stateBtn.innerText!="NONE"){stateBtn.innerText="___"} //embedはchildNodesに入らない?
46+ }
47+ }
48+ if(!div.hasChildNodes() || div.firstChild.src!=href){
49+ if (mode=="img") {var nHTML='<img src="'+href+'" ondragstart="imageMoveStart(this)" ondrag="imageMove(this)" oncontextmenu="addObject()">'}
50+ else if(mode=="swf") {var nHTML='<embed src="'+href+'"></embed><button onclick="window.open(\''+href+'\',\'_parent\')">OPEN</button><button onclick="clearView()">CLOSE</button>'}
51+ div.innerHTML=nHTML;
52+ div.style.posWidth =screen.availWidth-127;
53+ div.style.posHeight=screen.availHeight-20;
54+ if(mode=="img"){changeSize(event.srcElement.parentElement.childNodes[2])}
55+ else{div.firstChild.style.posHeight=div.style.posHeight-25}
56+ //ウィンドウのサイズ
57+ var x,y;
58+ if (mode=="img"){x=div.childNodes[0].offsetWidth+145; y=Math.max(div.childNodes[0].offsetHeight+30,parseInt(orgDialogH));}
59+ else if(mode=="swf"){x=screen.availWidth;y=screen.availHeight;orgDialogH=dialogHeight;}
60+ window.self.dialogWidth =x+"px";
61+ window.self.dialogHeight=y+"px";
62+ }else{clearView()}
63+}
64+//Viewパネルクリア
65+function clearView(){
66+ var div=document.getElementById("viewPanel");
67+ while(div.firstChild){div.removeChild(div.firstChild)};
68+ if(!thumbPanel.innerHTML){self.window.close();return;}
69+ //ウィンドウのサイズ
70+ window.self.dialogWidth =orgDialogW+"px";
71+ window.self.dialogHeight=orgDialogH+"px";
72+ dialogArguments.focus();
73+}
74+var imageMoveX,imageMoveY;
75+function imageMoveStart(obj){
76+ imageMoveX=obj.parentElement.scrollLeft+event.clientX;
77+ imageMoveY=obj.parentElement.scrollTop +event.clientY
78+}
79+function imageMove(obj) {
80+ obj.parentElement.scrollLeft=imageMoveX-event.clientX;
81+ obj.parentElement.scrollTop=imageMoveY -event.clientY
82+}
83+// モザイク処理
84+function imgOver(my,num) {my.style.filter="Alpha(opacity="+num+")"}
85+
86+// Object追加
87+function addObject(){
88+ var div = document.getElementById("viewPanel");
89+ if(div.firstChild.tagName!="IMG"){return}
90+ div.insertAdjacentHTML("beforeEnd",'<object data="'+event.srcElement.href+'" ondragstart="imageMoveStart(this)" ondrag="imageMove(this)"></object>');
91+ div.childNodes[1].style.pixelWidth =div.childNodes[0].offsetWidth+16;
92+ div.childNodes[1].style.pixelHeight=div.childNodes[0].offsetHeight;
93+ div.src=div.data;
94+ div.childNodes[0].removeNode(true);
95+}
Show on old repository browser