「Absolute」を含む日記 RSS

はてなキーワード: Absoluteとは

2011-09-08

Feeling of the cat

Translated from http://anond.hatelabo.jp/20110907020451




For a long time, I am in a dark box.




According to someone's comment I heard outside of the box, a tiny bottle containing deadly poison is located in this box. Although the bottle is completely sealed, a hammer is positioned in the vicinity of the bottle. And they said the hammer would fall down at a certain time.




When is "the certain time"? I don't know. In this very moment? Or distant future? Possibly, it already has come (I don't want to think about it). No one can affect the hammer. As an independent event, it will fall down with probability 50%. The probability is exactly 50%. Possibly, the bottle may be broken, or may not. About myself, dead, or, alive.




I must say, how terrible the situation is.




It is impossible for me to avoid having a furious indignation. My life, the most important issue for me, is completely away from me, and is solely dependent on the simple figure, FIFTY PERCENT! Too much terrible.




Additionally, and I think it is completely unreasonable, I am shackled in many ways to keep the probability at exactly 50%.




Visual perception. The box is completely shielded from any light. It's for avoiding me from finding and destroying the bottle and apparatus. Complete darkness. I am in the total darkness. Thus, now I can’t see even the outline of myself. Possibly it sounds strange, the darkness makes me have a doubt about the existence of my body itself.




Acoustic perception. Maybe, from the reason I mentioned above, a perfect sound insulation is used. I can’t hear even the voice of my own. I don't know the mechanism. In the first place, as I can’t see anything, how can I investigate it? So, this is only a speculation, possibly, my drum membranes were damaged before enclosure in this box, or, some special material is used for the wall of the box.




Anyway, in a dark box too much good at shielding light and sound, my visual and acoustic perception is dead just as the term indicates.




As if further confirmation are needed, a huge fatigue weighing heavily upon me is another shackle for me. It seems that they gave me some kind of muscle relaxant to avoid me from struggling. As I can’t change from the same posture, my tactile perception is almost paralyzed.




No light. No sound. Smell and taste are unreliable. Tactile perception is in malfunction. I am like a puppet. All the five senses are out of control of mine. Too much cruel. Perfect shackles. I wish if they had given a sleeping medicine. I feel I am in agony without any external injury. My life, my existence itself, is completely ignored. Such a humiliation keeps my sanity. Only such a humiliation can.




The right to control the life and death of myself is completely deprived. I hate such situation. The core determinant of the continuity of my life is completely dependent upon, solely upon, a pure probability. Completely away from anyone's will. I hate it, again, I hate it!




Why do I have to be enclosed in such a box? In such a ridiculous box, why do I have to be in fear of life and death with such perfect shackles?




Unreasonable. Cruel.




I am lonely. Am I feeling empty and flat? Difficult to avoid sobbing? No. My loneliness is much deeper. I am in a sea of void. I am alone. Completely alone. As an orphan, I was thrown into this endless darkness. I am quivering in the absolute zero.




There is no perspective in this box. Only the darkness is here. I can’t feel the bottle and the hammer. I can’t feel the wall, the bottom, and the ceiling neither. They should be there. But all the five senses of mine are deprived. I feel like there is nothing. While those things have some meanings.




Speaking honestly, I am not so sure I am in a box. I am sure that what I am exists. I am thinking. I am fantasizing. It is the evidence showing the uniqueness of mine, which is called the ego or the consciousness or the mind, is solid. But, is the uniqueness is truly enclosed in the box? Is it possible that it is floating in another space? I can’t eliminate such doubts.




Possibly, what I am here is floating in the end of the universe, or is lying down at the bottom of the Mariana Trench. Or going down from a vent of the Kilauea volcano, maybe.




I don't have any method to know how the box (enclosing me) is. All the senses of mine are dead. It is impossible for me to determine whether here is inside of a box or not.




In addition to that, I am not so sure that I am truly alive. I don't have any way to confirm such a simple thing. Possibly, the 50% probability has already passed beyond me. Maybe I am already dead. I am still alive, maybe. Injected with muscle relaxant, shallow breathes, weak heartbeats. Or, cessation of all of them, simply leaving meat bolus.




I am deprived of any capability of controlling my own body. Who can say that my mind resides in the body continuing vital activities? The five senses have been poisoned with the total darkness. They can’t function as sensory organs. I don't have any chance to know the truth. Possibly, any supposition is fabricated by myself. The situation surrounding me and the uniqueness of myself are components of programmed role-play, possibly.




About the existence of mine, I can’t determine the behavior. I hate to admit it, but I am in the middle of fluctuation.




I wish someone could find me. I wish someone could open the box and observe how I am, and determine what I am. There is not enough power inside me to do so. All I can do is to continue to quiver in the loneliness.




If I were the Almighty, I could say "Let there be light". I know it is impossible. But I can‘t help feeling how nice it would be if I could say so.




My own free will! It could fix every fluctuation surrounding myself!




At the same time, longing produces shadow. If the box is opened, I will be found and observed. As a result, what I am will be determined. To tell the truth, I can’t look away from the fact I am anxious about being determined.




Although I am unable to determine whether I am alive or dead by myself, I am afraid of the death. I am afraid that I am determined as a dead. I can’t accept. Still I can’t feel, I can’t imagine the death as a specific phenomenon. Probably, that is why I am afraid of death.




No, it should not be restricted to me. King of virtue. Deadly murderer. Regular folks. All the same. Maybe, the elder people or patients of bad disease could have some imagination sufficiently close to the true death. But, even so, it is impossible to know the specific experience of death.




In the end, death is the final destination with overwhelming significance. The time and the consciousness have an absolute irreversibility. Death also has the absoluteness which can’t be changed. Even if it is a ritual pass point or an outstanding impressive event.




Myself, the mind of mine here is, will be vanished at the moment at which how I am is determined. If they deprive the lukewarm water, in which I can’t feel the temperature, it is impossible for me to avoid exposing myself to the air.




I am afraid of such an irreversible change. It is not limited to the determination of death. Also I am so anxious that I am determined being alive.




The current existence of myself is like a tiny, tiny illusion standing on an endless point. Not larger than that. Not smaller than that. Not longer than that. Not shorter than that. No expansion. No shrinkage. Standing upon a unique single point. It is mathematically correct. I am something like a ghost staying upon such a point, having confusion about identity of myself.




The point exists at every position on a plane of coordinates, at the same time, not existing at a certain position. If a certain event occurs, on that moment, it will converge me to a single point among all the space-times, in which the event has occurred, as if having me step off a bus. Without any concern. Even if the point and I have been a one. The illusion, which has stayed in such a point, has possibilities of being real and being vanished like a mist, to an equal degree.




Now, I am existing in every time-space, I have every nature. At the same time, I am suffering from the loneliness that I am away from every nature. I wish someone can find me. At the same time, I am so anxious that where I will be, and that how I will be at that moment.




I have been released from the law of cause and effect. I am undetermined ever, for ever.

2011-02-14

都内を走るのにロードよりのクロスがほしいなという人へ

http://anond.hatelabo.jp/20090713004520

の具体例として書いてみる。

都内を走るのに、ロードよりのクロスがいいなと思って、さあ買いにいこうと思ってもやっぱり悩む悩む。

ので、いくつかよさげ、もしくは5万円付近で定番のものをリストアップしてみた。

ただ、言えることはどんなに悩んでも買ってから乗ってみるとめっちゃ楽しい。なのでこの中でもそうじゃなくてもいいけれど、なんでも買ってみるのをおすすめ

2009-02-18

[] <ロシア語> русский язык

[Resources] リンク集 Useful Link Resources

学習に役立つリンクを集めた言語学総合サイトなど。

  1. Web site Title (サイト名)

[Japanese / Russian] 日本語ロシア語を学ぶ Learning Russian by Japanese

  1. ロシア語指南

[Learner’s Available Language/ Learning Language] 何語で何語を学ぶ Learning - by -

  1. Web site Title (サイト名)

[Learner’s Available Language/ Learning Language]

  1. Web site Title (サイト名)

[Dictionary] オンライン辞書 Online Dictionaries

  1. Словари и энциклопедии на Академике

[Translation] 翻訳サイト Free Online Translation Sites

[Tool] 学習ツール Helpful Tools for Learning Language

[Portal] 学習言語圏のポータルサイトテキストソース Portal Sites of Learning Language / Text Sources

学習言語ポータルサイトなど。

[RSS] RSS feeds

ツールやリンクアップデート更新中の教材紹介記事など。

[Podcast] ポッドキャストリスニング教材 Podcasts / Listening Resources

[Youtube] 動画学習 Movie Resources

[Culture] 文化マナー・生活習慣 Culture / Manner / Life Style

冠婚葬祭言語圏生活で必要な情報など

[Set up] タイピング基礎、言語入力システムインストール Set up Tips for the Absolute Beginners.

[Vocabulary] ボキャブラリー、語彙習得

[Search Word] 検索ワード Words and Sites for Searching Resources

  1. 学習
  2. 勉強
  3. 教育
  4. 方法
  5. 教材
  6. 翻訳
  7. 便利
  8. 役立つ
  9. 文法

[Just For Fun] おまけ

[Unedited] 未編集備忘録 Transient stock/ Memorandum

語学学習サイト個人的リンクメモ / Lists of Language Learning Links)

http://anond.hatelabo.jp/20090101193230

[] <ドイツ語> Deutsch

[Resources] リンク集 Useful Link Resources

学習に役立つリンクを集めた言語学総合サイトなど。

  1. Web site Title (サイト名)

[Learner’s Available Language/ Learning Language] 何語で何語を学ぶ Learning - by -

  1. Web site Title (サイト名)

[Learner’s Available Language/ Learning Language]

  1. Web site Title (サイト名)

[Dictionary] オンライン辞書 Online Dictionaries

  1. Web site Title (サイト名)

[Translation] 翻訳サイト Free Online Translation Sites

[Tool] 学習ツール Helpful Tools for Learning Language

[Portal] 学習言語圏のポータルサイトテキストソース Portal Sites of Learning Language / Text Sources

学習言語ポータルサイトなど。

[RSS] RSS feeds

ツールやリンクアップデート更新中の教材紹介記事など。

[Podcast] ポッドキャストリスニング教材 Podcasts / Listening Resources

  1. Freut Mich

[Youtube] 動画学習 Movie Resources

  1. Freut Mich の対話練習のページ(作成中)

[Culture] 文化・マナー・生活習慣 Culture / Manner / Life Style

冠婚葬祭言語圏生活で必要な情報など

