SlideShare una empresa de Scribd logo
1 de 70
Remixing Confluence with
Speakeasy



Nabeelah Ali
Atlassian

                          2
Show of hands
Written a Confluence plugin?




                              3
Show of hands
Comfortable with Javascript?




                               4
Show of hands
Enjoy memes?




                5
About me
Nabeelah Ali
Confluence developer
 on 4.0 frontend features




                            6
Confluence 4
• new features
• diverse users




                  7
“   Be the change you seek.
                              ”
                     Atlassian value




                                       8
9
In case you were wondering
• ragefaces is really an extension




         BEFORE                      AFTER




                                             10
I can haz plugin?
an atlassian-plugin.xml
<atlassian-plugin name="Ragefaces resource" key="example.plugin.ragefaces" plugins-
version="2">
    <plugin-info>
        <description>A plugin to turn your [/awyeah]s into images</description>
        <vendor name="Meme Corporation" url="http://www.memecorp.us"/>
        <version>1.0</version>
    </plugin-info>

    <web-resource name="Resources" key="resources">
          <resource name="foo.js" type="download" location="resources/foo.js"/>
          <context>atl.general</context>
    </web-resource>

</atlassian-plugin>




                                                                                      11
Creating a Confluence plugin




                              12
Creating a Confluence plugin




                              13
Creating a Confluence plugin



        run -> debug -> run


                              14
Creating a Confluence plugin



        run -> debug -> run


                              15
Creating a Confluence plugin



        run -> debug -> run


                              16
Creating a Confluence plugin



        run -> debug -> run


                              17
What you will hear today
• Speakeasy 101
• Let’s Build an Extension
• Cautionary Advice
• Resources




                             18
Speakeasy
Speakeasy: the what
• cross-product plugin
• run client-side Javascript, CSS & HTML




                                           20
demonstration of Speakeasy for the end user
creating an extension skeleton



                                 22
[demonstration of using the wizard to create an extension]
for plugin developers


                        super fast
                        prototyping




                                      24
for confluence admins



                 try out crazy stuff
                 on production data




                                       25
for confluence admins


                       user-driven
                       development




                                     26
for confluence admins



                  democratise
                  development




                                27
Speakeasy: got Confluence?
Atlassian Plugin SDK
 --atlas-run-standalone --product confluence --version 4.0




                                                             28
demonstration of installing the speakeasy plugin
liking



         30
31
pimping



          32
33
styling



          34
35
Let’s build an extension!
demonstration of plugin to build
Let’s build this thing
1. Include the image
2. Restrict the context
3. Find/replace
4. Twitter request
5. Put it in a dialog



                          38
Include the image
var img =
    require('speakeasy/resources').getImageUrl(module, 'bird.png');




                                                                      39
restrict the context



                       40
Let’s do this all onready


