タグ

JavaScriptとJavascriptに関するmoozのブックマーク (809)

  • 竹取 JS

    画面をダブルクリックで縦書きと横書きを切り替えることができます。要素を指定して縦書きにしている場合は、次回アクセス時に同じ表示が引き継がれます。 どんなサイトでも縦書きにするブックマークレット。 ↓右クリックで「お気に入り」に保存するか、リンクをドラッグしてブックマークバーにドロップします。 「縦書きにする・iPhone 用リンク」 「縦書き可能にする・iPhone 用リンク」 「段組み縦書き可能にする・iPhone 用リンク」 iPhone に登録するには? とりあえずこのページを共有ボタンからブックマーク。 iPhone 用リンク を長押ししてコピー。 ブックマークを開いて、追加したブックマークを「編集」。 名前を「縦書き可能にする」などに変更し、URL 欄に上記コードをペースト。 最初の「http://」を削除。 注意! やや動作が重いです! うまく変換できなかったときは、画面をダブ

    mooz
    mooz 2010/07/05
    縦書き表示
  • TraceMonkey概要 - SumiTomohiko's blog

    この記事は、http://hacks.mozilla.org/2009/07/tracemonkey-overview/の無許可日語訳です。 Firefox 3.5 has a new JavaScript engine, TraceMonkey, that runs many JavaScript programs 3-4x faster than Firefox 3, speeding up existing web apps and enabling new ones. This article gives a peek under the hood at the major parts of TraceMonkey and how they speed up JS. This will also explain what kinds of programs get the bes

    TraceMonkey概要 - SumiTomohiko's blog
    mooz
    mooz 2010/07/05
    TraceMonkey
  • Protovis

    Protovis Protovis composes custom views of data with simple marks such as bars and dots. Unlike low-level graphics libraries that quickly become tedious for visualization, Protovis defines marks through dynamic properties that encode data, allowing inheritance, scales and layouts to simplify construction. Protovis is free and open-source, provided under the BSD License. It uses JavaScript and SVG

    mooz
    mooz 2010/07/01
    JavaScript + SVG によるグラフプロット / 可視化ライブラリ.
  • HTML5 Canvas Cheat Sheet

    Canvas element Attributes Name Type Default

    mooz
    mooz 2010/07/01
    Canvas 操作のチートシート. 型までちゃんと書いてある.
  • harmony:proxies [ES Wiki]

    See also: the discussion thread on the es-discuss mailing list. A tech talk on harmony proxies is available here. To enable ES programmers to represent virtualized objects (proxies). In particular, to enable writing generic abstractions that can intercept property access on ES objects. Driving forces:

    mooz
    mooz 2010/06/30
    Proxy, Proxies
  • A JavaScript implementation of the Content Aware Image Resizing algorithm | Pims Labs

    In my previous post, Firefox Native Content Aware Image Resizing, I introduced a pure JavaScript implementation of the famous Content Aware Image Resizing algorithm also known as Liquid Rescale. I explained the idea and the possible future of this implementation. Since then, I have had some precious feedbacks from Paul Rouget and Tristan Nitot. They suggested to make the demo a little bit more int

  • Welcome!

    Python. Client Side. Skulpt is an entirely in-browser implementation of Python. No preprocessing, plugins, or server-side support required, just write Python and reload. import turtle t = turtle.Turtle() for c in ['red', 'green', 'yellow', 'blue']: t.color(c) t.forward(75) t.left(90) Run Help, or examples: 1 2 3 4 5 6 7 8. Ctrl-Enter to run. The code is run entirely in your browser, so don't feel

    mooz
    mooz 2010/06/29
    "Skulpt is an entirely in-browser implementation of Python."
  • Skulpt: Python Implementation in JavaScript

    Badass JavaScriptA showcase of awesome JavaScript that pushes the boundaries of what's possible on the web, by @devongovett. Skulpt is an entirely in browser implementation of Python.  Much like other languages written on top of JavaScript, such as Objective-J and CoffeeScript, Skulpt loads, parses and runs the language with no compilation, pre-processing, plugins or server-side code necessary.  T

    Skulpt: Python Implementation in JavaScript
    mooz
    mooz 2010/06/29
    Generator などの機能も実装したらしい. "This is just another example of the power of JavaScript as a virtual machine."
  • Document: createEvent() メソッド - Web API | MDN

    ドキュメントオブジェクトモデル (DOM)DocumentコンストラクターDocument()インスタンスプロパティactiveElementadoptedStyleSheetsalinkColor 非推奨; all 非推奨; anchors 非推奨; applets 非推奨; bgColor 非推奨; bodycharacterSetchildElementCountchildrencompatModecontentTypecookiecurrentScriptdefaultViewdesignModedirdoctypedocumentElementdocumentURIdomain 非推奨; embedsfeaturePolicy Experimental fgColor 非推奨; firstElementChildfontsformsfragmentDirectivefullscr

    Document: createEvent() メソッド - Web API | MDN
    mooz
    mooz 2010/06/25
    document.createEvent の説明. イベントの種類. カスタムイベントは Events, MessageEvent で.
  • 要素が document につながっているかを高速に調べる方法 - IT戦記

    とある要素が document につながっているかどうかを調べたい! とりあえず、ほとんどすべてのブラウザで出来る方法としては、 parentNode で確認することができますね。 function isElementInDocument(node) { do { if (node === document) { return true; } } while (node = node.parentNode) return false; } でも 前の例だとちょっと遅いので contains や、 compareDocumentPosition を使うといいです! コードにすると以下のような感じ function isElementInDocument(node) { if (document === node) { return true } else if (document.compa

    要素が document につながっているかを高速に調べる方法 - IT戦記
    mooz
    mooz 2010/06/24
    document.documentElement.contains, document.compareDocumentPosition
  • jstudy #1 を開催しました - Webtech Walker

    perlとかHTML/CSSとかの勉強会はよくでてるけどjavascriptの勉強会ってあんまないなーと思ったので開催してみました。当はもっとゆるい感じでわいわい話しながら適当にプレゼンするみたいのをイメージしてたんですけど、予想より遙かにプレゼン希望者が多く(ありがたい限りです)内容も濃い勉強会になりました。 twitterも割と盛り上がったのでtogetterにまとめました。 Togetter - まとめ「jstudy #1」 まとめはtogetterで十分なので以下、個人的なメモです。 Introducing jQuery @Takazudo JQueryの入門講座を話していただきました。すでにホッテントリはいってました。さすがです。とりあえずjQuery入門してみたい方はこのスライド見るといいと思います。 Introducing jQuery まとめると、jQuery使えばかめは

    jstudy #1 を開催しました - Webtech Walker
    mooz
    mooz 2010/06/23
    jstudy. #2 にも期待.
  • Parsing and serializing XML - Developer guides | MDN

    At times, you may need to parse XML content and convert it into a DOM tree, or, conversely, serialize an existing DOM tree into XML. In this article, we'll look at the objects provided by the web platform to make the common tasks of serializing and parsing XML easy. XMLSerializer Serializes DOM trees, converting them into strings containing XML. DOMParser Constructs a DOM tree by parsing a string

    Parsing and serializing XML - Developer guides | MDN
    mooz
    mooz 2010/06/23
    DOM ツリーを serialize, deserialize する方法. XMLSerializer, DOMParser, XMLHttpRequest.
  • Audio Data API - MozillaWiki

    Defining an Enhanced API for Audio (Draft Recommendation) Note: this API has been deprecated in favor of the Web Audio API chosen by the W3C. Abstract The HTML5 specification introduces the <audio> and <video> media elements, and with them the opportunity to dramatically change the way we integrate media on the web. The current HTML5 media API provides ways to play and get limited information abou

    mooz
    mooz 2010/06/22
    audio の操作方法. API. canvas を使い波形を描画するサンプルなど.
  • GitHub - Marak/pdf.js: Project Deprecated

    You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

    GitHub - Marak/pdf.js: Project Deprecated
    mooz
    mooz 2010/06/22
    JavaScript で PDF を生成するらしい. 何を言っているのか略. Node.js でも動くよ.
  • node.jsでTwitter ChiarpUserStreamを閲覧するWebアプリを作った - 酒日記 はてな支店

    先日 Perl + AnyEvent で作った TwitterのChirpUserStreamsをダラ流しするWebApp を、node.js で作ってみました。 node.js というのは、「JavaScript V8 Engineでイベント駆動I/Oなネットワークサーバを書くためのフレームワーク(実行環境)」ということでいいんでしょうかね。 # インストールは ./configure && make && make install で終わるので詳細割愛 イベント駆動IOを使って、以下のような処理を1プロセスで行います。 CharpUserStream から流れてくる JSON を取得して node.js 組み込みの httpd のレスポンスに渡す ブラウザは Long poll して node.js から JSON を取得して画面描画 実際動いてるのを動画で見るとこんな感じです。左側の

    node.jsでTwitter ChiarpUserStreamを閲覧するWebアプリを作った - 酒日記 はてな支店
    mooz
    mooz 2010/06/22
    node.js "IO が全部イベントドリブンなので、ファイルを読み込むのも全て Listener を設定して callback する必要があるのが若干面倒"
  • 今日の知っ得まる得 ECMAScript - oogatta のブログ

    ECMAScript の Execution Context ECMAScript の Execution Context の項は読めば読むほど味わい深い大変なごちそうなのでありますが、ここをもにもにと読んでいたら知らなかったことがあったのでメモ。 ECMAScript の Excecution Context には3つのタイプがあって(3つのタイプしかない!) Global Code Eval Code Function Code とあり、何が違うかというと Scope Chain 構築手順 変数初期化手順 this 割り当て手順 が異なります。要するにごく簡単に言えば変数をつっこんでおく通常参照できない内部オブジェクトである Variable Object を誰が担当するのか?というのと this が何になるか?が違うと思っておけばよく、 Global Code : VO = Glob

    今日の知っ得まる得 ECMAScript - oogatta のブログ
    mooz
    mooz 2010/06/22
    execution context は 3 つ. global code, eval code, function code. これらは 1. scope chain の構築手順, 2. 変数初期化手順, 3. this 割り当て手順, がそれぞれ違う. また, DontDelete 属性値も異なる.
  • ハッカージャパンにあったFirefoxアドオンの脆弱性 - hogehoge @teramako

    Hacker Japan (ハッカー ジャパン) 2010年 07月号 [雑誌] 出版社/メーカー: 白夜書房発売日: 2010/06/08メディア: 雑誌購入: 3人 クリック: 66回この商品を含むブログ (4件) を見るの冒頭でFirefoxアドオンに関する脆弱性があるというので読んでみた。 あげられたアドオンは FireFTP :: Add-ons for Firefox ウェルカム・メッセージに悪意のあるコードがある場合、これをブラウザーが実行だそうです。 Wizz RSS News Reader - Rss, Atom & Podcast Feeds - Gmail Checker descriptionタグにあるHTMLJavaScriptを実行できるそうです。 CoolPreviews :: Add-ons for Firefox data://URLでXSSが可能だそう

    ハッカージャパンにあったFirefoxアドオンの脆弱性 - hogehoge @teramako
    mooz
    mooz 2010/06/22
    自らを省みる. その気になればほとんどのアドオンにこの手の脆弱性は見つけられそうで怖い.
  • 第8回 実践DOMスクリプティング#1:HTMLとテキストの操作 | gihyo.jp

    こんにちは、太田です。前々回、前回でDOMの基礎を簡単に解説しました。今回からは、DOMを使った実用的なスクリプトを解説していきます。特に今回はHTMLの操作、テキストの操作にフォーカスを当てていくつかのサンプルコードを解説していきます。 HTML操作の基 JavaScriptによってHTMLを書き出したり、一部を書き換えたり、削除したりといった方法は実は様々な方法が用意されています。目的に合わせて適切な方法を選ばないと非効率だったり、最悪クロスサイトスクリプティングなどの問題を抱えてしまう危険もあります。 document.writeと同期読み込み JavaScriptHTMLを書き出すというと、最初に学ぶのはこのdocument.writeかもしれません。いわゆるprint文のようにシンプルなAPIなので、入門書の最初のサンプルなどで扱われることも多いようです。しかし、docume

    第8回 実践DOMスクリプティング#1:HTMLとテキストの操作 | gihyo.jp
    mooz
    mooz 2010/06/21
    スクリプトの非同期読み込み. async は非同期, defer は遅延で DOMContentLoaded に相当. createElement で script を生成しドキュメントに挿入. head 要素の補完.
  • jstudyで「JavaScriptとLisp」ってタイトルのLTしました - あと味

    昨日、jstudyの第一回目のイベントがめでたく開催されました。 Twitterで見かけて、速攻で申し込んだんですが、せっかくだからLTしたいなと思い、稚拙ながら「JavaScriptとLisp」というタイトルでLTをさせていただくことができました。 発表するまで、ネタとしてどうなんだろうと不安でしたが、予想外に反応があったので良かったです。 jstudyの感想 jQuery、Dojo、JavaScriptの設計手法 x 2、ECMAScript5の仕様、jsdo.itの紹介、iPadJavaScriptJavaScriptの高速化手法、JavaScriptで昔を懐かしむなどなど、JavaScript好きにはとっても楽しいひと時を過ごすことができました。 LTに立候補していた人があまりいないように思いましたが、実際には11名?の方が発表し、最初から最後まで飽きることなく楽しめました。

    jstudyで「JavaScriptとLisp」ってタイトルのLTしました - あと味
    mooz
    mooz 2010/06/20
    LiveScript => Lisp. な, なんだってー!
  • jQuery Text Change Event を使って twitter をインクリメンタル検索するサンプルを書いた - mollifier delta blog

    jQuery Text Change Eventってのを見つけた。jQuery のカスタムイベントを定義するプラグインで、テキストボックス、テキストエリアの内容が変わるたびにイベントが発生するようになる。 キー入力をイベントで処理するのってかなりめんどくさいんだけど、これで「テキストボックスに入力があるたびに何かする」みたいなことが簡単にできるようになる。 イベント一覧 具体的には以下の3つのイベントが発生するようになる。 textchange テキストの内容が変わったときに発生するイベント hastext テキストが空の状態から何か入力されたときに発生するイベント notext テキストが空でない状態から空になったときに発生するイベント 使い方はこんな感じ。 $('#inputbox').bind('textchange', function(event, previousText) {

    jQuery Text Change Event を使って twitter をインクリメンタル検索するサンプルを書いた - mollifier delta blog
    mooz
    mooz 2010/06/19
    Twitter をインクリメンタル検索. autopagerize の次は incrementalize ほしい.