[Set up] タイピング基礎、言語入力システムインストール Set up Tips for the Absolute Beginners.

[Vocabulary] ボキャブラリー、語彙習得

[Search Word] 検索ワード Words and Sites for Searching Resources

  1. 学習
  2. 勉強
  3. 教育
  4. 方法
  5. 教材
  6. 翻訳
  7. 便利
  8. 役立つ
  9. 文法

[Just For Fun] おまけ

[Unedited] 未編集備忘録 Transient stock/ Memorandum

語学学習サイト個人的リンクメモ / Lists of Language Learning Links)

http://anond.hatelabo.jp/20090101193230

[] <フランス語> Français

[Resources] リンク集 Useful Link Resources

学習に役立つリンクを集めた言語学総合サイトなど。

  1. Web site Title (サイト名)

[English/French] 英語フランス語を学ぶ Learning French by English

  1. BBC - Languages - French
  2. Learn French - Learn to Speak the French Language Online Free
  3. French Language, Grammar, Pronunciation, Learn to Speak French Software
  4. Learn free: French Lessons
  5. Learn French at About - Learn, Speak, Teach French

[Learner’s Available Language/ Learning Language]

  1. Web site Title (サイト名)

[Dictionary] オンライン辞書 Online Dictionaries

  1. French to Japanese to French Dictionary
  2. French Japanese dictionary - lexicool.com
  3. Free online English-Japanese dictionary
  4. French-Japanese Ocean Dictionary
  5. Dictionnaires et encyclopédies en ligne,synonyme,acronyme,Anglais,Allemand,Latin,Espagnol,prénoms,néerlandais,suédois.
  6. 仏和検索
  7. Dictionnaire de japonais - 日仏辞典
  8. Sitemap de dictionnaires franco-japonais en ligne
  9. Recherche d'un mot
    • http://atilf.atilf.fr/dendien/scripts/tlfiv4/showps.exe?p=combi.htm
      • 仏仏辞典
  10. フランス語辞書:仏和辞典、和仏辞典、仏仏辞典 【オンライン無料】: 外国語広場

[Translation] 翻訳サイト Free Online Translation Sites

  1. Traduction Voila

[Tool] 学習ツール Helpful Tools for Learning Language

[Portal] 学習言語圏のポータルサイトテキストソース Portal Sites of Learning Language / Text Sources

学習言語ポータルサイトなど。

  1. Vitavous.com : Annuaire et moteur de recherche - Sélection et référencement gratuits
  2. フランス語ポータルサイト検索エンジン | 翻訳通訳辞書サイト検索

[RSS] RSS feeds

ツールやリンクアップデート更新中の教材紹介記事など。

[Podcast] ポッドキャストリスニング教材 Podcasts / Listening Resources

[Youtube] 動画学習 Movie Resources

[Culture] 文化・マナー・生活習慣 Culture / Manner / Life Style

冠婚葬祭言語圏生活で必要な情報など

[Set up] タイピング基礎、言語入力システムインストール Set up Tips for the Absolute Beginners.

[Vocabulary] ボキャブラリー、語彙習得

[Search Word] 検索ワード Words and Sites for Searching Resources

  1. 学習
  2. 勉強
  3. 教育
  4. 方法
  5. 教材
  6. 翻訳
  7. 便利
  8. 役立つ
  9. 文法

[Unedited] 未編集備忘録 Transient stock/ Memorandum

  1. 日本語ポータルサイト::フランスdeリンク::フランスサイトを繋ぐwebディレクトリフランスリンク
  2. フランス生活情報 フランスニュースダイジェスト - A c c u e i l
  3. パリ新聞: OVNI(オヴニー) | 最新記事一覧

語学学習サイト個人的リンクメモ / Lists of Language Learning Links)

http://anond.hatelabo.jp/20090101193230

[] <スペイン語> Español

[Resources] リンク集 Useful Link Resources

学習に役立つリンクを集めた言語学総合サイトなど。

  1. Web site Title (サイト名)

[English/Spanish] 英語スペイン語を学ぶ Learning Spanish by English

  1. English and ESL Learning for Speakers of Spanish
  2. Spanish Language: Learn Spanish grammar, vocabulary and culture

[Japanese/Spanish] 日本語スペイン語を学ぶ Learning Spanish by Japanese

  1. スペイン語講座
  2. スペイン語会話
  3. とっかかりスペイン語 入門の入門
  4. スペイン語の玄関
  5. いちばんやさしい!スペイン語メルマガで学ぶスペイン語会話

[Dictionary] オンライン辞書 Online Dictionaries

  1. Web site Title (サイト名)

[Translation] 翻訳サイト Free Online Translation Sites

[Tool] 学習ツール Helpful Tools for Learning Language

[Portal] 学習言語圏のポータルサイトテキストソース Portal Sites of Learning Language / Text Sources

学習言語ポータルサイトなど。

[RSS] RSS feeds

ツールやリンクアップデート更新中の教材紹介記事など。

[Podcast] ポッドキャストリスニング教材 Podcasts / Listening Resources

[Youtube] 動画学習 Movie Resources

  1. YouTube - Spanish for English Speakers-Lesson 1 alphabet ...
    • http://jp.youtube.com/watch?v=Urmz3KThfy0
      • I could be the first native Spanish native speaker who want ...
  2. 聞くスペイン語 Escucha español
    • http://escuchaespanol.com/
      • 聞く日本語。Escucha japonés » Podcast de conversaciones en japonés por Ale y Ai de Pepino. Transcripciones, comentarios y respuestas a tus dudas. Acostumbra tu oído al japonés hablado.

http://escuchajapones.com/

[Culture] 文化・マナー・生活習慣 Culture / Manner / Life Style

冠婚葬祭言語圏生活で必要な情報など

[Set up] タイピング基礎、言語入力システムインストール Set up Tips for the Absolute Beginners.

[Vocabulary] ボキャブラリー、語彙習得

[News] ニュースソース

[Extensive Reading] 読み物(小説ブログなど) Novels / Blogs

[Search Word] 検索ワード Words and Sites for Searching Resources

  1. 学習
  2. 勉強
  3. 教育
  4. 方法
  5. 教材
  6. 翻訳
  7. 便利
  8. 役立つ
  9. 文法

[Tips] お役立ち記事など

[Just For Fun] おまけ

[Unedited] 未編集備忘録 Transient stock/ Memorandum

  1. Spanish Numbers

語学学習サイト個人的リンクメモ / Lists of Language Learning Links)

http://anond.hatelabo.jp/20090101193230

[] <ハングル韓国語> 한국어, 조선말

[Resources] リンク集 Useful Link Resources

学習に役立つリンクを集めた言語学総合サイトなど。

  1. 韓国ウェブサイトを読む - [韓国語All About(1/2)
  2. 韓国語にはまっています。いろいろな単語の書き方と発音と読み方が知りたいのですが、何かいサイト無いですか? - Yahoo!知恵袋

[Japanese/Korean] 日本語韓国語を学ぶ Learning Korean by Japanese

  1. ハングルの森
  2. ケンチャナヨハングルハングルタイピング

[Learner’s Available Language/ Learning Language]

  1. Web site Title (サイト名)

[Dictionary] オンライン辞書 Online Dictionaries

  1. Web site Title (サイト名)

[Translation] 翻訳サイト Free Online Translation Sites

[Tool] 学習ツール Helpful Tools for Learning Language

  1. ハングルタイピング道場(仮)
  2. ハングルタイピングレッスン

[Portal] 学習言語圏のポータルサイトテキストソース Portal Sites of Learning Language / Text Sources

学習言語ポータルサイトなど。

[RSS] RSS feeds

ツールやリンクアップデート更新中の教材紹介記事など。

[Podcast] ポッドキャストリスニング教材 Podcasts / Listening Resources

[Youtube] 動画学習 Movie Resources

[Culture] 文化マナー・生活習慣 Culture / Manner / Life Style

冠婚葬祭言語圏生活で必要な情報など

[Set up] タイピング基礎、言語入力システムインストール Set up Tips for the Absolute Beginners.

[Vocabulary] ボキャブラリー、語彙習得

[Search Word] 検索ワード Words and Sites for Searching Resources

  1. 学習
  2. 勉強
  3. 教育
  4. 方法
  5. 教材
  6. 翻訳
  7. 便利
  8. 役立つ
  9. 文法

[Just For Fun] おまけ

[Unedited] 未編集備忘録 Transient stock/ Memorandum

Learn Korean - picture video vocab

http://www.koreanclass101.com/index.php

KJCLUB

http://www.kjclub.com/

語学学習サイト個人的リンクメモ / Lists of Language Learning Links)

http://anond.hatelabo.jp/20090101193230

[] <中国語中文

[Resources] リンク集 Useful Link Resources

学習に役立つリンクを集めた言語学総合サイトなど。

  1. 無料中国語学習できるサイト初心者用) - NAVER まとめ
  2. Web site Title (サイト名)

[Learner’s Available Language/ Learning Language] 何語で何語を学ぶ Learning - by -

[Japanese/English] 日本語中国語を学ぶ Learning Chinese by Japanese

  1. 中国語辞書 by 楽訳中国語
  2. 楽訳中国語教室
  3. 中国語会話入門
  4. こんな時だから旅の中国語英語
  5. 中国語学サイト Virtual 中国語講座
  6. あいうえお中国語中国語学習・中国語講座
  7. 我愛中国語
  8. オンライン中国語学習-中国語とは?<中国情報局
  9. 中国語教材 - BitEx中国語
  10. 紅の中国語講座
  11. ピンイン(Pinyin)と漢字の壺
[Speaking] 会話
  1. 実用中国語講座--無料で学べる中国語学サイト--
Pronunciation /pinyin /発音 /声調
  1. 中国語発音塾:スペースアルク
  2. BB中国語発音
  3. 中国語の基本発音 / 中国語学サイト中文広場
  4. 中国語発音講座
  5. 中国語発音辞書(ピンイン検索) / 中国語学サイト中文広場
  6. 音韻配合表 | 発音編 | 中国語教材 - BitEx中国語

[Dictionary] オンライン辞書 Online Dictionaries

[Translation] 翻訳サイト Free Online Translation Sites

[Tool] 学習ツール Helpful Tools for Learning Language

  1. Chinese Perapera-kun: Chinese Popup Translator :: Firefox Add-ons
  2. ピンイン(pinyin)変換サービス -- 書虫
  3. [Ajax] 中国語漢字ピンインローマ字ルビ
  4. 中国語ピンイン変換の「どんと来い、中国語」にようこそ! | どんと来い、中国語
  5. 下载谷歌拼音输入法(google pinyin)