$(document).ready(function() {
  // we’ll put our code here
}




                                 41
Restrict the context
   if (!!AJS.Meta.get("page-id") &&
      !AJS.Meta.get("editor-mode")) {
     // do our stuff
   }




                                        42
grab the content



                   43
atlassian   atlassian




Confluence pages
viewing a page/blog       editing a page/blog                    dashboard
breadcrumbs                breadcrumbs                           breadcrumbs

  title                     title                                Welcome to Confluence    Updates
   content
                            content




                                                                  Spaces




                                                      SAVE
              atlassian                                                           atlassian




                                                                                                    44
Find & replace
  var content = AJS.$("#main-content");

  var twitterfiedContent = content.html().replace(/(^|s)#(w+)/g, "
     $1#<a href="http://search.twitter.com/search?q=%23$2">$2</a>
     <img src='"+ img + "' class='twittericon' hashtag='$2'/>");

  content.html(twitterfiedContent);




                                                                       45
All our hashtags are linked
• Body Level One
• Body Level One
 • Body Level Two
 • Body Level Two

• Body Level One
 • Body Level Two

                              46
Atlassian User Interface (AUI)
• a reusable set of UI components




                                    47
Put it in a dialog
AJS.$(".twittericon").each(function (i) {

  AJS.InlineDialog($(this), 1, function(content, trigger, showPopup)
  {
     // Let’s get some information to put in this inline dialog.
   },  {onHover:true});
}




                                                                       48
Twitter request
      $.getJSON("http://search.twitter.com/search.json?callback=?", {
       q: "#" + $(this).attr('hashtag'),
       rpp: "5",
       lang: "en"
       }, function(data) {
          $.each(data.results, function() {
             // Put each result’s twitter handle, tweet text and user
             //profile photo in nice divs and style.      
           });
       });
   




                                                                        49
Twitter request
      $.getJSON("http://search.twitter.com/search.json?callback=?", {
       q: "#" + $(this).attr('hashtag'),
       rpp: "5",
       lang: "en"
       }, function(data) {
          $.each(data.results, function() {
             // Put each result’s twitter handle, tweet text and user
             //profile photo in nice divs and style.      
           });
       });
   




                                                                        50
So now we have
    AJS.InlineDialog($(this), 1, function(content, trigger, showPopup) {

      var tweets = AJS.$("<div></div>").attr("id", "tweets");
      $.getJSON("http://search.twitter.com/search.json?callback=?", {q: "#" + id, rpp: "5",
lang: "en"}, function(data) {
        $.each(data.results, function() {
          // Assemble results into a tweets div.
        });
       
        $(content).html(tweets);
       showPopup();
       });
    },  {onHover:true});




                                                                                              51
So now we have
var img = require('speakeasy/resources').getImageUrl(module, 'bird.png');

$(document).ready(function () {
    if ( !! AJS.Meta.get("page-id") && !AJS.Meta.get("editor-mode")) {

          var content = AJS.$("#main-content");
          var twitterfiedContent = content.html().replace(/(^|s)#(w+)/g, "$1#
                    <a href="http://search.twitter.com/search?q=%23$2">$2</a><img src='" + img + "' class='twittericon' data-val='$2'/>");
          content.html(twitterfiedContent);

          AJS.$(".twittericon").each(function (i) {

                AJS.InlineDialog($(this), 1, function (content, trigger, showPopup) {

                       var tweets = AJS.$("<div></div>").addClass(“tweets”);
                       AJS.$.getJSON("http://search.twitter.com/search.json?callback=?", {
                           q: "#" + $(this).attr('hashtag'),
                           rpp: "5",
                           lang: "en"
                       }, function (data) {
                           AJS.$.each(data.results, function () {
                               tweets.append(formatTweet(this));
                           });

                             AJS.$(content).html(tweets);
                             showPopup();
                       });

                }, {
                       onHover: true
                });
          });
      }
});




                                                                                                                                               52
THE TWEETINATOR




                  53
Cautionary advice
Breaking things
• Unsubscribe & restore URLs
   yourinstance/plugins/servlet/speakeasy/unsubscribe

   yourinstance/plugins/servlet/speakeasy/restore




                                                        55
Should you use it?
• Do you trust your users?
• Does your instance allow public signup?




                                            56
Speakeasy Settings




                     57
Cross-site scripting
• inserting unescaped HTML into the page
 • from user input
 • from data you fetched




                                           58
XSS Example
var result = "<script>alert();</script>";
var el = document.getElementById('myDiv');
    




                                             59
XSS Example
var result = "<script>alert();</script>";
var el = document.getElementById('myDiv');

el.innerHTML = result;




                                             60
XSS Example
var result = "<script>alert();</script>";
var el = document.getElementById('myDiv');

el.innerHTML = result;                       // BAD - Don’t do this!




                                                                       61
XSS Example
var result = "<script>alert();</script>";
var el = document.getElementById('myDiv');

el.innerHTML = result;                       // BAD - Don’t do this!


el.innerHTML = AJS.escapeHtml(result);       // Do this instead.




                                                                       62
XSS Example
var result = "<script>alert();</script>";
var el = document.getElementById('myDiv');

el.innerHTML = result;                       // BAD - Don’t do this!


el.innerHTML = AJS.escapeHtml(result);       // Do this instead.
AJS.$(el).text(result);                      // Or this.




                                                                       63
Interested in learning more?
Securing your Plugin - Penny Wyatt @ AtlasCamp 2010

               Protip If you weren’t here last year or
               just enjoy nostalgia, check out the
               Atlascamp 2010 website for videos
               of every session.




                                                         64
Where can you go from here?
Moar

• git support
• applinks proxy
• xml/rpc client
• check out the docs!



                        66
Product Compatibility

• Speakeasy documentation
• Extension repository
• Remember: not just Confluence!




                                  67
Resources
Speakeasy Documentation
https://developer.atlassian.com/display/SPEAK/Speakeasy
Speakeasy Source on github
https://github.com/mrdon/speakeasy-plugin
Speakeasy JARs
https://maven.atlassian.com/content/repositories/atlassian-public/com/atlassian/labs/speakeasy-plugin/




                                                                                                         68
TAKE-AWAYS




“   Got an hour to spare? That’s enough time to

                                                     ”
    prototype a new Confluence feature with Speakeasy.




     #atlascamp


                                                         69
Thank you!

Más contenido relacionado

La actualidad más candente

OSCON Google App Engine Codelab - July 2010
OSCON Google App Engine Codelab - July 2010OSCON Google App Engine Codelab - July 2010
OSCON Google App Engine Codelab - July 2010ikailan
 
E2 appspresso hands on lab
E2 appspresso hands on labE2 appspresso hands on lab
E2 appspresso hands on labNAVER D2
 
Workshop quality assurance for php projects - phpbelfast
Workshop quality assurance for php projects - phpbelfastWorkshop quality assurance for php projects - phpbelfast
Workshop quality assurance for php projects - phpbelfastMichelangelo van Dam
 
JavaScript & HTML5 - Brave New World
JavaScript & HTML5 - Brave New WorldJavaScript & HTML5 - Brave New World
JavaScript & HTML5 - Brave New WorldRobert Nyman
 
Implement rich snippets in your webshop
Implement rich snippets in your webshopImplement rich snippets in your webshop
Implement rich snippets in your webshopArjen Miedema
 
Cake Php 1.2 (Ocphp)
Cake Php 1.2 (Ocphp)Cake Php 1.2 (Ocphp)
Cake Php 1.2 (Ocphp)guest193fe1
 
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3makoto tsuyuki
 
Greach 2019 - Creating Micronaut Configurations
Greach 2019 - Creating Micronaut ConfigurationsGreach 2019 - Creating Micronaut Configurations
Greach 2019 - Creating Micronaut ConfigurationsIván López Martín
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesLindsay Holmwood
 
Power of Simplicity in FW/1
Power of Simplicity in FW/1Power of Simplicity in FW/1
Power of Simplicity in FW/1Masha Edelen
 
A Little Backbone For Your App
A Little Backbone For Your AppA Little Backbone For Your App
A Little Backbone For Your AppLuca Mearelli
 
Moving from Django Apps to Services
Moving from Django Apps to ServicesMoving from Django Apps to Services
Moving from Django Apps to ServicesCraig Kerstiens
 
Java Libraries You Can’t Afford to Miss
Java Libraries You Can’t Afford to Miss Java Libraries You Can’t Afford to Miss
Java Libraries You Can’t Afford to Miss Andres Almiray
 
Django for mobile applications
Django for mobile applicationsDjango for mobile applications
Django for mobile applicationsHassan Abid
 
Lecture: Vaadin Overview
Lecture: Vaadin OverviewLecture: Vaadin Overview
Lecture: Vaadin OverviewJoonas Lehtinen
 

La actualidad más candente (20)

OSCON Google App Engine Codelab - July 2010
OSCON Google App Engine Codelab - July 2010OSCON Google App Engine Codelab - July 2010
OSCON Google App Engine Codelab - July 2010
 
E2 appspresso hands on lab
E2 appspresso hands on labE2 appspresso hands on lab
E2 appspresso hands on lab
 
Workshop quality assurance for php projects - phpbelfast
Workshop quality assurance for php projects - phpbelfastWorkshop quality assurance for php projects - phpbelfast
Workshop quality assurance for php projects - phpbelfast
 
JavaScript & HTML5 - Brave New World
JavaScript & HTML5 - Brave New WorldJavaScript & HTML5 - Brave New World
JavaScript & HTML5 - Brave New World
 
Implement rich snippets in your webshop
Implement rich snippets in your webshopImplement rich snippets in your webshop
Implement rich snippets in your webshop
 
Cake Php 1.2 (Ocphp)
Cake Php 1.2 (Ocphp)Cake Php 1.2 (Ocphp)
Cake Php 1.2 (Ocphp)
 
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
 
Greach 2019 - Creating Micronaut Configurations
Greach 2019 - Creating Micronaut ConfigurationsGreach 2019 - Creating Micronaut Configurations
Greach 2019 - Creating Micronaut Configurations
 
Progressive What Apps?
Progressive What Apps?Progressive What Apps?
Progressive What Apps?
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
CodeIgniter 3.0
CodeIgniter 3.0CodeIgniter 3.0
CodeIgniter 3.0
 
Power of Simplicity in FW/1
Power of Simplicity in FW/1Power of Simplicity in FW/1
Power of Simplicity in FW/1
 
A Little Backbone For Your App
A Little Backbone For Your AppA Little Backbone For Your App
A Little Backbone For Your App
 
Django
DjangoDjango
Django
 
Moving from Django Apps to Services
Moving from Django Apps to ServicesMoving from Django Apps to Services
Moving from Django Apps to Services
 
Hooks WCSD12
Hooks WCSD12Hooks WCSD12
Hooks WCSD12
 
Java Libraries You Can’t Afford to Miss
Java Libraries You Can’t Afford to Miss Java Libraries You Can’t Afford to Miss
Java Libraries You Can’t Afford to Miss
 
Django for mobile applications
Django for mobile applicationsDjango for mobile applications
Django for mobile applications
 
Lecture: Vaadin Overview
Lecture: Vaadin OverviewLecture: Vaadin Overview
Lecture: Vaadin Overview
 
SEO for Developers
SEO for DevelopersSEO for Developers
SEO for Developers
 

Destacado

Scalability ofjira attelefónicagermany_v1.2_public
Scalability ofjira attelefónicagermany_v1.2_publicScalability ofjira attelefónicagermany_v1.2_public
Scalability ofjira attelefónicagermany_v1.2_publicAtlassian
 
Hodges unite confluence unite presentation
Hodges unite confluence unite presentationHodges unite confluence unite presentation
Hodges unite confluence unite presentationAtlassian
 
Unite jira presentation 2012 v4 copy
Unite jira presentation 2012 v4 copyUnite jira presentation 2012 v4 copy
Unite jira presentation 2012 v4 copyAtlassian
 
Equion presentation updated atlassian unite 12 march2012
Equion presentation updated   atlassian unite 12 march2012Equion presentation updated   atlassian unite 12 march2012
Equion presentation updated atlassian unite 12 march2012Atlassian
 
London unite-zen
London unite-zenLondon unite-zen
London unite-zenAtlassian
 
Juggling Features, Advancement, and Quality As You Grow - Chris Maddern
Juggling Features, Advancement, and Quality As You Grow - Chris MaddernJuggling Features, Advancement, and Quality As You Grow - Chris Maddern
Juggling Features, Advancement, and Quality As You Grow - Chris MaddernAtlassian
 
Bonfire... How'd You Do That?! - AtlasCamp 2011
Bonfire... How'd You Do That?! - AtlasCamp 2011Bonfire... How'd You Do That?! - AtlasCamp 2011
Bonfire... How'd You Do That?! - AtlasCamp 2011Atlassian
 
20120315 atlassian unite - dvcs
20120315   atlassian unite - dvcs20120315   atlassian unite - dvcs
20120315 atlassian unite - dvcsAtlassian
 
Alm works atlassian unite london
Alm works   atlassian unite londonAlm works   atlassian unite london
Alm works atlassian unite londonAtlassian
 

Destacado (9)

Scalability ofjira attelefónicagermany_v1.2_public
Scalability ofjira attelefónicagermany_v1.2_publicScalability ofjira attelefónicagermany_v1.2_public
Scalability ofjira attelefónicagermany_v1.2_public
 
Hodges unite confluence unite presentation
Hodges unite confluence unite presentationHodges unite confluence unite presentation
Hodges unite confluence unite presentation
 
Unite jira presentation 2012 v4 copy
Unite jira presentation 2012 v4 copyUnite jira presentation 2012 v4 copy
Unite jira presentation 2012 v4 copy
 
Equion presentation updated atlassian unite 12 march2012
Equion presentation updated   atlassian unite 12 march2012Equion presentation updated   atlassian unite 12 march2012
Equion presentation updated atlassian unite 12 march2012
 
London unite-zen
London unite-zenLondon unite-zen
London unite-zen
 
Juggling Features, Advancement, and Quality As You Grow - Chris Maddern
Juggling Features, Advancement, and Quality As You Grow - Chris MaddernJuggling Features, Advancement, and Quality As You Grow - Chris Maddern
Juggling Features, Advancement, and Quality As You Grow - Chris Maddern
 
Bonfire... How'd You Do That?! - AtlasCamp 2011
Bonfire... How'd You Do That?! - AtlasCamp 2011Bonfire... How'd You Do That?! - AtlasCamp 2011
Bonfire... How'd You Do That?! - AtlasCamp 2011
 
20120315 atlassian unite - dvcs
20120315   atlassian unite - dvcs20120315   atlassian unite - dvcs
20120315 atlassian unite - dvcs
 
Alm works atlassian unite london
Alm works   atlassian unite londonAlm works   atlassian unite london
Alm works atlassian unite london
 

Similar a Remixing Confluence with Speakeasy - AtlasCamp 2011

AtlasCamp 2011: Confluence 4 and Beyond
AtlasCamp 2011: Confluence 4 and BeyondAtlasCamp 2011: Confluence 4 and Beyond
AtlasCamp 2011: Confluence 4 and BeyondSherif Mansour
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)Doris Chen
 
vJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemvJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemAndres Almiray
 
Ako prepojiť aplikáciu s Elasticsearch
Ako prepojiť aplikáciu s ElasticsearchAko prepojiť aplikáciu s Elasticsearch
Ako prepojiť aplikáciu s Elasticsearchbart-sk
 
Refresh Austin - Intro to Dexy
Refresh Austin - Intro to DexyRefresh Austin - Intro to Dexy
Refresh Austin - Intro to Dexyananelson
 
Learning jQuery made exciting in an interactive session by one of our team me...
Learning jQuery made exciting in an interactive session by one of our team me...Learning jQuery made exciting in an interactive session by one of our team me...
Learning jQuery made exciting in an interactive session by one of our team me...Thinqloud
 
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)Mike Schinkel
 
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010Hyperproductive JSF 2.0 @ JavaOne Brazil 2010
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010Arun Gupta
 
It's a Mod World - A Practical Guide to Rocking Modernizr
It's a Mod World - A Practical Guide to Rocking ModernizrIt's a Mod World - A Practical Guide to Rocking Modernizr
It's a Mod World - A Practical Guide to Rocking ModernizrMichael Enslow
 
Build Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBuild Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBob Paulin
 
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディングXitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディングscalaconfjp
 
Xitrum @ Scala Matsuri Tokyo 2014
Xitrum @ Scala Matsuri Tokyo 2014Xitrum @ Scala Matsuri Tokyo 2014
Xitrum @ Scala Matsuri Tokyo 2014Ngoc Dao
 
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...mfrancis
 
OSGi and Spring Data for simple (Web) Application Development
OSGi and Spring Data  for simple (Web) Application DevelopmentOSGi and Spring Data  for simple (Web) Application Development
OSGi and Spring Data for simple (Web) Application DevelopmentChristian Baranowski
 
Quick Introduction to Sphinx and Thinking Sphinx
Quick Introduction to Sphinx and Thinking SphinxQuick Introduction to Sphinx and Thinking Sphinx
Quick Introduction to Sphinx and Thinking Sphinxhayesdavis
 
Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12Michelangelo van Dam
 

Similar a Remixing Confluence with Speakeasy - AtlasCamp 2011 (20)

AtlasCamp 2011: Confluence 4 and Beyond
AtlasCamp 2011: Confluence 4 and BeyondAtlasCamp 2011: Confluence 4 and Beyond
AtlasCamp 2011: Confluence 4 and Beyond
 
The JavaFX Ecosystem
The JavaFX EcosystemThe JavaFX Ecosystem
The JavaFX Ecosystem
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
 
vJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemvJUG - The JavaFX Ecosystem
vJUG - The JavaFX Ecosystem
 
Ako prepojiť aplikáciu s Elasticsearch
Ako prepojiť aplikáciu s ElasticsearchAko prepojiť aplikáciu s Elasticsearch
Ako prepojiť aplikáciu s Elasticsearch
 
Refresh Austin - Intro to Dexy
Refresh Austin - Intro to DexyRefresh Austin - Intro to Dexy
Refresh Austin - Intro to Dexy
 
jQuery UI and Plugins
jQuery UI and PluginsjQuery UI and Plugins
jQuery UI and Plugins
 
Learning jQuery made exciting in an interactive session by one of our team me...
Learning jQuery made exciting in an interactive session by one of our team me...Learning jQuery made exciting in an interactive session by one of our team me...
Learning jQuery made exciting in an interactive session by one of our team me...
 
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
 
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010Hyperproductive JSF 2.0 @ JavaOne Brazil 2010
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010
 
It's a Mod World - A Practical Guide to Rocking Modernizr
It's a Mod World - A Practical Guide to Rocking ModernizrIt's a Mod World - A Practical Guide to Rocking Modernizr
It's a Mod World - A Practical Guide to Rocking Modernizr
 
Build Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBuild Your Own CMS with Apache Sling
Build Your Own CMS with Apache Sling
 
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディングXitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
 
Xitrum @ Scala Matsuri Tokyo 2014
Xitrum @ Scala Matsuri Tokyo 2014Xitrum @ Scala Matsuri Tokyo 2014
Xitrum @ Scala Matsuri Tokyo 2014
 
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
 
OSGi and Spring Data for simple (Web) Application Development
OSGi and Spring Data  for simple (Web) Application DevelopmentOSGi and Spring Data  for simple (Web) Application Development
OSGi and Spring Data for simple (Web) Application Development
 
Html5 For Jjugccc2009fall
Html5 For Jjugccc2009fallHtml5 For Jjugccc2009fall
Html5 For Jjugccc2009fall
 
Web2.0 with jQuery in English
Web2.0 with jQuery in EnglishWeb2.0 with jQuery in English
Web2.0 with jQuery in English
 
Quick Introduction to Sphinx and Thinking Sphinx
Quick Introduction to Sphinx and Thinking SphinxQuick Introduction to Sphinx and Thinking Sphinx
Quick Introduction to Sphinx and Thinking Sphinx
 
Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12
 

Más de Atlassian

International Women's Day 2020
International Women's Day 2020International Women's Day 2020
International Women's Day 2020Atlassian
 
10 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 202010 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 2020Atlassian
 
Forge App Showcase
Forge App ShowcaseForge App Showcase
Forge App ShowcaseAtlassian
 
Let's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UILet's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UIAtlassian
 
Meet the Forge Runtime
Meet the Forge RuntimeMeet the Forge Runtime
Meet the Forge RuntimeAtlassian
 
Forge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User ExperienceForge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User ExperienceAtlassian
 
Take Action with Forge Triggers
Take Action with Forge TriggersTake Action with Forge Triggers
Take Action with Forge TriggersAtlassian
 
Observability and Troubleshooting in Forge
Observability and Troubleshooting in ForgeObservability and Troubleshooting in Forge
Observability and Troubleshooting in ForgeAtlassian
 
Trusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy ModelTrusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy ModelAtlassian
 
Designing Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI SystemDesigning Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI SystemAtlassian
 
Forge: Under the Hood
Forge: Under the HoodForge: Under the Hood
Forge: Under the HoodAtlassian
 
Access to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIsAccess to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIsAtlassian
 
Design Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch PluginDesign Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch PluginAtlassian
 
Tear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the BuildingTear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the BuildingAtlassian
 
Nailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that MatterNailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that MatterAtlassian
 
Building Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in MindBuilding Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in MindAtlassian
 
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...Atlassian
 
Beyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced TeamsBeyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced TeamsAtlassian
 
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed TeamThe Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed TeamAtlassian
 
Building Apps With Enterprise in Mind
Building Apps With Enterprise in MindBuilding Apps With Enterprise in Mind
Building Apps With Enterprise in MindAtlassian
 

Más de Atlassian (20)

International Women's Day 2020
International Women's Day 2020International Women's Day 2020
International Women's Day 2020
 
10 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 202010 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 2020
 
Forge App Showcase
Forge App ShowcaseForge App Showcase
Forge App Showcase
 
Let's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UILet's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UI
 
Meet the Forge Runtime
Meet the Forge RuntimeMeet the Forge Runtime
Meet the Forge Runtime
 
Forge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User ExperienceForge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User Experience
 
Take Action with Forge Triggers
Take Action with Forge TriggersTake Action with Forge Triggers
Take Action with Forge Triggers
 
Observability and Troubleshooting in Forge
Observability and Troubleshooting in ForgeObservability and Troubleshooting in Forge
Observability and Troubleshooting in Forge
 
Trusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy ModelTrusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy Model
 
Designing Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI SystemDesigning Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI System
 
Forge: Under the Hood
Forge: Under the HoodForge: Under the Hood
Forge: Under the Hood
 
Access to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIsAccess to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIs
 
Design Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch PluginDesign Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch Plugin
 
Tear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the BuildingTear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the Building
 
Nailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that MatterNailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that Matter
 
Building Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in MindBuilding Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in Mind
 
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
 
Beyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced TeamsBeyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced Teams
 
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed TeamThe Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
 
Building Apps With Enterprise in Mind
Building Apps With Enterprise in MindBuilding Apps With Enterprise in Mind
Building Apps With Enterprise in Mind
 

Último

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Último (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Remixing Confluence with Speakeasy - AtlasCamp 2011

  • 1.
  • 3. Show of hands Written a Confluence plugin? 3
  • 4. Show of hands Comfortable with Javascript? 4
  • 6. About me Nabeelah Ali Confluence developer on 4.0 frontend features 6
  • 7. Confluence 4 • new features • diverse users 7
  • 8. Be the change you seek. ” Atlassian value 8
  • 9. 9
  • 10. In case you were wondering • ragefaces is really an extension BEFORE AFTER 10
  • 11. I can haz plugin? an atlassian-plugin.xml <atlassian-plugin name="Ragefaces resource" key="example.plugin.ragefaces" plugins- version="2"> <plugin-info> <description>A plugin to turn your [/awyeah]s into images</description> <vendor name="Meme Corporation" url="http://www.memecorp.us"/> <version>1.0</version> </plugin-info> <web-resource name="Resources" key="resources"> <resource name="foo.js" type="download" location="resources/foo.js"/> <context>atl.general</context> </web-resource> </atlassian-plugin> 11
  • 14. Creating a Confluence plugin run -> debug -> run 14
  • 15. Creating a Confluence plugin run -> debug -> run 15
  • 16. Creating a Confluence plugin run -> debug -> run 16
  • 17. Creating a Confluence plugin run -> debug -> run 17
  • 18. What you will hear today • Speakeasy 101 • Let’s Build an Extension • Cautionary Advice • Resources 18
  • 20. Speakeasy: the what • cross-product plugin • run client-side Javascript, CSS & HTML 20
  • 21. demonstration of Speakeasy for the end user
  • 22. creating an extension skeleton 22
  • 23. [demonstration of using the wizard to create an extension]
  • 24. for plugin developers super fast prototyping 24
  • 25. for confluence admins try out crazy stuff on production data 25
  • 26. for confluence admins user-driven development 26
  • 27. for confluence admins democratise development 27
  • 28. Speakeasy: got Confluence? Atlassian Plugin SDK --atlas-run-standalone --product confluence --version 4.0 28
  • 29. demonstration of installing the speakeasy plugin
  • 30. liking 30
  • 31. 31
  • 32. pimping 32
  • 33. 33
  • 34. styling 34
  • 35. 35
  • 36. Let’s build an extension!
  • 38. Let’s build this thing 1. Include the image 2. Restrict the context 3. Find/replace 4. Twitter request 5. Put it in a dialog 38
  • 39. Include the image var img = require('speakeasy/resources').getImageUrl(module, 'bird.png'); 39
  • 41. Let’s do this all onready $(document).ready(function() { // we’ll put our code here } 41
  • 42. Restrict the context if (!!AJS.Meta.get("page-id") && !AJS.Meta.get("editor-mode")) { // do our stuff } 42
  • 44. atlassian atlassian Confluence pages viewing a page/blog editing a page/blog dashboard breadcrumbs breadcrumbs breadcrumbs title title Welcome to Confluence Updates content content Spaces SAVE atlassian atlassian 44
  • 45. Find & replace   var content = AJS.$("#main-content");   var twitterfiedContent = content.html().replace(/(^|s)#(w+)/g, " $1#<a href="http://search.twitter.com/search?q=%23$2">$2</a> <img src='"+ img + "' class='twittericon' hashtag='$2'/>");   content.html(twitterfiedContent); 45
  • 46. All our hashtags are linked • Body Level One • Body Level One • Body Level Two • Body Level Two • Body Level One • Body Level Two 46
  • 47. Atlassian User Interface (AUI) • a reusable set of UI components 47
  • 48. Put it in a dialog AJS.$(".twittericon").each(function (i) { AJS.InlineDialog($(this), 1, function(content, trigger, showPopup) { // Let’s get some information to put in this inline dialog.    },  {onHover:true}); } 48
  • 49. Twitter request       $.getJSON("http://search.twitter.com/search.json?callback=?", { q: "#" + $(this).attr('hashtag'), rpp: "5", lang: "en" }, function(data) {    $.each(data.results, function() {    // Put each result’s twitter handle, tweet text and user //profile photo in nice divs and style.                }); });     49
  • 50. Twitter request       $.getJSON("http://search.twitter.com/search.json?callback=?", { q: "#" + $(this).attr('hashtag'), rpp: "5", lang: "en" }, function(data) {    $.each(data.results, function() {    // Put each result’s twitter handle, tweet text and user //profile photo in nice divs and style.                }); });     50
  • 51. So now we have     AJS.InlineDialog($(this), 1, function(content, trigger, showPopup) {       var tweets = AJS.$("<div></div>").attr("id", "tweets");       $.getJSON("http://search.twitter.com/search.json?callback=?", {q: "#" + id, rpp: "5", lang: "en"}, function(data) {         $.each(data.results, function() { // Assemble results into a tweets div.         });         $(content).html(tweets);        showPopup();        });     },  {onHover:true}); 51
  • 52. So now we have var img = require('speakeasy/resources').getImageUrl(module, 'bird.png'); $(document).ready(function () { if ( !! AJS.Meta.get("page-id") && !AJS.Meta.get("editor-mode")) { var content = AJS.$("#main-content"); var twitterfiedContent = content.html().replace(/(^|s)#(w+)/g, "$1# <a href="http://search.twitter.com/search?q=%23$2">$2</a><img src='" + img + "' class='twittericon' data-val='$2'/>"); content.html(twitterfiedContent); AJS.$(".twittericon").each(function (i) { AJS.InlineDialog($(this), 1, function (content, trigger, showPopup) { var tweets = AJS.$("<div></div>").addClass(“tweets”); AJS.$.getJSON("http://search.twitter.com/search.json?callback=?", { q: "#" + $(this).attr('hashtag'), rpp: "5", lang: "en" }, function (data) { AJS.$.each(data.results, function () { tweets.append(formatTweet(this)); }); AJS.$(content).html(tweets); showPopup(); }); }, { onHover: true }); }); } }); 52
  • 55. Breaking things • Unsubscribe & restore URLs yourinstance/plugins/servlet/speakeasy/unsubscribe yourinstance/plugins/servlet/speakeasy/restore 55
  • 56. Should you use it? • Do you trust your users? • Does your instance allow public signup? 56
  • 58. Cross-site scripting • inserting unescaped HTML into the page • from user input • from data you fetched 58
  • 59. XSS Example var result = "<script>alert();</script>"; var el = document.getElementById('myDiv');      59
  • 60. XSS Example var result = "<script>alert();</script>"; var el = document.getElementById('myDiv'); el.innerHTML = result; 60
  • 61. XSS Example var result = "<script>alert();</script>"; var el = document.getElementById('myDiv'); el.innerHTML = result; // BAD - Don’t do this! 61
  • 62. XSS Example var result = "<script>alert();</script>"; var el = document.getElementById('myDiv'); el.innerHTML = result; // BAD - Don’t do this! el.innerHTML = AJS.escapeHtml(result); // Do this instead. 62
  • 63. XSS Example var result = "<script>alert();</script>"; var el = document.getElementById('myDiv'); el.innerHTML = result; // BAD - Don’t do this! el.innerHTML = AJS.escapeHtml(result); // Do this instead. AJS.$(el).text(result); // Or this. 63
  • 64. Interested in learning more? Securing your Plugin - Penny Wyatt @ AtlasCamp 2010 Protip If you weren’t here last year or just enjoy nostalgia, check out the Atlascamp 2010 website for videos of every session. 64
  • 65. Where can you go from here?
  • 66. Moar • git support • applinks proxy • xml/rpc client • check out the docs! 66
  • 67. Product Compatibility • Speakeasy documentation • Extension repository • Remember: not just Confluence! 67
  • 68. Resources Speakeasy Documentation https://developer.atlassian.com/display/SPEAK/Speakeasy Speakeasy Source on github https://github.com/mrdon/speakeasy-plugin Speakeasy JARs https://maven.atlassian.com/content/repositories/atlassian-public/com/atlassian/labs/speakeasy-plugin/ 68
  • 69. TAKE-AWAYS “ Got an hour to spare? That’s enough time to ” prototype a new Confluence feature with Speakeasy. #atlascamp 69

Notas del editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. easy to deploy // fast to deploy // social // per-user\n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n