SlideShare a Scribd company logo
PORTING FLASHBLOCK
TO JETPACK PLATFORM



             DRAFT
WHAT’S FLASHBLOCK?

• Flashblock    is an
 extension for the Firefox
 that blocks ALL Flash
 content from loading. It then
 leaves placeholders on
 the webpage that allow you
 to click to download and
 then view the Flash content.
WHAT’S JETPACK?

• Jetpackis an API for allowing
 you to write Firefox add-ons
 using the web technologies
 you already know (e.g.
 HTML, CSS and Javascript).

• Almostone-clic install and
 without restart
WHAT’S THE PLAN?


• The   basic algorithm

• Some   code

• What   could be improved

• Conclusion
ALGORITHM


Quite simple :

• Look   for all Flash object

• Replace   them by a placeholder

•A   click on a placeholder put the Flash object back
ON/OFF BUTTON ON THE
         STATUS BAR
jetpack.statusBar.append({
  html: 'Flashblok?<input type="checkbox">',
  width: 76,
  onReady: function(widget){
   $("input", widget).click(function(){
    if( this.checked ){
      jetpack.tabs.onReady( removeEmbeds );
removeEmbeds(jetpack.tabs.focused.contentDocument);
      }
      else jetpack.tabs.onReady.unbind( removeEmbeds );
    });
  }
});
FIND FLASH OBJECTS


                                          Better method
Lazzy method
                                          Search for :
function findFlash(doc){               •   object[codebase*="swflash.cab"]
return $(doc).find('object, embed');   •   object[data*=".swf"]
}                                     •   embed[type="application/x-shockwave-flash"]
                                      •   etc.
REMOVE FLASH

function removeEmbeds(doc){
  findFlash(doc).each(function() {
    var placeHolder = createPlaceHolder(...);
    // Here I put code to remember my removed Flash object
    placeHolder.click(function(eventObject){
      $(this).replaceWith(myDeletedEmbed);
    });
    $(this).replaceWith(placeHolder); // So easy with jQuery
  });
}
PLACEHOLDERS


• Full   CSS3

• Make use of text-shadow, -
 moz-box-shadow, -moz-
 border-radius and -moz-linear-
 gradient (coming with Firefox
 3.6)
NEXT STEPS

• Block   Flash objects sooner   • Use
                                     simple storage JEP to
                                  remember block status
• Improve   memory footprint
                                 • Usethe coming menu JEP
• Better
      way to remember             and simple storage one to
 removed objects                  provide whitelist
                                  management
• BlockSilverlight,
 Authorware, Director, etc.
 objects
CONCLUSION



• It’s   very easy to develop an extension

• Still   lacks some features like localisation
LINKS

• Jetpack   official site: http://labs.mozilla.com/jetpack/

• Jetpack   tutorial: https://jetpack.mozillalabs.com/tutorial.html

• JEPs: https://wiki.mozilla.org/Labs/Jetpack/JEPs

• Original
         Flashblock extension : https://addons.mozilla.org/
 firefox/addon/433

• Andfinally Flashblock for Jetpack : http://tb4.fr/labs/jetpack/
 flashblock/

More Related Content

What's hot (19)

PPTX
Php with mysql ppt
Rajamanickam Gomathijayam
 
KEY
[Coscup 2012] JavascriptMVC
Alive Kuo
 
PPT
Persistent Offline Storage White
Alexei White
 
PDF
Even faster django
Gage Tseng
 
PDF
Javascript, DOM, browsers and frameworks basics
Net7
 
PDF
Couchdb Nosql
elliando dias
 
PPTX
Php sessions
JIGAR MAKHIJA
 
PPT
Easy javascript
Bui Kiet
 
PPTX
Php cookies
JIGAR MAKHIJA
 
PDF
Real World Seaside Applications
ESUG
 
PDF
Developing iOS REST Applications
lmrei
 
PDF
Philip Stehlik at TechTalks.ph - Intro to Groovy and Grails
Philip Stehlik
 
PDF
Meetup Performance
Greg Whalin
 
ODP
When dynamic becomes static : the next step in web caching techniques
Wim Godden
 
PDF
Backbone
Ynon Perek
 