[Portal] 学習言語圏のポータルサイトテキストソース Portal Sites of Learning Language / Text Sources

学習言語ポータルサイトなど。

[RSS] RSS feeds

ツールやリンクアップデート更新中の教材紹介記事など。

[Podcast] ポッドキャストリスニング教材 Podcasts / Listening Resources

[Youtube] 動画学習 Movie Resources

  1. YouTube - cnstation's Channel

[Culture] 文化マナー・生活習慣 Culture / Manner / Life Style

冠婚葬祭言語圏生活で必要な情報など

[Set up] タイピング基礎、言語入力システムインストール Set up Tips for the Absolute Beginners.

  1. How to display/input Chinese? – Support - Learn Chinese

[Vocabulary] ボキャブラリー、語彙習得

[News] ニュースソース

[Extensive Reading] 読み物(小説ブログなど) Novels / Blogs

[Search Word] 検索ワード Words and Sites for Searching Resources

  1. ○○語 华语/華語、汉语/漢語、中文
  2. 学習
  3. 勉強 教学/教學
  4. 教育 
  5. 方法
  6. 教材
  7. 翻訳
  8. 辞書
  9. 便利
  10. 役立つ
  11. 文法
  12. 練習

[Tips] お役立ち記事など

[Just For Fun] おまけ Bonus Materials

[Unedited] 未編集備忘録 Transient stock/ Memorandum

  1. 中国語All About
  2. オンライン中国語学習-中国語とは?<中国情報局
  3. YellowBridge Chinese-English Dictionary
  4. Ting - Chinese English Dictionary Study Center 听-汉英词典学习中心 -Learn Language
  5. Tongue Twisters -- Ting -- Chinese - English Language
  6.  
  7. Best Chinese Websites
  8. China Daily Website - Connecting China Connecting the World
  9. Chinese Tool Bar
  10. 中国語例文検索中国語入力
  11. 日本作品_日本文学_日本作家_日本小说_日文小说_日文书籍_贯通日本
  12. 華流ドラマ 三国志 「連環計」 1-6 ネット中国語
  13. 中国語学習,質問掲示板:(中国語入力可能)-Mahoo!上海
  14. PTT批踢踢實業坊 - 首頁
  15. Chinese Forums
  16. MDBG Chinese-English dictionary
  17. 中国語】 お勧め参考書辞書を教えてください!≫ 【国際】 2ch世界ニュース (゚∀゚ )!
  18. 中文 - HSK-中国汉语水平考试
  19. ジュンク堂書店 聴読中国語
  20. 中国語」は存在しない!! 使用言から見た統一国家中国」の内実

語学学習サイト個人的リンクメモ / Lists of Language Learning Links)

http://anond.hatelabo.jp/20090101193230

[] <日本語> にほんご

[Resources] リンク集 Useful Link Resources

学習に役立つリンクを集めた言語学総合サイトなど。

  1. Jim Breen's Japanese Page
  2. Tae Kim’s Blog » Links
  3. Keiko Schneider's Bookmarks
  4. Japanese language learning tools on Web
  5. Learn Japanese - Japanese Language
  6. 授業で使えるWebサイト効果的な使い方
  7. オンライン小説情報リンク集オリジナル・一般向〜
  8. 日本語教材図書館*JLPT日本語能力試験対策と「みんなの日本語」教材データ
  9. Resources for Japanese Students and Educators (The Association of Teachers of Japanese)

[English/Japanese] 英語日本語を学ぶ Learning Japanese by English

  1. Jim Breen's Japanese Page
  2. Japanese language learning tools on Web
  3. Charles Kelly's Online Japanese Language Study Materials
  4. Japanese Idioms
  5. All Japanese All The Time Dot Com: How to learn Japanese. On your own, having fun and to fluency. » About
  6. Tae Kim's Japanese guide to Japanese grammar
  7. YASUKO'S NIHONGO HOUSE
  8. The Daily Yo-ji
  9. JGram - The Japanese Grammar database
  10. JPLANG | LOGIN
  11. Japanese: Vocabulary Guide | 日本語: ボキャブラリーガイド
  12. Learn Japanese - Japanese Language
  13. Nihongojouzu
  14. Yahoo! 360° - Japanese for you Everyday♪ - writing a letter 2
  15. Expressions used in Japanese Letters - How to write Japanese letters
  16. My Furusato: Home of Everything Japanese from History to Culture Through Humor and Art and now the Fountain of Youth to fantastic health and less disease.
  17. Japanese Language School - MLC Meguro Language Center(in Tokyo,Japan)

[Japanese/Japanese] 日本語日本語を学ぶ Learning Japanese by Japanese

  1. Learn Japanese--北嶋千鶴子日本語教室 Let's play in Japanese
  2. ひらがなタイムズ/サイトマップ
  3. 日本語勉強 - Japan Forum
  4. 日本語Q&A:スペースアルク
  5. 日本語Q&A
  6. 初級日本語 げんき オンライン:げんきな自習室
  7. nihon5ch.net::::TOP::::日本語言葉日本語の文法を考えるための素材とツールを提供するサイト
  8. 日本語教師の教案 みんなの日本語ハンドアウト
  9. 寺村誤用例集データベース
[Hiragana] ひらがな
  1. U-biq
  2. Kana Sensei
  3. オンライン日本語学習 (Online Japanese Practice)
  4. ローマ字表 (Chart for Romaji to Hiragana)
  5. POINTひらがなローマ字表|ぴよタイピング
  6. pc_roma.gif (GIF Image, 745x900 pixels)
  7. ひらがな
  8. あいうえお表でひらがなを覚えましょう!
  9. Romaji
[Kanji] 漢字
  1. Read The Kanji | Learn how to read japanese kanji!
  2. 学習ページ(岡山大学 Okayama Univ.)
  3. Learn Japanese Kanji Online : WebCMJ (名古屋大学 Nagoya Univ.)
  4. 初級日本語 げんき オンライン:げんきな自習室
  5. Most Frequent 1000 Kanji of the Japanese Language | Japanese Language Lessons: Let's Learn Japanese!
  6. 漢字の正しい書き順(筆順)のメニュー
  7. 漢字で学ぶ日本語
  8. Happy Rice ~ 漢字勉強しながら寄付をしよう! ~
[Grammer] 文法
  1. Tae Kim's Japanese guide to Japanese grammar
  2. JGram - The Japanese Grammar database
  3. NationMaster - Encyclopedia: Japanese grammar
  4. 日本語の文法のリスト - 一級
  5. ●ことばと文字にかかわるおぼえがき——「クルミノ コーボー」
  6. みんなの日本語 練習
  7. Learn Japanese Grammar Online : WebCMJ
  8. 外国人のための日本語学習について-J-Life
  9. Chopsticks New York
  10. JReK - Japanese Sentence Search

[Dictionary] オンライン辞書 Online Dictionaries

  1. WWWJDIC: Word Search
  2. 英辞郎(eijiro) on the WEB
  3. English to Japanese, Japanese to English On line Dictionary
  4. kanji romaji hiragana convert
  5. Japanese Dictionary Tangorin.com
  6. 漢和辞典 漢字辞書 漢和辞書 [無料]
  7. Wiktionary
  8. 時代日本語類語辞典 類語玉手箱 -- 類語辞典シソーラス

[Translation] 翻訳サイト Free Online Translation Sites

  1. WWWJDIC: Text/Word Translation
  2. Nice Translator - The fast, easy to use online translator

[Tool] 学習ツール Helpful Tools for Learning Language

  1. rikaichan | polarcloud.com
  2. Reading Tutor - チュウ太の道具箱
  3. フナハシ学習塾 ためになる?ページ

[Portal] 学習言語圏のポータルサイトテキストソース Portal Sites of Learning Language / Text Sources

学習言語ポータルサイトなど。

(For Beginners)

  1. Hiragana Times
  2. Yahoo!きっずニュース
  3. 学研キッズネット
  4. キッズ@nifty
  5. キッズgoo

[RSS] RSS feeds

ツールやリンクアップデート更新中の教材紹介記事など。

[Podcast] ポッドキャストリスニング教材 Podcasts / Listening Resources

  1. Learn Japanese Pod
  2. Nippon VoiceBlog
  3. Learn Japanese @ Japancast.net
  4. S-J-P Study Japanese Podcast
  5. PodcastDirectory - Japanese Podcast Search Results

[Youtube] 動画学習 Movie Resources

  1. YouTube - Let's Learn Japanese Basic 1: "I'm Yan" [Episode 1, Part A]
  2. Namasennsei's Japanese lessons - YouTube

[Culture] 文化マナー・生活習慣 Culture / Manner / Life Style

冠婚葬祭言語圏生活で必要な情報など

  1. OK World - Abundant Living Information for foreign residents in Japan
  2. Cultural News
  3. Japan Reference
  4. Web Japan : Top Page
  5. メニュー - 知っておこう 暮らしマナー
  6. Japan With Kids - The interactive online community for English speaking parents in Japan!
  7. みんなの知識【ちょっと便利帳】

[Set up] タイピング基礎、言語入力システムインストール Set up Instructions for the Absolute Beginners.

  1. Japanese Input | Japanese Language Lessons: Let's Learn Japanese!
  2. Google 日本語入力 - ダウンロード

(For Windows)

  1. Installing East Asian Language Support under Windows 2000 Professional
  2. How to set up the Japanese input system
  3. YouTube - learn how to install japanese input support for windows

(For Mac)

  1. macosxhints.com - More Kotoeri (Japanese input) tips

