Skip to content

Instantly share code, notes, and snippets.

@littlebtc
Created June 25, 2012 03:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save littlebtc/2986353 to your computer and use it in GitHub Desktop.
Save littlebtc/2986353 to your computer and use it in GitHub Desktop.
// Copy the last line from this Gist, open the Error console (エラーコンソール),
// Paste the content to the empty text field then press Evaluate (コードを評価).
// it will test whether the VideoInfoReader works.
// You can replace the "sm9" URL with any Nico Nico Douga URLs.
// Possible result:
// Success: { /* A JSON response containing video info */ }
// Fail: (reason)
var VideoInfoReader = Components.utils.import("resource://nicofox/VideoInfoReader.jsm").VideoInfoReader; VideoInfoReader.readByUrl("http://www.nicovideo.jp/watch/sm9").then(function(msg) { Components.utils.reportError("Success:" + JSON.stringify(msg)); }, function(msg) { Components.utils.reportError("Fail:" + msg); });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment