Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
testing jetpack feature
<!DOCTYPE html>
<link rel="jetpack" href="jetpackTesting.js" />
<title>testing Jetpack</title>
<h1>testing Jetpack</h1>
html: '<span id="changeAccount">account:</span><span id="status">testing</span>',
width: 200,
onReady: function(doc) {
// データの永続化は Jetpack.sessionStorage で
// ...どうせsession単位の記憶なら、closureでいいんじゃ
if (!jetpack.sessionStorage.twName) { ={}; =
jetpack.tabs.focused.contentWindow.prompt('twitter id?'); =
jetpack.tabs.focused.contentWindow.prompt('twitter pass?'); = 1;
$("#changeAccount", doc).css({background:"green"});
$("#status", doc).css({background:"gold"});
var twitter = new jetpack.lib.twitter.Twit(,
$(doc).click(function() {
var self = this;
//twitter.tweet("counter from jetpack, count:" + Jetpack.sessionStorage.counter);;
twitter.getLatestStatus(function(res){$(self).contents().find("p").html(res.text)}); ++;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.