(In case you are using shared computer)

  1. Using Japanese font and IME at Internet Cafe 海外インターネットカフェ日本語を使う (フォント日本語変換IME
  2. Type in Japanese - Google Transliteration

[Vocabulary] ボキャブラリー、語彙習得

  1. 日本語の文法のリスト - 一級

[News] ニュースソース

  1. くらべる一面 : 新s あらたにす日経朝日読売

[Extensive Reading] 読み物(小説ブログなど) Novels / Blogs

  1. 青空文庫 Aozora Bunko
  2. The Baker Street Bakery > 音声化された青空文庫リンク集
  3. 青空文庫サウンドブックス
  4. 1000文字小説 [1000moji.com]
  5. 翻訳

[Search Word] 検索ワード Words and Sites for Searching Resources

  1. 日本語
  2. 学習
  3. 勉強
  4. 教育
  5. 方法
  6. 教材
  7. 翻訳
  8. 辞書
  9. 便利
  10. 役立つ
  11. 文法
  12. 練習

[Tips] お役立ち記事など

  1. Learn Japanese with Twitter | Jayhan Loves Design & Japan
  2. Beginning to learn Japanese
  3. 日本語文法 - Google ブックス

[Just For Fun] おまけ Bonus Materials

  1. Free Japanese Kanji Translation * JapaName *
  2. Rum and Monkey: The Name Generator Generator
  3. 日本語学マンガ
  4. Nihongo
  5. 感覚!「楽しむ漢字」の辞典
  6. ことわざデータバンク
  7. ユーモア誤用
  8. Funny Japanese mistakes - Japan Forums
  9. 擬音語擬態語 - 日本語を楽しもう! -
  10. Japanese: Vocabulary Guide | 日本語: ボキャブラリーガイド

[Unedited] 未編集備忘録 Transient stock/ Memorandum

  1. NHK高校講座 | ライブラリー
  2. JapanSoc - #1 Social Bookmarking Site for Japan
  3. 小説の書き方・リンク集
  4. 日本語俗語辞書 - 若者言葉新語死語流行語
  5. わかりやすい技術文章の書き方

(Information)

  1. Learning Japanese - Japan Forums
  2. The Japanese Page | TheJapanesePage.com
  3. How to write Japanese precisely

語学学習サイト個人的リンクメモ / Lists of Language Learning Links)

http://anond.hatelabo.jp/20090101193230

2008-10-20

Tube8とRedTubeのプレイヤを最大化するuser js書いた

http://anond.hatelabo.jp/20080921012956 のほぼコピペ

何も考えず巨大化してるのでメニューとか見えなくなりますあしからず

動画プレイヤーを最大化する需要は他のサイトにおいても存在するし繰り返しは悪なのでスクリプトを汎用化してwedataあたりにおいてあるプレイヤー定義ひっぱってくるようにしたらいいんじゃないかと思ったがまあそれはそのうち。

Tube8用:

//tube8widen.js
(function() {
	if(!document.location.href.match(/http:\/\/www\.tube8\.com\/.+\/\d+/))
		return;
	var do_resize=function(player) {
		player.style.position='absolute'
		player.style.top=0
		player.style.left=0
		player.style.zIndex=10000
		player.style.width=(document.body.offsetWidth-100)+'px';
		player.style.height=''+(player.offsetWidth*0.75)+'px'
	}
	var i_id=setInterval(function() {
		var player=document.getElementById('flvplayer')
		if(!player) return
		player=player.childNodes[0]
		do_resize(player)
		window.onresize=function(){do_resize(player)}
		clearInterval(i_id);
	},100);
})();

redtube用

redtubewiden.js
(function() {
	if(!document.location.href.match(/http:\/\/www\.redtube\.com\/\d+/))
		return;
	var do_resize=function(player) {
		player.style.position='absolute'
		player.style.top=0
		player.style.left=0
		player.style.zIndex=10000
		player.style.width=(document.body.offsetWidth-20)+'px';
		player.style.height=''+(player.offsetWidth*0.75)+'px'
	}
	var i_id=setInterval(function() {
		var player=document.getElementById('redtubeplayer')
		if(!player) return
		do_resize(player)
		window.onresize=function(){do_resize(player)}
		clearInterval(i_id);
	},100);
})();

2008-09-21

Yourfilehostのプレイヤーを最大化するuser js書いた

Operaで動作確認。だいたいどのブラウザでも動くと思う

//yourfilehost_player_widen.js
(function() {
	if(document.location.href.indexOf('http://www.yourfilehost.com/media.php?')!=0)
		return;
	var do_resize=function(player) {
		player.style.position='absolute'
		player.style.top=0
		player.style.left=0
		player.style.zIndex=10000
		player.style.width=document.body.offsetWidth;
		player.style.height=''+(player.offsetWidth*0.75)+'px'
	}
	var i_id=setInterval(function() {
		var player=document.getElementById('fsDiv')
		if(!player) return
		do_resize(player)
		window.onresize=function(){do_resize(player)}
		clearInterval(i_id);
	},100);
})();

2008-07-07

もん毛スター for firefox

動作未確認。すんげー冗談半分。

// Hatena Monge Star user script
// 2008-07-07
// by masda. (http://anond.hatelabo.jp/20080707043247)

// ==UserScript==
// @name           Hatena Monge Star
// @namespace      http://anond.hatelabo.jp/20080707043247
// @description    Hatena Monge Star
// @include        http://b.hatena.ne.jp/entry/*
// @version        0.3.1
// ==/UserScript==

// deriving from [http://d.hatena.ne.jp/Hamachiya2/20080707/HatenaBlackStar2] ver Firefox
//               [http://f.hatena.ne.jp/hatenacinnamon/20070109001332]
// Thx! and CUTE!


location.href = 'javascript:(' + function() { (function (w) {

	if (typeof(w.Ten) == 'undefined') {
		return;
	}

	HatenaBookmarkMongeStar = new Ten.Class({
		initialize: function(li, entryTitle) {
			var comment = '';
			var tags    = '';
			var commentSpans = Ten.DOM.getElementsByTagAndClassName('span', 'comment', li);
			if (commentSpans.length > 0) {
				comment = Ten.DOM.scrapeText(commentSpans[0]);
			}

	        var tagsSpans = Ten.DOM.getElementsByTagAndClassName('span', 'user-tag', li);
			if (tagsSpans.length > 0) {
				$A(tagsSpans[0].getElementsByTagName('a')).each(function(a) {
					tags += '[' + Ten.DOM.scrapeText(a)+ ']';
				});
			}

			var title = tags + comment;
			if (title.length == 0) {
				var name = Ten.DOM.scrapeText(li.getElementsByTagName('a')[1]);
				title = name + 'のブックマーク';
	        }

			// this.uri   = 'http://b.hatena.ne.jp/keyword/' + li.getElementsByTagName('a')[1].href;
			var u = li.getElementsByTagName('a')[1].href;

			if (u.indexOf('#') == -1) {
				this.uri = u + '#_HatenaMongeStar';
			} else {
				this.uri = u + '_HatenaMongeStar';
			}

			this.title = title + ' - ' + entryTitle;

			this.comment_container = Hatena.Star.EntryLoader.createCommentContainer();
			var target = commentSpans[0] || li;
			target.appendChild(this.comment_container);

			this.star_container = Hatena.Star.EntryLoader.createStarContainer();
			this.star_container.className = 'hatena-star-star-container MongeStarContainer';
			target.appendChild(this.star_container);
		}
	});


	var tryCount = 0;
	var tryMax = 300;
	function waitForHatenaStar() {
//		if (Hatena.Star.EntryLoader.loaded) {
//			Hatena.Star.EntryLoader.loaded = false;
		var s = document.getElementsByClassName('hatena-star-add-button');
		if (s.length) {

			Hatena.Star.EntryLoader.loaded = false;

			Hatena.Star.EntryLoader.loadEntries = function() {
				var entries = [];
				var title = Ten.DOM.scrapeText(Ten.DOM.getElementsByTagAndClassName('span', 'title', document.body)[0]);
				var ul = document.getElementById('bookmarked_user');
				if (ul) {
					$A(ul.getElementsByTagName('li')).each(function(li) {
						if (li.className != 'more') {
							entries.push(new HatenaBookmarkMongeStar(li, title));
						}
					});
				}
				return entries;
			}
			new Hatena.Star.EntryLoader();

		} else {
			if (++tryCount > tryMax) {
				setTimeout(waitForHatenaStar, 400);
			}
		}
	}

	setTimeout(waitForHatenaStar, 500);

})(window); }.toString() + ')()';



GM_addStyle(<><![CDATA[

	.MongeStarContainer {
		margin-left: 4px;
	}

	.MongeStarContainer .hatena-star-add-button {
		background-color: #fc6 ! important;
	}

	.MongeStarContainer a {
		text-decoration: none ! important;
		color: #f80 ! important;
		font-size: 10px;
		position: relative;
	}

	.MongeStarContainer a:before {
		content: '毛';
		font-size:small;
	}

	.MongeStarContainer a .hatena-star-star {
		filter: alpha(opacity=00);
		-moz-opacity:0.00;
		opacity:0.00;

		position: absolute;
		top: 0;
		left: 0;
	}

	.MongeStarContainer .hatena-star-inner-count {
		color: #f90 ! important;
	}

]]></>);

動いたらいいな-

2008-06-06

ちょとsYレならんしょこれは・・?

<ul id="menu">
	<li><a href="#">だらだら</a></li>
	<li><a href="#">だらだら</a></li>
	<li><a href="#">だらだら</a><ul><li>だらだら</li><li>だらだらだらだらだらだら</ul></li>
	<li><a href="#">ゆっくり</a><ul><li>していってね!</li></ul></li>
</ul>

こんな感じのリスト

#menu li{
	display:block;
	float:left;
	margin-left:0;
	padding-left:0;
	margin-right:1em;
	border:1px dashed red;
}
#menu li ul{
	position:absolute;
	display:block;
	margin-left:0;
	padding-left:0;
	border:1px dashed black;
}
#menu li li{
	list-style:none;
	border:0 none;
	float:none;
	width:auto;
}

こんな感じのスタイル書いて

window.onload=function(){
	var li=document.getElementById("menu").childNodes;
	for(var i=0;i<li.length;i++){
		if(li[i].childNodes[1]){
			var submenu=li[i].childNodes[1];
			li[i].onmouseover=function(){
				this.childNodes[1].style.display="block";
			}
			li[i].onmouseout=function(){
				this.childNodes[1].style.display="none";
			}
		}
	}
};

みたいなスクリプト書いたときのIEの挙動がおかしい!助けて!

2008-04-26

5/25例大祭チェックリス

http://www.reitaisai.com/5th/circle_list/a.html

めんどいので知ってるところだけ抽出。見落としは多分にある

配置 サークル 作者 委託その他

優先度大

ほ08a 天界潜伏 御巫 彪
い29b かるーあみる とと ねみぎ くろがね堂
へ06a ABSOLUTE EXTEND 天瀬りむ
る26a winter scenery 神無月羽兎
れ24b りとる・ずぅ キョケ=カー
ほ02b すたじお寿司くいねえ 琴島もとき

優先度中