PDF
[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager
DrupalDay
 
PDF
Automating WordPress Theme Development
Hardeep Asrani
 
KEY
Geotalk presentation
Eric Palakovich Carr
 
ODP
Indexed db
Martin Giger
 
Php with mysql ppt
Rajamanickam Gomathijayam
 
[Coscup 2012] JavascriptMVC
Alive Kuo
 
Persistent Offline Storage White
Alexei White
 
Even faster django
Gage Tseng
 
Javascript, DOM, browsers and frameworks basics
Net7
 
Couchdb Nosql
elliando dias
 
Php sessions
JIGAR MAKHIJA
 
Easy javascript
Bui Kiet
 
Php cookies
JIGAR MAKHIJA
 
Real World Seaside Applications
ESUG
 
Developing iOS REST Applications
lmrei
 
Philip Stehlik at TechTalks.ph - Intro to Groovy and Grails
Philip Stehlik
 
Meetup Performance
Greg Whalin
 
When dynamic becomes static : the next step in web caching techniques
Wim Godden
 
Backbone
Ynon Perek
 
[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager
DrupalDay
 
Automating WordPress Theme Development
Hardeep Asrani
 
Geotalk presentation
Eric Palakovich Carr
 
Indexed db
Martin Giger
 

Viewers also liked (20)

PPT
Ad
babstwat
 
PPT
Claritas B A S E S Restaurant Audit Report
guest1f8179
 
PDF
Firefox 3.1 in 3.1 minutes
Thomas Bassetto
 
PPT
Athletic Comparisons
rlracette
 
PDF
Web Components & Shadow DOM
Thomas Bassetto
 
PDF
Wicket Portlet Primer
ate.douma
 
PDF
Integrating Social Apps with Content Driven Sites using Apache Rave and Sprin...
ate.douma
 
PDF
[FR] Capture vidéo avec HTML5
Thomas Bassetto
 
PPT
NHTSA informational powerpoint
kmfox
 
PPT
Ppt Netvibes
karen.bruwiere
 
PPT
Premio World Press Photo 2.008
Roberto Cernuda
 
ODP
Web 2.0 e Social networking: cosa sono, chi li utilizza e chi ci guadagna die...
madero
 
PPT
poetry analysis
lsmith7
 
PPT
Powerpoint Comp Skills Final One
lsmith7
 
PPS
Crystal Pole
Taeyoon Kim
 
PPT
IRUDIEN TXOKOA
eukene
 
PPTX
Ottieni più risultati dal tuo sito web - Joomlday 2014
OffertaInvincibile - Landing Page Efficace
 
PPT
Calendario Asturias 2009
Roberto Cernuda
 
PPT
STORYTELLING 2010
mtejederas1
 
PDF
Energia Alternativa e Utopie Energetiche
madero
 
Claritas B A S E S Restaurant Audit Report
guest1f8179
 
Firefox 3.1 in 3.1 minutes
Thomas Bassetto
 
Athletic Comparisons
rlracette
 
Web Components & Shadow DOM
Thomas Bassetto
 
Wicket Portlet Primer
ate.douma
 
Integrating Social Apps with Content Driven Sites using Apache Rave and Sprin...
ate.douma
 
[FR] Capture vidéo avec HTML5
Thomas Bassetto
 
NHTSA informational powerpoint
kmfox
 
Ppt Netvibes
karen.bruwiere
 
Premio World Press Photo 2.008
Roberto Cernuda
 
Web 2.0 e Social networking: cosa sono, chi li utilizza e chi ci guadagna die...
madero
 
poetry analysis
lsmith7
 
Powerpoint Comp Skills Final One
lsmith7
 
Crystal Pole
Taeyoon Kim
 
IRUDIEN TXOKOA
eukene
 
Ottieni più risultati dal tuo sito web - Joomlday 2014
OffertaInvincibile - Landing Page Efficace
 
Calendario Asturias 2009
Roberto Cernuda
 
STORYTELLING 2010
mtejederas1
 
Energia Alternativa e Utopie Energetiche
madero
 
Ad

Similar to Porting Flashblock to Jetpack Platform (draft) (20)

PDF
Embedding Flash Movies in PDFs for STC11
Lance Robert
 
PDF
orcreatehappyusers
tutorialsruby
 
PDF
orcreatehappyusers
tutorialsruby
 
PDF
SWFObject 2: The fine art of embedding Adobe Flash Player content
Bobby van der Sluis
 
PDF
Jetpack SDK: The new possibility of the extensions on browser
littlebtc
 
PDF
Echelon2010
Gen Kanai
 
PDF
MozTW Jetpack Workshop: Taichung
littlebtc
 
KEY
MozTW Jetpack Workshop: Taipei
littlebtc
 
KEY
Flash And Dom
Mike Wilcox
 
PDF
How do ad blockers work? - WTF Ad Blocking UK, 3/10/16
Digiday
 
PPTX
HTML5 for Rich User Experience
Mahbubur Rahman
 
KEY
HTML5 and the Future of Apps
Tom Croucher
 
PDF
从YUI2到YUI3看前端的演变
Kejun Zhang
 
PPTX
A Brave New World
SensePost
 
PDF
The Listening: Email Client Backdoor
Michael Scovetta
 
PPT
SEO and Flash 3.0
Jonathan Hochman
 
ODP
More Browser Basics, Tips & Tricks 3 Draft 8
msz
 
PDF
Next Generation Browser Add-Ons
Anant Narayanan
 
PPTX
Flash it baby!
Soroush Dalili
 
PPT
Building Buzzword (Flex Camp Boston 2007)
dcoletta
 
Embedding Flash Movies in PDFs for STC11
Lance Robert
 
orcreatehappyusers
tutorialsruby
 
orcreatehappyusers
tutorialsruby
 
SWFObject 2: The fine art of embedding Adobe Flash Player content
Bobby van der Sluis
 
Jetpack SDK: The new possibility of the extensions on browser
littlebtc
 
Echelon2010
Gen Kanai
 
MozTW Jetpack Workshop: Taichung
littlebtc
 
MozTW Jetpack Workshop: Taipei
littlebtc
 
Flash And Dom
Mike Wilcox
 
How do ad blockers work? - WTF Ad Blocking UK, 3/10/16
Digiday
 
HTML5 for Rich User Experience
Mahbubur Rahman
 
HTML5 and the Future of Apps
Tom Croucher
 
从YUI2到YUI3看前端的演变
Kejun Zhang
 
A Brave New World
SensePost
 
The Listening: Email Client Backdoor
Michael Scovetta
 
SEO and Flash 3.0
Jonathan Hochman
 
More Browser Basics, Tips & Tricks 3 Draft 8
msz
 
Next Generation Browser Add-Ons
Anant Narayanan
 
Flash it baby!
Soroush Dalili
 
Building Buzzword (Flex Camp Boston 2007)
dcoletta
 
Ad

Recently uploaded (20)

PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Python basic programing language for automation
DanialHabibi2
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 

Porting Flashblock to Jetpack Platform (draft)

  • 2. WHAT’S FLASHBLOCK? • Flashblock is an extension for the Firefox that blocks ALL Flash content from loading. It then leaves placeholders on the webpage that allow you to click to download and then view the Flash content.
  • 3. WHAT’S JETPACK? • Jetpackis an API for allowing you to write Firefox add-ons using the web technologies you already know (e.g. HTML, CSS and Javascript). • Almostone-clic install and without restart
  • 4. WHAT’S THE PLAN? • The basic algorithm • Some code • What could be improved • Conclusion
  • 5. ALGORITHM Quite simple : • Look for all Flash object • Replace them by a placeholder •A click on a placeholder put the Flash object back
  • 6. ON/OFF BUTTON ON THE STATUS BAR jetpack.statusBar.append({ html: 'Flashblok?<input type="checkbox">', width: 76, onReady: function(widget){ $("input", widget).click(function(){ if( this.checked ){ jetpack.tabs.onReady( removeEmbeds ); removeEmbeds(jetpack.tabs.focused.contentDocument); } else jetpack.tabs.onReady.unbind( removeEmbeds ); }); } });
  • 7. FIND FLASH OBJECTS Better method Lazzy method Search for : function findFlash(doc){ • object[codebase*="swflash.cab"] return $(doc).find('object, embed'); • object[data*=".swf"] } • embed[type="application/x-shockwave-flash"] • etc.
  • 8. REMOVE FLASH function removeEmbeds(doc){ findFlash(doc).each(function() { var placeHolder = createPlaceHolder(...); // Here I put code to remember my removed Flash object placeHolder.click(function(eventObject){ $(this).replaceWith(myDeletedEmbed); }); $(this).replaceWith(placeHolder); // So easy with jQuery }); }
  • 9. PLACEHOLDERS • Full CSS3 • Make use of text-shadow, - moz-box-shadow, -moz- border-radius and -moz-linear- gradient (coming with Firefox 3.6)
  • 10. NEXT STEPS • Block Flash objects sooner • Use simple storage JEP to remember block status • Improve memory footprint • Usethe coming menu JEP • Better way to remember and simple storage one to removed objects provide whitelist management • BlockSilverlight, Authorware, Director, etc. objects
  • 11. CONCLUSION • It’s very easy to develop an extension • Still lacks some features like localisation
  • 12. LINKS • Jetpack official site: http://labs.mozilla.com/jetpack/ • Jetpack tutorial: https://jetpack.mozillalabs.com/tutorial.html • JEPs: https://wiki.mozilla.org/Labs/Jetpack/JEPs • Original Flashblock extension : https://addons.mozilla.org/ firefox/addon/433 • Andfinally Flashblock for Jetpack : http://tb4.fr/labs/jetpack/ flashblock/