い02a PERSONAL COLOR 桜庭友紀 きつねとぶどう「天恥我人」
い05b DPS奴隷 もんじ
い13a Ricenady vs 少女頭巾 榊原薫奈緒子・鳩麦月々
い17b 夢見ごごち 御影 獏
い21b CHRONOLOG 桜沢いづみ
い23b ヘタレシューター 高階@聖人
い27b くらっしゅハウス 比良坂真琴
い28a こおりあめ 氷雨げんた
い30a pixel phantom 榎宮祐
い33a Dr.VERMILION ペテン
い33b ホットドックチャック ひらふ 紫×香霖堂の三作品総集編
い36a 疲労熊 綾見ちは
い37a うつらうららか えれっと
い38b まるちらダイオキシン 大沖
い39b LETRA 滝太郎
か02a 石切 両神 変態合同誌
か03a 偶民養殖 鈴鳴堂
か05b sssの給湯室 舞人
か15a ロクカワ ろく
か26a 精神電波SOS くらんけ ニトリプラスVSアトリエ輝夜
そ14b しましまおぱんちゅ にくばなれ
そ16b 蓮華 乾 ぬい
そ22a 魚肉 夢生場
そ25a ねき亭 NEKI←
た01a オムチキン 久林丼
た08a お澄ましなめこ 無礼るなぉ
た14b Golden Pe Done 枡狐
た25b たこ焼き たこ焼き
ち01a サークルT&K あどべんちゃら
つ01a happy flame time 春夏アキト
つ06a 武士的魂 御月ユウヤ
つ16b 柳暗花明 電波カオス東方花桜萃9×5」
に03b 有言実行 太陰
に08b MxM-Factory 水無月あくあ
に23ab ANGEL TYPE 猫描・ネジキリオ
ぬ05b 世は並べて事も無し 一代大佐
ぬ11a 黒夜葬 刹那
は21a あるばとろす 弐駆緒
へ01b ACID CLUB nagare
へ12b 面舵いっぱいいっぱい けーひろ
へ15a NURSERYTALE 山根真人
ほ02a 高級割箸専門店(オレガノチキン) 待宵 トリコロ同人とか描いてる人
ほ12a もちき鮮魚 もちき
ほ14b 表参道まわりみち 静流 総集編っぽい落としたらしい。案の定
よ03b チンチンリーチ 田川げんご
よ07a 技-WAZA- G0ddamn
よ18b いち小屋 はまー、ふたみやよい
よ19b カゲ路 影吉郎
り07b みずまんじゅう 緋瀬らい
ろ08a 瀬田 七崎鈴音
ろ19b 陰陽龍 タカ ペン入れしてない漫画
ろ20a らいでんらぼ らいでん
わ27a しめさばダイナミック 和泉椎菜
22b 黒錦 尊治

優先度小

い26a ノヘッパDo! あらたとしひら 新刊無し
を28b 負け組クラブ ゼファー 新刊無し.佐倉2號の同人を委託(どうでもいい)
そ19a 永魂庵 富樫悠
り16b 楓の葉 森乃葉りふ
れ02a 以絵会友 六合ダイス
れ07a TACO Sw
れ10b エントゲーゲン クレセント
に01b 隠蔽系排他否定和13 よすどん
れ20b 貧困貧 いしだて
り28b わすれな部屋 あゆみとおる
ぬ28b カタミチキップ 御影石材
い37b FLIPFLOPs ぎんこ
い15a あみだ 佐野さのこ
い29a さくSaku亭 氷川翔
れ04a ふすま喫茶 水中花火
わ01b Flip×Flop 朱乃月夜
を01a ヘルメットが直せません 大出長介
へ18b Ortho-Para ねこいた
つ12b 草を食む羊の目
そ01a VISIONNERZ 宮本龍一
い28b アンニュイ赤蛸 たこ 委託はどう見積もっても一ヶ月はかかる
い35a いよかん。 ほた。 物語 予約で手に入れた方が確実
い35b 貴様それでも人間か!! たの 物語 予約で手に入れた方が確実
い34a みずたたき 水炊き
い39a One Night Stand 牛木義隆
た25a 逃げられない! ちゃば
よ08a れいてぃ屋 レイぽそ
り22a 悠久機関車 十夜
る22a ふあん亭 フラリ、米泥棒
わ23a REGAL-DLESS Repair

2007-07-19

/* Ten */
if (typeof(Ten) == 'undefined') {
    Ten = {};
}
Ten.NAME = 'Ten';
Ten.VERSION = 0.06;

/* Ten.Class */
Ten.Class = function(klass, prototype) {
    if (klass && klass.initialize) {
	var c = klass.initialize;
    } else if(klass && klass.base) {
        var c = function() { return klass.base[0].apply(this, arguments) };
    } else {
	var c = function() {};
    }
    c.prototype = prototype || {};
    c.prototype.constructor = c;
    Ten.Class.inherit(c, klass);
    if (klass && klass.base) {
        for (var i = 0;  i < klass.base.length; i++) {
	    var parent = klass.base[i];
            if (i == 0) {
                c.SUPER = parent;
                c.prototype.SUPER = parent.prototype;
            }
            Ten.Class.inherit(c, parent);
            Ten.Class.inherit(c.prototype, parent.prototype);
        }
    }
    return c;
}
Ten.Class.inherit = function(child,parent) {
    for (var prop in parent) {
        if (typeof(child[prop]) != 'undefined' || prop == 'initialize') continue;
        child[prop] = parent[prop];
    }
}

/*
// Basic Ten Classes
**/

/* Ten.JSONP */
Ten.JSONP = new Ten.Class({
    initialize: function(uri,obj,method) {
        if (Ten.JSONP.Callbacks.length) {
            setTimeout(function() {new Ten.JSONP(uri,obj,method)}, 500);
            return;
        }
        var del = uri.match(/\?/) ? '&' : '?';
        uri += del + 'callback=Ten.JSONP.callback';
        if (!uri.match(/timestamp=/)) {
            uri += '&' + encodeURI(new Date());
        }
        if (obj && method) Ten.JSONP.addCallback(obj,method);
        this.script = document.createElement('script');
        this.script.src = uri;
        this.script.type = 'text/javascript';
        document.getElementsByTagName('head')[0].appendChild(this.script);
    },
    addCallback: function(obj,method) {
        Ten.JSONP.Callbacks.push({object: obj, method: method});
    },
    callback: function(args) {
        // alert('callback called');
        var cbs = Ten.JSONP.Callbacks;
        for (var i = 0; i < cbs.length; i++) {
            var cb = cbs[i];
            cb.object[cb.method].call(cb.object, args);
        }
        Ten.JSONP.Callbacks = [];
    },
    MaxBytes: 8000,
    Callbacks: []
});

/* Ten.XHR */
Ten.XHR = new Ten.Class({
    initialize: function(uri,opts,obj,method) {
        if (!uri) return;
        this.request = Ten.XHR.getXMLHttpRequest();
        this.callback = {object: obj, method: method};
        var xhr = this;
        var prc = this.processReqChange;
        this.request.onreadystatechange = function() {
            prc.apply(xhr, arguments);
        }
        var method = opts.method || 'GET';
        this.request.open(method, uri, true);
        if (method == 'POST') {
            this.request.setRequestHeader('Content-Type',
                                          'application/x-www-form-urlencoded');
        }
        var data = opts.data ? Ten.XHR.makePostData(opts.data) : null;
        this.request.send(data);
    },
    getXMLHttpRequest: function() {
        var xhr;
        var tryThese = [
            function () { return new XMLHttpRequest(); },
            function () { return new ActiveXObject('Msxml2.XMLHTTP'); },
            function () { return new ActiveXObject('Microsoft.XMLHTTP'); },
            function () { return new ActiveXObject('Msxml2.XMLHTTP.4.0'); },
        ];
        for (var i = 0; i < tryThese.length; i++) {
            var func = tryThese[i];
            try {
                xhr = func;
                return func();
            } catch (e) {
                //alert(e);
            }
        }
        return xhr;
    },
    makePostData: function(data) {
        var pairs = [];
        var regexp = /%20/g;
        for (var k in data) {
            var v = data[k].toString();
            var pair = encodeURIComponent(k).replace(regexp,'+') + '=' +
                encodeURIComponent(v).replace(regexp,'+');
            pairs.push(pair);
        }
        return pairs.join('&');
    }
},{
    processReqChange: function() {
        var req = this.request;
        if (req.readyState == 4) {
            if (req.status == 200) {
                var cb = this.callback;
                cb.object[cb.method].call(cb.object, req);
            } else {
                alert("There was a problem retrieving the XML data:\n" +
                      req.statusText);
            }
        }
    }
});

/* Ten.Observer */
Ten.Observer = new Ten.Class({
    initialize: function(element,event,obj,method) {
        var func = obj;
        if (typeof(method) == 'string') {
            func = obj[method];
        }
        this.element = element;
        this.event = event;
        this.listener = function(event) {
            return func.call(obj, new Ten.Event(event || window.event));
        }
        if (this.element.addEventListener) {
            if (this.event.match(/^on(.+)$/)) {
                this.event = RegExp.$1;
            }
            this.element.addEventListener(this.event, this.listener, false);
        } else if (this.element.attachEvent) {
            this.element.attachEvent(this.event, this.listener);
        }
    }
},{
    stop: function() {
        if (this.element.removeEventListener) {
            this.element.removeEventListener(this.event,this.listener,false);
        } else if (this.element.detachEvent) {
            this.element.detachEvent(this.event,this.listener);
        }
    }
});

/* Ten.Event */
Ten.Event = new Ten.Class({
    initialize: function(event) {
        this.event = event;
    },
    keyMap: {
        8:"backspace", 9:"tab", 13:"enter", 19:"pause", 27:"escape", 32:"space",
        33:"pageup", 34:"pagedown", 35:"end", 36:"home", 37:"left", 38:"up",
        39:"right", 40:"down", 44:"printscreen", 45:"insert", 46:"delete",
        112:"f1", 113:"f2", 114:"f3", 115:"f4", 116:"f5", 117:"f6", 118:"f7",
        119:"f8", 120:"f9", 121:"f10", 122:"f11", 123:"f12",
        144:"numlock", 145:"scrolllock"
    }
},{
    mousePosition: function() {
        if (!this.event.clientX) return;
        return Ten.Geometry.getMousePosition(this.event);
    },
    isKey: function(name) {
        var ecode = this.event.keyCode;
        if (!ecode) return;
        var ename = Ten.Event.keyMap[ecode];
        if (!ename) return;
        return (ename == name);
    },
    targetIsFormElements: function() {
        var target = this.event.target;
        if (!target) return;
        var T = (target.tagName || '').toUpperCase();
        return (T == 'INPUT' || T == 'SELECT' || T == 'OPTION' ||
                T == 'BUTTON' || T == 'TEXTAREA');
    },
    stop: function() {
        var e = this.event;
        if (e.stopPropagation) {
            e.stopPropagation();
            e.preventDefault();
        } else {
            e.cancelBubble = true;
            e.returnValue = false;
        }
    }
});

/* Ten.DOM */
Ten.DOM = new Ten.Class({
    getElementsByTagAndClassName: function(tagName, className, parent) {
        if (typeof(parent) == 'undefined') {
            parent = document;
        }
        var children = parent.getElementsByTagName(tagName);
        if (className) { 
            var elements = [];
            for (var i = 0; i < children.length; i++) {
                var child = children[i];
                var cls = child.className;
                if (!cls) {
                    continue;
                }
                var classNames = cls.split(' ');
                for (var j = 0; j < classNames.length; j++) {
                    if (classNames[j] == className) {
                        elements.push(child);
                        break;
                    }
                }
            }
            return elements;
        } else {
            return children;
        }
    },
    removeEmptyTextNodes: function(element) {
        var nodes = element.childNodes;
        for (var i = 0; i < nodes.length; i++) {
            var node = nodes[i];
            if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) {
                node.parentNode.removeChild(node);
            }
        }
    },
    nextElement: function(elem) {
        do {
            elem = elem.nextSibling;
        } while (elem && elem.nodeType != 1);
        return elem;
    },
    prevElement: function(elem) {
        do {
            elem = elem.previousSibling;
        } while (elem && elem.nodeType != 1);
        return elem;
    },
    scrapeText: function(node) {
        var rval = [];
        (function (node) {
            var cn = node.childNodes;
            if (cn) {
                for (var i = 0; i < cn.length; i++) {
                    arguments.callee.call(this, cn[i]);
                }
            }
            var nodeValue = node.nodeValue;
            if (typeof(nodeValue) == 'string') {
                rval.push(nodeValue);
            }
        })(node);
        return rval.join('');
    },
    onLoadFunctions: [],
    loaded: false,
    timer: null,
    addEventListener: function(event,func) {
        if (event != 'load') return;
        Ten.DOM.onLoadFunctions.push(func);
        Ten.DOM.checkLoaded();
    },
    checkLoaded: function() {
        var c = Ten.DOM;
        if (c.loaded) return true;
        if (document && document.getElementsByTagName &&
            document.getElementById && document.body) {
            if (c.timer) {
                clearInterval(c.timer);
                c.timer = null;
            }
            for (var i = 0; i < c.onLoadFunctions.length; i++) {
                    c.onLoadFunctions[i]();
            }
            c.onLoadFunctions = [];
            c.loaded = true;
        } else {
            c.timer = setInterval(c.checkLoaded, 13);
        }
    }
});

/* Ten.Style */
Ten.Style = new Ten.Class({
    applyStyle: function(elem, style) {
        for (prop in style) {
            elem.style[prop] = style[prop];
        }
    }
});

/* Ten.Geometry */
Ten.Geometry = new Ten.Class({
    initialize: function() {
        if (Ten.Geometry._initialized) return;
        var func = Ten.Geometry._functions;
        var de = document.documentElement;
        if (window.innerWidth) {
            func.getWindowWidth = function() { return window.innerWidth; }
            func.getWindowHeight = function() { return window.innerHeight; }
            func.getXScroll = function() { return window.pageXOffset; }
            func.getYScroll = function() { return window.pageYOffset; }
        } else if (de && de.clientWidth) {
            func.getWindowWidth = function() { return de.clientWidth; }
            func.getWindowHeight = function() { return de.clientHeight; }
            func.getXScroll = function() { return de.scrollLeft; }
            func.getYScroll = function() { return de.scrollTop; }
        } else if (document.body.clientWidth) {
            func.getWindowWidth = function() { return document.body.clientWidth; }
            func.getWindowHeight = function() { return document.body.clientHeight; }
            func.getXScroll = function() { return document.body.scrollLeft; }
            func.getYScroll = function() { return document.body.scrollTop; }
        }
        Ten.Geometry._initialized = true;
    },
    _initialized: false,
    _functions: {},
    getScroll: function() {
        if (!Ten.Geometry._initialized) new Ten.Geometry;
        return {
            x: Ten.Geometry._functions.getXScroll(),
            y: Ten.Geometry._functions.getYScroll()
        };
    },
    getMousePosition: function(pos) {
        // pos should have clientX, clientY same as mouse event
        if ((navigator.userAgent.indexOf('Safari') > -1) &&
            (navigator.userAgent.indexOf('Version/') < 0)) {
            return {
                x: pos.clientX,
                y: pos.clientY
            };
        } else {
            var scroll = Ten.Geometry.getScroll();
            return {
                x: pos.clientX + scroll.x,
                y: pos.clientY + scroll.y
            };
        }
    },
    getElementPosition: function(e) {
        return {
            x: e.offsetLeft,
            y: e.offsetTop
        };
    },
    getWindowSize: function() {
        if (!Ten.Geometry._initialized) new Ten.Geometry;
        return {
            w: Ten.Geometry._functions.getWindowWidth(),
            h: Ten.Geometry._functions.getWindowHeight()
        };
    }
});

/* Ten.Position */
Ten.Position = new Ten.Class({
    initialize: function(x,y) {
        this.x = x;
        this.y = y;
    },
    subtract: function(a,b) {
        return new Ten.Position(a.x - b.x, a.y - b.y);
    }
});

/*
// require Ten.js
**/

/* Ten.SubWindow */
Ten.SubWindow = new Ten.Class({
    initialize: function() {
        var c = this.constructor;
        if (c.singleton && c._cache) {
            return c._cache;
        }
        var div = document.createElement('div');
        Ten.Style.applyStyle(div, Ten.SubWindow._baseStyle);
        Ten.Style.applyStyle(div, c.style);
        this.window = div;
        this.addContainerAndCloseButton();
        document.body.appendChild(div);
        if (c.draggable) {
            this._draggable = new Ten.Draggable(div, this.handle);
        }
        if (c.singleton) c._cache = this;
        return this;
    },
    _baseStyle: {
        color: '#000',
        position: 'absolute',
        display: 'none',
        zIndex: 2,
        left: 0,
        top: 0,
        backgroundColor: '#fff',
        border: '1px solid #bbb'
    },
    style: {
        padding: '2px',
        textAlign: 'center',
        borderRadius: '6px',
        MozBorderRadius: '6px',
        width: '100px',
        height: '100px'
    },
    handleStyle: {
        position: 'absolute',
        top: '0px',
        left: '0px',
        backgroundColor: '#f3f3f3',
        borderBottom: '1px solid #bbb',
        width: '100%',
        height: '30px'
    },
    containerStyle: {
        margin: '32px 0 0 0',
        padding: '0 10px'
    },
    // closeButton: 'close.gif',
    closeButton: 'http://s.hatena.com/images/close.gif',
    closeButtonStyle: {
        position: 'absolute',
        top: '8px',
        right: '10px',
        cursor: 'pointer'
    },
    _baseScreenStyle: {
        position: 'absolute',
        top: '0px',
        left: '0px',
        display: 'none',
        zIndex: 1,
        overflow: 'hidden',
        width: '100%',
        height: '100%'
    },
    screenStyle: {},
    showScreen: true,
    singleton: true,
    draggable: true,
    _cache: null
},{
    screen: null,
    windowObserver: null,
    visible: false,
    addContainerAndCloseButton: function() {
        var win = this.window;
        var c = this.constructor;
        var div = document.createElement('div');
        win.appendChild(div);
        Ten.Style.applyStyle(div, c.containerStyle);
        this.container = div;
        if (c.handleStyle) {
            var handle = document.createElement('div');
            Ten.Style.applyStyle(handle, c.handleStyle);
            win.appendChild(handle);
            this.handle = handle;
        }
        if (c.closeButton) {
	    var btn = document.createElement('img');
            btn.src = c.closeButton;
            btn.alt = 'close';
            Ten.Style.applyStyle(btn, c.closeButtonStyle);
            win.appendChild(btn);
            new Ten.Observer(btn, 'onclick', this, 'hide');
            this.closeButton = btn;
        }
        if (c.showScreen) {
            var screen = document.createElement('div');
            Ten.Style.applyStyle(screen, Ten.SubWindow._baseScreenStyle);
            Ten.Style.applyStyle(screen, c.screenStyle);
            document.body.appendChild(screen);
            this.screen = screen;
            new Ten.Observer(screen, 'onclick', this, 'hide');
        }
    },
    show: function(pos) {
        pos = (pos.x && pos.y) ? pos : {x:0, y:0};
        with (this.window.style) {
            display = 'block';
            left = pos.x + 'px';
            top = pos.y + 'px';
        }
        if (this.screen) {
            with (this.screen.style) {
                display = 'block';
                left = Ten.Geometry.getScroll().x + 'px';
                top = Ten.Geometry.getScroll().y + 'px';
            }
        }
        this.windowObserver = new Ten.Observer(document.body, 'onkeypress', this, 'handleEscape');
        this.visible = true;
    },
    handleEscape: function(e) {
        if (!e.isKey('escape')) return;
        this.hide();
    },
    hide: function() {
        if (this._draggable) this._draggable.endDrag();
        this.window.style.display = 'none';
        if (this.screen) this.screen.style.display = 'none';
        if (this.windowObserver) this.windowObserver.stop();
        this.visible = false;
    }
});

/* Ten.Draggable */
Ten.Draggable = new Ten.Class({
    initialize: function(element,handle) {
        this.element = element;
        this.handle = handle || element;
        this.startObserver = new Ten.Observer(this.handle, 'onmousedown', this, 'startDrag');
        this.handlers = [];
    }
},{
    startDrag: function(e) {
        if (e.targetIsFormElements()) return;
        this.delta = Ten.Position.subtract(
            e.mousePosition(),
            Ten.Geometry.getElementPosition(this.element)
        );
        this.handlers = [
            new Ten.Observer(document, 'onmousemove', this, 'drag'),
            new Ten.Observer(document, 'onmouseup', this, 'endDrag'),
            new Ten.Observer(this.element, 'onlosecapture', this, 'endDrag')
        ];
        e.stop();
    },
    drag: function(e) {
        var pos = Ten.Position.subtract(e.mousePosition(), this.delta);
        Ten.Style.applyStyle(this.element, {
            left: pos.x + 'px',
            top: pos.y + 'px'
        });
        e.stop();
    },
    endDrag: function(e) {
        for (var i = 0; i < this.handlers.length; i++) {
            this.handlers[i].stop();
        }
        if(e) e.stop();
    }
});

/* Hatena */
if (typeof(Hatena) == 'undefined') {
    Hatena = {};
}

/* Hatena.User */
Hatena.User = new Ten.Class({
    initialize: function(name) {
        this.name = name;
    },
    getProfileIcon: function(name) {
        if (!name) name = 'user';
        var pre = name.match(/^[\w-]{2}/)[0];
        var img = document.createElement('img');
        img.src = 'http://www.hatena.ne.jp/users/' + pre + '/' + name + '/profile_s.gif';
        img.alt = name;
        img.setAttribute('class', 'profile-icon');
        img.setAttribute('width','16px');
        img.setAttribute('height','16px');
        with (img.style) {
            margin = '0 3px';
            border = 'none';
            verticalAlign = 'middle';
        }
        return img;
    }
}, {
    profileIcon: function() {
        return Hatena.User.getProfileIcon(this.name);
    }
});

/* Hatena.Star */
if (typeof(Hatena.Star) == 'undefined') {
    Hatena.Star = {};
}

/*
// Hatena.Star.* classes //
**/
if (window.location && window.location.host.match(/hatena\.com/)) {
    Hatena.Star.BaseURL = 'http://s.hatena.com/';
} else {
    Hatena.Star.BaseURL = 'http://s.hatena.ne.jp/';
}
Hatena.Star.Token = null;

/* Hatena.Star.User */
Hatena.Star.User = new Ten.Class({
    base: [Hatena.User],
    initialize: function(name) {
        if (Hatena.Star.User._cache[name]) {
            return Hatena.Star.User._cache[name];
        } else {
            this.name = name;
            Hatena.Star.User._cache[name] = this;
            return this;
        }
    },
    _cache: {}
},{
    userPage: function() {
        return Hatena.Star.BaseURL + this.name + '/';
    }
});

/* Hatena.Star.Entry */
Hatena.Star.Entry = new Ten.Class({
    initialize: function(e) {
        this.entry = e;
        this.uri = e.uri;
        this.title = e.title;
        this.star_container = e.star_container;
        this.comment_container = e.comment_container;
        this.stars = [];
        this.comments = [];
    },
    maxStarCount: 11
},{
    flushStars: function() {
        this.stars = [];
        this.star_container.innerHTML = '';
    },
    bindStarEntry: function(se) {
        this.starEntry = se;
        for (var i = 0; i < se.stars.length; i++) {
            if (typeof(se.stars[i]) == 'number') {
                this.stars.push(new Hatena.Star.InnerCount(se.stars[i],this));
            } else {
                this.stars.push(new Hatena.Star.Star(se.stars[i]));
            }
        }
        if (se.comments && !this.comments.length) {
            for (var i = 0; i < se.comments.length; i++) {
                this.comments.push(new Hatena.Star.Comment(se.comments[i]));
            }
        }
        this.can_comment = se.can_comment;
    },
    setCanComment: function(v) {
        this.can_comment = v;
    },
    showButtons: function() {
        this.addAddButton();
        this.addCommentButton();
    },
    addAddButton: function() {
        if (this.star_container) {
            this.addButton = new Hatena.Star.AddButton(this);
            this.star_container.appendChild(this.addButton);
        }
    },
    addCommentButton: function() {
        if (this.comment_container) {
            this.commentButton = new Hatena.Star.CommentButton(this);
            this.comment_container.appendChild(this.commentButton.img);
        }
    },
    showStars: function() {
        var klass = this.constructor;
        // if (this.stars.length > klass.maxStarCount) {
        //     var ic = new Hatena.Star.InnerCount(this.stars.slice(1,this.stars.length));
        //     this.star_container.appendChild(this.stars[0]);
        //     this.star_container.appendChild(ic);
        //     this.star_container.appendChild(this.stars[this.stars.length - 1]);
        // } else {
        for (var i = 0; i < this.stars.length; i++) {
            this.star_container.appendChild(this.stars[i]);
        }
    },
    showCommentButton: function() {
        if (this.can_comment) {
            this.commentButton.show();
            if (this.comments.length) this.commentButton.activate();
        } else {
            // this.commentButton.hide();
        }
    },
    addStar: function(star) {
        this.stars.push(star);
        this.star_container.appendChild(star);
    },
    addComment: function(com) {
        if (!this.comments) this.comments = [];
        if (this.comments.length == 0) {
            this.commentButton.activate();
        }
        this.comments.push(com);
    },
    showCommentCount: function() {
        this.comment_container.innerHTML += this.comments.length;
    }
});

/* Hatena.Star.Button */
Hatena.Star.Button = new Ten.Class({
    createButton: function(args) {
        var img = document.createElement('img');
        img.src = args.src;
        img.alt = img.title = args.alt;
        with (img.style) {
	    cursor = 'pointer';
	    margin = '0 3px';
            padding = '0';
            border = 'none';
            verticalAlign = 'middle';
        }
        return img;
    }
});

/* Hatena.Star.AddButton */
Hatena.Star.AddButton = new Ten.Class({
    base: ['Hatena.Star.Button'],
    initialize: function(entry) {
        this.entry = entry;
        this.lastPosition = null;
        var img = Hatena.Star.Button.createButton({
            src: Hatena.Star.AddButton.ImgSrc,
            alt: 'Add Star'
        });
        this.observer = new Ten.Observer(img,'onclick',this,'addStar');
        this.img = img;
        return img;
    },
    ImgSrc: Hatena.Star.BaseURL + 'images/add.gif'
},{
    addStar: function(e) {
        this.lastPosition = e.mousePosition();
        var uri = Hatena.Star.BaseURL + 'star.add.json?uri=' + encodeURIComponent(this.entry.uri) +
            '&title=' + encodeURIComponent(this.entry.title);
        if (Hatena.Star.Token) {
            uri += '&token=' + Hatena.Star.Token;
        }
        new Ten.JSONP(uri, this, 'receiveResult');
    },
    receiveResult: function(args) {
        var name = args ? args.name : null;
        if (name) {
            this.entry.addStar(new Hatena.Star.Star({name: name}));
            //alert('Succeeded in Adding Star ' + args);
        } else if (args.errors) {
            var pos = this.lastPosition;
            pos.x -= 10;
            pos.y += 25;
            var scroll = Ten.Geometry.getScroll();
            var scr = new Hatena.Star.AlertScreen();
            var alert = args.errors[0];
            scr.showAlert(alert, pos);
        }
    }
});

/* Hatena.Star.CommentButton */
Hatena.Star.CommentButton = new Ten.Class({
    base: ['Hatena.Star.Button'],
    initialize: function(entry) {
        this.entry = entry;
        this.lastPosition = null;
        var img = Hatena.Star.Button.createButton({
            src: Hatena.Star.CommentButton.ImgSrc,
            alt: 'Comments'
        });
        img.style.display = 'none';
        this.observer = new Ten.Observer(img,'onclick',this,'showComments');
        this.img = img;
    },
    ImgSrc: Hatena.Star.BaseURL + 'images/comment.gif',
    ImgSrcActive: Hatena.Star.BaseURL + 'images/comment_active.gif'
},{
    showComments: function(e) {
        if (!this.screen) this.screen = new Hatena.Star.CommentScreen();
        this.screen.bindEntry(this.entry);
        var pos = e.mousePosition();
        pos.y += 25;
        this.screen.showComments(this.entry, pos);
    },
    hide: function() {
        this.img.style.display = 'none';
    },
    show: function() {
        this.img.style.display = 'inline';
    },
    activate: function() {
        this.show();
        this.img.src = Hatena.Star.CommentButton.ImgSrcActive;
    }
});

/* Hatena.Star.Star */
Hatena.Star.Star = new Ten.Class({
    initialize: function(args) {
        if (args.img) {
            this.img = args.img;
            this.name = this.img.getAttribute('alt');
        } else {
            this.name = args.name;
            var img = document.createElement('img');
            img.src = Hatena.Star.Star.ImgSrc;
            img.alt = this.name;
            with (img.style) {
                padding = '0';
                border = 'none';
            }
            this.img = img;
        }
	new Ten.Observer(this.img,'onmouseover',this,'showName');
	new Ten.Observer(this.img,'onmouseout',this,'hideName');
	if (this.name) {
            this.user = new Hatena.Star.User(this.name);
            this.img.style.cursor = 'pointer';
            new Ten.Observer(this.img,'onclick',this,'goToUserPage');
        }
        if (args.count && args.count > 1) {
            var c = document.createElement('span');
            c.setAttribute('class', 'hatena-star-inner-count');
            Ten.Style.applyStyle(c, Hatena.Star.InnerCount.style);
            c.innerHTML = args.count;
            var s = document.createElement('span');
            s.appendChild(img);
            s.appendChild(c);
            return s;
        } else {
            return this.img;
        }
    },
    ImgSrc: Hatena.Star.BaseURL + 'images/star.gif'
},{
    showName: function(e) {
        if (!this.screen) this.screen = new Hatena.Star.NameScreen();
        var pos = e.mousePosition();
        pos.x += 10;
        pos.y += 25;
        this.screen.showName(this.name, pos);
    },
    hideName: function() {
        if (!this.screen) return;
        this.screen.hide();
    },
    goToUserPage: function() {
        window.location = this.user.userPage();
    }
});

/* Hatena.Star.InnerCount */
Hatena.Star.InnerCount = new Ten.Class({
    initialize: function(count, e) {
        this.count = count;
        this.entry = e;
        var c = document.createElement('span');
        c.setAttribute('class', 'hatena-star-inner-count');
        Ten.Style.applyStyle(c, Hatena.Star.InnerCount.style);
        c.style.cursor = 'pointer';
        c.innerHTML = count;
        new Ten.Observer(c,'onclick',this,'showInnerStars');
        this.container = c;
        return c;
    },
    style: {
        color: '#f4b128',
        fontWeight: 'bold',
        fontSize: '80%',
        fontFamily: '"arial", sans-serif',
        margin: '0 2px'
    }
},{
    showInnerStars: function() {
        var url = Hatena.Star.BaseURL + 'entry.json?uri=' +
        encodeURIComponent(this.entry.uri);
        new Ten.JSONP(url, this, 'receiveStarEntry');
    },
    receiveStarEntry: function(res) {
        var se = res.entries[0];
        var e = this.entry;
        if (encodeURIComponent(se.uri) != encodeURIComponent(e.uri)) return;
        e.flushStars();
        e.bindStarEntry(se);
        e.addAddButton();
        e.showStars();
    }
});

/* Hatena.Star.Comment */
Hatena.Star.Comment = new Ten.Class({
    initialize: function(args) {
        this.name = args.name;
        this.body = args.body;
    }
},{
    asElement: function() {
        var div = document.createElement('div');
        with (div.style) {
            margin = '0px 0';
            padding = '5px 0';
            borderBottom = '1px solid #ddd';
        }
        var ico = Hatena.User.getProfileIcon(this.name);
        div.appendChild(ico);
        var span = document.createElement('span');
        with(span.style) {
            fontSize = '90%';
        }
        span.innerHTML = this.body;
        div.appendChild(span);
        return div;
    }
});

/* Hatena.Star.NameScreen */
Hatena.Star.NameScreen = new Ten.Class({
    base: [Ten.SubWindow],
    style: {
        padding: '2px',
        textAlign: 'center'
    },
    containerStyle: {
        margin: 0,
        padding: 0
    },
    handleStyle: null,
    showScreen: false,
    closeButton: null,
    draggable: false
},{
    showName: function(name, pos) {
        this.container.innerHTML = '';
        this.container.appendChild(Hatena.User.getProfileIcon(name));
        this.container.appendChild(document.createTextNode(name));
        this.show(pos);
    }
});

/* Hatena.Star.AlertScreen */
Hatena.Star.AlertScreen = new Ten.Class({
    base: [Ten.SubWindow],
    style: {
        padding: '2px',
        textAlign: 'center',
        borderRadius: '6px',
        MozBorderRadius: '6px',
        width: '240px',
        height: '120px'
    },
    handleStyle: {
        position: 'absolute',
        top: '0px',
        left: '0px',
        backgroundColor: '#f3f3f3',
        borderBottom: '1px solid #bbb',
        width: '100%',
        height: '30px',
        borderRadius: '6px 6px 0 0',
        MozBorderRadius: '6px 6px 0 0'
    }
},{
    showAlert: function(msg, pos) {
        this.container.innerHTML = msg;
        var win = Ten.Geometry.getWindowSize();
        var scr = Ten.Geometry.getScroll();
        var w = parseInt(this.constructor.style.width) + 20;
        if (pos.x + w > scr.x + win.w) pos.x = win.w + scr.x - w;
        this.show(pos);
    }
});

/* Hatena.Star.CommentScreen */
Hatena.Star.CommentScreen = new Ten.Class({
    base: [Ten.SubWindow],
    initialize: function() {
        var self = this.constructor.SUPER.call(this);
        if (!self.commentsContainer) self.addCommentsContainer();
        return self;
    },
    style: {
        width: '280px',
        height: '280px',
        overflowY: 'auto',
        padding: '2px',
        textAlign: 'center',
        borderRadius: '6px',
        MozBorderRadius: '6px'
    },
    handleStyle: {
        position: 'absolute',
        top: '0px',
        left: '0px',
        backgroundColor: '#f3f3f3',
        borderBottom: '1px solid #bbb',
        width: '100%',
        height: '30px',
        borderRadius: '6px 6px 0 0',
        MozBorderRadius: '6px 6px 0 0'
    },
    containerStyle: {
        margin: '32px 0 0 0',
        textAlign: 'left',
        padding: '0 10px'
    },
    getLoadImage: function() {
        var img = document.createElement('img');
        img.src = Hatena.Star.BaseURL + 'images/load.gif';
        img.setAttribute('alt', 'Loading');
        with (img.style) {
            verticalAlign = 'middle';
            margin = '0 2px';
        }
        return img;
    }
},{
    addCommentsContainer: function() {
        var div = document.createElement('div');
        with (div.style) {
            marginTop = '-3px';
        }
        this.container.appendChild(div);
        this.commentsContainer = div;
    },
    showComments: function(e, pos) {
        var comments = e.comments;
        if (!comments) comments = [];
        this.commentsContainer.innerHTML = '';
        for (var i=0; i<comments.length; i++) {
            this.commentsContainer.appendChild(comments[i].asElement());
        }
        if (e.starEntry && !e.can_comment) {
            this.hideCommentForm();
        } else {
            this.addCommentForm();
        }
        var win = Ten.Geometry.getWindowSize();
        var scr = Ten.Geometry.getScroll();
        var w = parseInt(this.constructor.style.width) + 20;
        if (pos.x + w > scr.x + win.w) pos.x = win.w + scr.x - w;
        this.show(pos);
    },
    bindEntry: function(e) {
        this.entry = e;
    },
    sendComment: function(e) {
        if (!e.isKey('enter')) return;
        var body = this.commentInput.value;
        if (!body) return;
        this.commentInput.disabled = 'true';
        this.showLoadImage();
        var url = Hatena.Star.BaseURL + 'comment.add.json?body=' + encodeURIComponent(body) +
            '&uri=' + encodeURIComponent(this.entry.uri) +
            '&title=' + encodeURIComponent(this.entry.title);
        new Ten.JSONP(url, this, 'receiveResult');
    },
    receiveResult: function(args) {
        if (!args.name || !args.body) return;
        this.commentInput.value = ''; 
        this.commentInput.disabled = '';
        this.hideLoadImage();
        var com = new Hatena.Star.Comment(args);
        this.entry.addComment(com);
        this.commentsContainer.appendChild(com.asElement());
    },
    showLoadImage: function() {
        if (!this.loadImage) return; 
        this.loadImage.style.display = 'inline';
    },
    hideLoadImage: function() {
        if (!this.loadImage) return; 
        this.loadImage.style.display = 'none';
    },
    hideCommentForm: function() {
        if (!this.commentForm) return;
        this.commentForm.style.display = 'none';
    },
    addCommentForm: function() {
        if (this.commentForm) {
            this.commentForm.style.display = 'block';
            return;
        }
        var form = document.createElement('div');
        this.container.appendChild(form);
        this.commentForm = form;
        with (form.style) {
            margin = '0px 0';
            padding = '5px 0';
            // borderTop = '1px solid #ddd';
        }
        //if (Hatena.Visitor) {
        //    form.appendChild(Hatena.Visitor.profileIcon());
        //} else {
        //    form.appendChild(Hatena.User.getProfileIcon());
        //}
        var input = document.createElement('input');
        input.type = 'text';
        with (input.style) {
            width = '215px';
	    border = '1px solid #bbb';
            padding = '3px';
        }
        form.appendChild(input);
        this.commentInput = input;
        var img = this.constructor.getLoadImage();
        this.loadImage = img;
        this.hideLoadImage();
        form.appendChild(img);
        new Ten.Observer(input,'onkeypress',this,'sendComment');
    }
});

/* Hatena.Star.EntryLoader */
Hatena.Star.EntryLoader = new Ten.Class({
    initialize: function() {
        var entries = Hatena.Star.EntryLoader.loadEntries();
        this.entries = [];
        for (var i = 0; i < entries.length; i++) {
            var e = new Hatena.Star.Entry(entries[i]);
            e.showButtons();
            this.entries.push(e);
        }
        this.getStarEntries();
    },
    createStarContainer: function() {
        var sc = document.createElement('span');
        sc.setAttribute('class', 'hatena-star-star-container');
        sc.style.marginLeft = '1px';
        return sc;
    },
    createCommentContainer: function() {
        var cc = document.createElement('span');
        cc.setAttribute('class', 'hatena-star-comment-container');
        cc.style.marginLeft = '1px';
        return cc;
    },
    scrapeTitle: function(node) {
        var rval = [];
        (function (node) {
            if (node.tagName == 'SPAN' &&
                (node.className == 'sanchor' ||
                 node.className == 'timestamp')) {
                     return;
            } else if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) {
                return;
            }
            var cn = node.childNodes;
            if (cn) {
                for (var i = 0; i < cn.length; i++) {
                    arguments.callee.call(this, cn[i]);
                }
            }
            var nodeValue = node.nodeValue;
            if (typeof(nodeValue) == 'string') {
                rval.push(nodeValue);
            }
        })(node);
        return rval.join('');
    },
    headerTagAndClassName: ['h3',null],
    getHeaders: function() {
        var t = Hatena.Star.EntryLoader.headerTagAndClassName;
        return Ten.DOM.getElementsByTagAndClassName(t[0],t[1],document);
    },
    loadEntries: function() {
        var entries = [];
        //var headers = document.getElementsByTagName('h3');
        var c = Hatena.Star.EntryLoader;
        var headers = c.getHeaders();
        for (var i = 0; i < headers.length; i++) {
            var header = headers[i];
            var a = header.getElementsByTagName('a')[0];
            if (!a) continue;
            var uri = a.href;
            var title = '';
            // Ten.DOM.removeEmptyTextNodes(header);
            var cns = header.childNodes;
            title = c.scrapeTitle(header);
            var cc = c.createCommentContainer();
            header.appendChild(cc);
            var sc = c.createStarContainer();
            header.appendChild(sc);
            entries.push({
                uri: uri,
                title: title,
                star_container: sc,
                comment_container: cc
            });
        }
        return entries;
    }
},{
    getStarEntries: function() {
        var url = Hatena.Star.BaseURL + 'entries.json?';
        for (var i = 0; i < this.entries.length; i++) {
            if (url.length > Ten.JSONP.MaxBytes) {
                new Ten.JSONP(url, this, 'receiveStarEntries');
                url = Hatena.Star.BaseURL + 'entries.json?';
            }
            url += 'uri=' + encodeURIComponent(this.entries[i].uri) + '&';
        }
        new Ten.JSONP(url, this, 'receiveStarEntries');
    },
    receiveStarEntries: function(res) {
        var entries = res.entries;
        if (!entries) entries = [];
        for (var i = 0; i < this.entries.length; i++) {
            var e = this.entries[i];
            for (var j = 0; j < entries.length; j++) {
                var se = entries[j];
                if (!se.uri) continue;
                if (encodeURIComponent(se.uri) == encodeURIComponent(e.uri)) {
                    e.bindStarEntry(se);
                    entries.splice(j,1);
                    break;
                }
            }
            if (typeof(e.can_comment) == 'undefined') {
                e.setCanComment(res.can_comment);
            }
            e.showStars();
            e.showCommentButton();
        }
    }
});

/* Hatena.Star.WindowObserver */
Hatena.Star.WindowObserver = new Ten.Class({
    initialize: funct

  
  
- 転職ならen
- 派遣ならen
 
1ページ中1ページ目を表示(合計:15件)