SlideShare a Scribd company logo
1 of 95
You Will Need:
• Firefox: firefox.com
• Firebug: getfirebug.com
• Greasemonkey: greasespot.net
• Resources here:
  kentbrewster.com/baychi
Stone Knives, Bear Skins, and
       Greasemonkey:

 Tools for Tearing Down the Walls
 between Engineering and Design

          Kent Brewster
     http://kentbrewster.com
       @kentbrew, most places



  http://kentbrewster.com/baychi
But first, it's time to
play America's favorite
     game show....


  http://kentbrewster.com/baychi
Disclaimerama!




http://kentbrewster.com/baychi
Disclaimerama!

• About Me




   http://kentbrewster.com/baychi
Disclaimerama!

• About Me
• About My Relationship with Netflix



    http://kentbrewster.com/baychi
Disclaimerama!

• About Me
• About My Relationship with Netflix
• About the Code


    http://kentbrewster.com/baychi
About Me




http://kentbrewster.com/baychi
About Me
• No formal education in computer science.




    http://kentbrewster.com/baychi
About Me
• No formal education in computer science.
• No degree of any sort, actually.




    http://kentbrewster.com/baychi
About Me
• No formal education in computer science.
• No degree of any sort, actually.
• Got my start programming in BASIC on a
  TRS-80 in 1977.




    http://kentbrewster.com/baychi
About Me
• No formal education in computer science.
• No degree of any sort, actually.
• Got my start programming in BASIC on a
  TRS-80 in 1977.
• Prototyped the Yahoo! front page in 2008.

    http://kentbrewster.com/baychi
About Me
• No formal education in computer science.
• No degree of any sort, actually.
• Got my start programming in BASIC on a
  TRS-80 in 1977.
• Prototyped the Yahoo! front page in 2008.
• Living proof that just about anybody can do
  this stuff.
    http://kentbrewster.com/baychi
About Me and Netflix




 http://kentbrewster.com/baychi
About Me and Netflix
• None of what I'm about to show is official
  content or opinion, nor will I address
  questions about Netflix. That said....




    http://kentbrewster.com/baychi
About Me and Netflix
• None of what I'm about to show is official
  content or opinion, nor will I address
  questions about Netflix. That said....
• Yeah, it's awesome. If you want to know
  more, visit netflix.com/jobs




    http://kentbrewster.com/baychi
About Me and Netflix
• None of what I'm about to show is official
  content or opinion, nor will I address
  questions about Netflix. That said....
• Yeah, it's awesome. If you want to know
  more, visit netflix.com/jobs

• Do watch that 128-slide corporate culture
  presentation. They are dead serious about
  every single page.
    http://kentbrewster.com/baychi
About the Code




http://kentbrewster.com/baychi
About the Code

• Not great JavaScript examples.




    http://kentbrewster.com/baychi
About the Code

• Not great JavaScript examples.
• Not great Greasemonkey examples, either.



    http://kentbrewster.com/baychi
About the Code

• Not great JavaScript examples.
• Not great Greasemonkey examples, either.
• They don't have to be great.


    http://kentbrewster.com/baychi
About the Code

• Not great JavaScript examples.
• Not great Greasemonkey examples, either.
• They don't have to be great.
• All they have to do is run once, for the
  right person.


    http://kentbrewster.com/baychi
What We Already
 Know About
 Prototyping




http://kentbrewster.com/baychi
What We Already
     Know About
     Prototyping
• Working prototypes work best.



   http://kentbrewster.com/baychi
What We Already
     Know About
     Prototyping
• Working prototypes work best.
• It's very hard to get the experience right.


    http://kentbrewster.com/baychi
What We Already
     Know About
     Prototyping
• Working prototypes work best.
• It's very hard to get the experience right.
• It's expensive. Really, really expensive.

    http://kentbrewster.com/baychi
What We Already
     Know About
     Prototyping
• Working prototypes work best.
• It's very hard to get the experience right.
• It's expensive. Really, really expensive.
• You throw it away when you're done.
    http://kentbrewster.com/baychi
About Engineers




http://kentbrewster.com/baychi
About Engineers
• They already know why what you're asking
  for is impossible, and are already frustrated
  that you're not listening to them when they
  explain why. (Yes, they already know
  everything. That's why they are engineers.)




   http://kentbrewster.com/baychi
About Engineers
• They already know why what you're asking
  for is impossible, and are already frustrated
  that you're not listening to them when they
  explain why. (Yes, they already know
  everything. That's why they are engineers.)
• If they build prototypes for too long, it will
  make them crazy. They will burn out and
  go someplace their work lasts longer and is
  seen by more people.
    http://kentbrewster.com/baychi
How Designers
 See Engineers




http://kentbrewster.com/baychi
How Designers
       See Engineers
• Flinchy.




    http://kentbrewster.com/baychi
How Designers
      See Engineers
• Flinchy.
• Hypersensitive to deadlines.



    http://kentbrewster.com/baychi
How Designers
      See Engineers
• Flinchy.
• Hypersensitive to deadlines.
• Full of reasons why it cannot be done.


    http://kentbrewster.com/baychi
How Designers
      See Engineers
• Flinchy.
• Hypersensitive to deadlines.
• Full of reasons why it cannot be done.
• Full of reasons why it should not be done.

    http://kentbrewster.com/baychi
How Engineers
  See Designers




http://kentbrewster.com/baychi
How Engineers
       See Designers
• Flighty.




    http://kentbrewster.com/baychi
How Engineers
      See Designers
• Flighty.
• Unable to understand the concept that
  time continues to progress at the rate of
  one second per second, no matter what.




   http://kentbrewster.com/baychi
How Engineers
       See Designers
• Flighty.
• Unable to understand the concept that
  time continues to progress at the rate of
  one second per second, no matter what.
• Full of reasons why it has to be done even
  though it cannot (and should not, dammit!)
  be done.
    http://kentbrewster.com/baychi
Tearing Down the Wall




  http://kentbrewster.com/baychi
Tearing Down the Wall
• Involve your engineers early.




    http://kentbrewster.com/baychi
Tearing Down the Wall
• Involve your engineers early.
• Ask for help before the important choices
  have already been made.




   http://kentbrewster.com/baychi
Tearing Down the Wall
• Involve your engineers early.
• Ask for help before the important choices
  have already been made.
• Please don't ask for the logo to spin and be
  on fire.




    http://kentbrewster.com/baychi
Tearing Down the Wall
• Involve your engineers early.
• Ask for help before the important choices
  have already been made.
• Please don't ask for the logo to spin and be
  on fire.
• Other non-starters: IE6 support for
  rounded corners, drop shadows, and PNG
  transparency. Don't even go there.
    http://kentbrewster.com/baychi
Plan B: Do It Yourself




 http://kentbrewster.com/baychi
Plan B: Do It Yourself
• If what you are looking for is an
  incremental change, try building it.




    http://kentbrewster.com/baychi
Plan B: Do It Yourself
• If what you are looking for is an
  incremental change, try building it.
• It will work well enough to show to your
  boss, or to a user test group.




    http://kentbrewster.com/baychi
Plan B: Do It Yourself
• If what you are looking for is an
  incremental change, try building it.
• It will work well enough to show to your
  boss, or to a user test group.
• When you show it to an engineer, she will
  be impressed with your commitment and
  initiative, and much more likely to want to
  help out when the project gets real.
    http://kentbrewster.com/baychi
Strategy




http://kentbrewster.com/baychi
Strategy
• Bring up the page in your browser.
• After it renders, make changes to the
  structure, presentation, and behavior.
• Do this by injecting JavaScript into the
  browser.
• For best results, do this automatically
  when the page loads.

   http://kentbrewster.com/baychi
JavaScript Injection




http://kentbrewster.com/baychi
JavaScript Injection
• from the console:
  javascript:alert('ding');




    http://kentbrewster.com/baychi
JavaScript Injection
• from the console:
  javascript:alert('ding');
• with a toolbar bookmarklet


    http://kentbrewster.com/baychi
JavaScript Injection
• from the console:
  javascript:alert('ding');
• with a toolbar bookmarklet
• with a scripting tool, such as Greasemonkey

    http://kentbrewster.com/baychi
Toolbar Bookmarklets




 http://kentbrewster.com/baychi
Toolbar Bookmarklets
• limited in size (~2000 characters)




   http://kentbrewster.com/baychi
Toolbar Bookmarklets
• limited in size (~2000 characters)
• tricky to set up for installation




   http://kentbrewster.com/baychi
Toolbar Bookmarklets
• limited in size (~2000 characters)
• tricky to set up for installation
• hard to debug



   http://kentbrewster.com/baychi
Toolbar Bookmarklets
• limited in size (~2000 characters)
• tricky to set up for installation
• hard to debug
• very powerful: can include foreign scripts


   http://kentbrewster.com/baychi
Toolbar Bookmarklets
• limited in size (~2000 characters)
• tricky to set up for installation
• hard to debug
• very powerful: can include foreign scripts
• have to be installed, managed, and manually
  clicked with every page load


   http://kentbrewster.com/baychi
Bookmarklet Examples
 <a href="javascript:alert('ding');">Annoy Me</a>

 <a href="javascript:(function(){var
 %20a=document.getElementsByTagName('A');for(i=0;i<a
 .length;i++){a[i].style.color='#f00';}})();">Turn
 My Links Red</a>

 <a href="javascript:(function(){var
 %20t=document.getElementsByTagName('TITLE')
 [0];t.textContent='HACKED! '+t.textContent;})
 ();">Hack My Title</a>




   http://kentbrewster.com/baychi
Greasemonkey Scripts




  http://kentbrewster.com/baychi
Greasemonkey Scripts
• Do exactly what toolbar bookmarklets do:
  modify the page after it's loaded.




    http://kentbrewster.com/baychi
Greasemonkey Scripts
• Do exactly what toolbar bookmarklets do:
  modify the page after it's loaded.
• Can be much more complex; have local
  storage and a robust API.




    http://kentbrewster.com/baychi
Greasemonkey Scripts
• Do exactly what toolbar bookmarklets do:
  modify the page after it's loaded.
• Can be much more complex; have local
  storage and a robust API.
• Have a much better development
  environment, right there in Firefox.



    http://kentbrewster.com/baychi
Greasemonkey Scripts
• Do exactly what toolbar bookmarklets do:
  modify the page after it's loaded.
• Can be much more complex; have local
  storage and a robust API.
• Have a much better development
  environment, right there in Firefox.
• Work automatically, with every page load.
    http://kentbrewster.com/baychi
Fixing Your Editor




http://kentbrewster.com/baychi
Fixing Your Editor
• Enter about:config




   http://kentbrewster.com/baychi
Fixing Your Editor
• Enter about:config
• Reassure Firefox that you know what
  you're doing.




    http://kentbrewster.com/baychi
Fixing Your Editor
• Enter about:config
• Reassure Firefox that you know what
  you're doing.
• Enter greasemonkey   in Filter.




    http://kentbrewster.com/baychi
Fixing Your Editor
• Enter about:config
• Reassure Firefox that you know what
  you're doing.
• Enter greasemonkey in Filter.
• Click greasemonkey.editor and pick
  your favored editor. I'll be using TextMate
  tonight.
    http://kentbrewster.com/baychi
Load Your Script
Load Your Script
• Go back to kentbrewster.com/baychi
Load Your Script
• Go back to kentbrewster.com/baychi
• Make sure Greasemonkey is running. (You
  should see a smiling brown monkey, not a
  constipated-looking gray monkey).
Load Your Script
• Go back to kentbrewster.com/baychi
• Make sure Greasemonkey is running. (You
  should see a smiling brown monkey, not a
  constipated-looking gray monkey).

• Click the view    raw link at the bottom of
  the page after the script listing, and then
  Install in the Greasemonkey add box.
Load Your Script
• Go back to kentbrewster.com/baychi
• Make sure Greasemonkey is running. (You
  should see a smiling brown monkey, not a
  constipated-looking gray monkey).

• Click the view    raw link at the bottom of
  the page after the script listing, and then
  Install in the Greasemonkey add box.
• Go to twitter.com and see if you notice
  anything different.
Edit Your Script




http://kentbrewster.com/baychi
Edit Your Script
• Right-click the monkey at the bottom of
  your page.




  http://kentbrewster.com/baychi
Edit Your Script
• Right-click the monkey at the bottom of
  your page.
• Choose Manage User Scripts




  http://kentbrewster.com/baychi
Edit Your Script
• Right-click the monkey at the bottom of
  your page.
• Choose Manage User Scripts
• Monkeying with Twitter should be
  highlighted; if it isn't, click it.




  http://kentbrewster.com/baychi
Edit Your Script
• Right-click the monkey at the bottom of
  your page.
• Choose Manage User Scripts
• Monkeying with Twitter should be
  highlighted; if it isn't, click it.
• Click the Edit button at the bottom left.
  Your editor should launch.


  http://kentbrewster.com/baychi
Edit Your Script
• Right-click the monkey at the bottom of
  your page.
• Choose Manage User Scripts
• Monkeying with Twitter should be
  highlighted; if it isn't, click it.
• Click the Edit button at the bottom left.
  Your editor should launch.
• Make changes, save, and reload the page.
  http://kentbrewster.com/baychi
Intermission


 (In which much hacking occurs.)




http://kentbrewster.com/baychi
Sharing Your Scripts




http://kentbrewster.com/baychi
Sharing Your Scripts
• In your editor, do Save As




    http://kentbrewster.com/baychi
Sharing Your Scripts
• In your editor, do Save As
• Name your script yourfile.user.js



   http://kentbrewster.com/baychi
Sharing Your Scripts
• In your editor, do Save As
• Name your script yourfile.user.js
• Save it to your desktop.


   http://kentbrewster.com/baychi
Sharing Your Scripts
• In your editor, do Save As
• Name your script yourfile.user.js
• Save it to your desktop.
• To install somewhere else, make sure
  Greasemonkey is enabled and drag it into
  the browser.

   http://kentbrewster.com/baychi
All Done?




http://kentbrewster.com/baychi
All Done?

• Don't forget to disable Greasemonkey. Do
  this by clicking the little brown monkey-
  face and making it turn gray.




    http://kentbrewster.com/baychi
All Done?

• Don't forget to disable Greasemonkey. Do
  this by clicking the little brown monkey-
  face and making it turn gray.
• Or, maybe you want to leave him running.
  Find more monkey-powered awesomeness
  at userscripts.org


    http://kentbrewster.com/baychi
Recommended Reading




  http://kentbrewster.com/baychi
Recommended Reading

• Mark Pilgrim's Dive Into Greasemonkey
  (outdated, but still useful):
  diveintogreasemonkey.org




    http://kentbrewster.com/baychi
Recommended Reading

• Mark Pilgrim's Dive Into Greasemonkey
  (outdated, but still useful):
  diveintogreasemonkey.org

• The Greasemonkey wiki:
  wiki.greasespot.net




    http://kentbrewster.com/baychi
Questions?
              Kent Brewster
        http://kentbrewster.com

@kentbrew on the remaining social networks that
         haven't kicked me off yet.

     http://developer.netflix.com



     http://kentbrewster.com/baychi

More Related Content

Recently uploaded

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
🐬 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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 

Recently uploaded (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

BayCHI 5/11/2010 Greasemonkey Intro

  • 1. You Will Need: • Firefox: firefox.com • Firebug: getfirebug.com • Greasemonkey: greasespot.net • Resources here: kentbrewster.com/baychi
  • 2. Stone Knives, Bear Skins, and Greasemonkey: Tools for Tearing Down the Walls between Engineering and Design Kent Brewster http://kentbrewster.com @kentbrew, most places http://kentbrewster.com/baychi
  • 3. But first, it's time to play America's favorite game show.... http://kentbrewster.com/baychi
  • 5. Disclaimerama! • About Me http://kentbrewster.com/baychi
  • 6. Disclaimerama! • About Me • About My Relationship with Netflix http://kentbrewster.com/baychi
  • 7. Disclaimerama! • About Me • About My Relationship with Netflix • About the Code http://kentbrewster.com/baychi
  • 9. About Me • No formal education in computer science. http://kentbrewster.com/baychi
  • 10. About Me • No formal education in computer science. • No degree of any sort, actually. http://kentbrewster.com/baychi
  • 11. About Me • No formal education in computer science. • No degree of any sort, actually. • Got my start programming in BASIC on a TRS-80 in 1977. http://kentbrewster.com/baychi
  • 12. About Me • No formal education in computer science. • No degree of any sort, actually. • Got my start programming in BASIC on a TRS-80 in 1977. • Prototyped the Yahoo! front page in 2008. http://kentbrewster.com/baychi
  • 13. About Me • No formal education in computer science. • No degree of any sort, actually. • Got my start programming in BASIC on a TRS-80 in 1977. • Prototyped the Yahoo! front page in 2008. • Living proof that just about anybody can do this stuff. http://kentbrewster.com/baychi
  • 14. About Me and Netflix http://kentbrewster.com/baychi
  • 15. About Me and Netflix • None of what I'm about to show is official content or opinion, nor will I address questions about Netflix. That said.... http://kentbrewster.com/baychi
  • 16. About Me and Netflix • None of what I'm about to show is official content or opinion, nor will I address questions about Netflix. That said.... • Yeah, it's awesome. If you want to know more, visit netflix.com/jobs http://kentbrewster.com/baychi
  • 17. About Me and Netflix • None of what I'm about to show is official content or opinion, nor will I address questions about Netflix. That said.... • Yeah, it's awesome. If you want to know more, visit netflix.com/jobs • Do watch that 128-slide corporate culture presentation. They are dead serious about every single page. http://kentbrewster.com/baychi
  • 19. About the Code • Not great JavaScript examples. http://kentbrewster.com/baychi
  • 20. About the Code • Not great JavaScript examples. • Not great Greasemonkey examples, either. http://kentbrewster.com/baychi
  • 21. About the Code • Not great JavaScript examples. • Not great Greasemonkey examples, either. • They don't have to be great. http://kentbrewster.com/baychi
  • 22. About the Code • Not great JavaScript examples. • Not great Greasemonkey examples, either. • They don't have to be great. • All they have to do is run once, for the right person. http://kentbrewster.com/baychi
  • 23. What We Already Know About Prototyping http://kentbrewster.com/baychi
  • 24. What We Already Know About Prototyping • Working prototypes work best. http://kentbrewster.com/baychi
  • 25. What We Already Know About Prototyping • Working prototypes work best. • It's very hard to get the experience right. http://kentbrewster.com/baychi
  • 26. What We Already Know About Prototyping • Working prototypes work best. • It's very hard to get the experience right. • It's expensive. Really, really expensive. http://kentbrewster.com/baychi
  • 27. What We Already Know About Prototyping • Working prototypes work best. • It's very hard to get the experience right. • It's expensive. Really, really expensive. • You throw it away when you're done. http://kentbrewster.com/baychi
  • 29. About Engineers • They already know why what you're asking for is impossible, and are already frustrated that you're not listening to them when they explain why. (Yes, they already know everything. That's why they are engineers.) http://kentbrewster.com/baychi
  • 30. About Engineers • They already know why what you're asking for is impossible, and are already frustrated that you're not listening to them when they explain why. (Yes, they already know everything. That's why they are engineers.) • If they build prototypes for too long, it will make them crazy. They will burn out and go someplace their work lasts longer and is seen by more people. http://kentbrewster.com/baychi
  • 31. How Designers See Engineers http://kentbrewster.com/baychi
  • 32. How Designers See Engineers • Flinchy. http://kentbrewster.com/baychi
  • 33. How Designers See Engineers • Flinchy. • Hypersensitive to deadlines. http://kentbrewster.com/baychi
  • 34. How Designers See Engineers • Flinchy. • Hypersensitive to deadlines. • Full of reasons why it cannot be done. http://kentbrewster.com/baychi
  • 35. How Designers See Engineers • Flinchy. • Hypersensitive to deadlines. • Full of reasons why it cannot be done. • Full of reasons why it should not be done. http://kentbrewster.com/baychi
  • 36. How Engineers See Designers http://kentbrewster.com/baychi
  • 37. How Engineers See Designers • Flighty. http://kentbrewster.com/baychi
  • 38. How Engineers See Designers • Flighty. • Unable to understand the concept that time continues to progress at the rate of one second per second, no matter what. http://kentbrewster.com/baychi
  • 39. How Engineers See Designers • Flighty. • Unable to understand the concept that time continues to progress at the rate of one second per second, no matter what. • Full of reasons why it has to be done even though it cannot (and should not, dammit!) be done. http://kentbrewster.com/baychi
  • 40. Tearing Down the Wall http://kentbrewster.com/baychi
  • 41. Tearing Down the Wall • Involve your engineers early. http://kentbrewster.com/baychi
  • 42. Tearing Down the Wall • Involve your engineers early. • Ask for help before the important choices have already been made. http://kentbrewster.com/baychi
  • 43. Tearing Down the Wall • Involve your engineers early. • Ask for help before the important choices have already been made. • Please don't ask for the logo to spin and be on fire. http://kentbrewster.com/baychi
  • 44. Tearing Down the Wall • Involve your engineers early. • Ask for help before the important choices have already been made. • Please don't ask for the logo to spin and be on fire. • Other non-starters: IE6 support for rounded corners, drop shadows, and PNG transparency. Don't even go there. http://kentbrewster.com/baychi
  • 45. Plan B: Do It Yourself http://kentbrewster.com/baychi
  • 46. Plan B: Do It Yourself • If what you are looking for is an incremental change, try building it. http://kentbrewster.com/baychi
  • 47. Plan B: Do It Yourself • If what you are looking for is an incremental change, try building it. • It will work well enough to show to your boss, or to a user test group. http://kentbrewster.com/baychi
  • 48. Plan B: Do It Yourself • If what you are looking for is an incremental change, try building it. • It will work well enough to show to your boss, or to a user test group. • When you show it to an engineer, she will be impressed with your commitment and initiative, and much more likely to want to help out when the project gets real. http://kentbrewster.com/baychi
  • 50. Strategy • Bring up the page in your browser. • After it renders, make changes to the structure, presentation, and behavior. • Do this by injecting JavaScript into the browser. • For best results, do this automatically when the page loads. http://kentbrewster.com/baychi
  • 52. JavaScript Injection • from the console: javascript:alert('ding'); http://kentbrewster.com/baychi
  • 53. JavaScript Injection • from the console: javascript:alert('ding'); • with a toolbar bookmarklet http://kentbrewster.com/baychi
  • 54. JavaScript Injection • from the console: javascript:alert('ding'); • with a toolbar bookmarklet • with a scripting tool, such as Greasemonkey http://kentbrewster.com/baychi
  • 56. Toolbar Bookmarklets • limited in size (~2000 characters) http://kentbrewster.com/baychi
  • 57. Toolbar Bookmarklets • limited in size (~2000 characters) • tricky to set up for installation http://kentbrewster.com/baychi
  • 58. Toolbar Bookmarklets • limited in size (~2000 characters) • tricky to set up for installation • hard to debug http://kentbrewster.com/baychi
  • 59. Toolbar Bookmarklets • limited in size (~2000 characters) • tricky to set up for installation • hard to debug • very powerful: can include foreign scripts http://kentbrewster.com/baychi
  • 60. Toolbar Bookmarklets • limited in size (~2000 characters) • tricky to set up for installation • hard to debug • very powerful: can include foreign scripts • have to be installed, managed, and manually clicked with every page load http://kentbrewster.com/baychi
  • 61. Bookmarklet Examples <a href="javascript:alert('ding');">Annoy Me</a> <a href="javascript:(function(){var %20a=document.getElementsByTagName('A');for(i=0;i<a .length;i++){a[i].style.color='#f00';}})();">Turn My Links Red</a> <a href="javascript:(function(){var %20t=document.getElementsByTagName('TITLE') [0];t.textContent='HACKED! '+t.textContent;}) ();">Hack My Title</a> http://kentbrewster.com/baychi
  • 62. Greasemonkey Scripts http://kentbrewster.com/baychi
  • 63. Greasemonkey Scripts • Do exactly what toolbar bookmarklets do: modify the page after it's loaded. http://kentbrewster.com/baychi
  • 64. Greasemonkey Scripts • Do exactly what toolbar bookmarklets do: modify the page after it's loaded. • Can be much more complex; have local storage and a robust API. http://kentbrewster.com/baychi
  • 65. Greasemonkey Scripts • Do exactly what toolbar bookmarklets do: modify the page after it's loaded. • Can be much more complex; have local storage and a robust API. • Have a much better development environment, right there in Firefox. http://kentbrewster.com/baychi
  • 66. Greasemonkey Scripts • Do exactly what toolbar bookmarklets do: modify the page after it's loaded. • Can be much more complex; have local storage and a robust API. • Have a much better development environment, right there in Firefox. • Work automatically, with every page load. http://kentbrewster.com/baychi
  • 68. Fixing Your Editor • Enter about:config http://kentbrewster.com/baychi
  • 69. Fixing Your Editor • Enter about:config • Reassure Firefox that you know what you're doing. http://kentbrewster.com/baychi
  • 70. Fixing Your Editor • Enter about:config • Reassure Firefox that you know what you're doing. • Enter greasemonkey in Filter. http://kentbrewster.com/baychi
  • 71. Fixing Your Editor • Enter about:config • Reassure Firefox that you know what you're doing. • Enter greasemonkey in Filter. • Click greasemonkey.editor and pick your favored editor. I'll be using TextMate tonight. http://kentbrewster.com/baychi
  • 73. Load Your Script • Go back to kentbrewster.com/baychi
  • 74. Load Your Script • Go back to kentbrewster.com/baychi • Make sure Greasemonkey is running. (You should see a smiling brown monkey, not a constipated-looking gray monkey).
  • 75. Load Your Script • Go back to kentbrewster.com/baychi • Make sure Greasemonkey is running. (You should see a smiling brown monkey, not a constipated-looking gray monkey). • Click the view raw link at the bottom of the page after the script listing, and then Install in the Greasemonkey add box.
  • 76. Load Your Script • Go back to kentbrewster.com/baychi • Make sure Greasemonkey is running. (You should see a smiling brown monkey, not a constipated-looking gray monkey). • Click the view raw link at the bottom of the page after the script listing, and then Install in the Greasemonkey add box. • Go to twitter.com and see if you notice anything different.
  • 78. Edit Your Script • Right-click the monkey at the bottom of your page. http://kentbrewster.com/baychi
  • 79. Edit Your Script • Right-click the monkey at the bottom of your page. • Choose Manage User Scripts http://kentbrewster.com/baychi
  • 80. Edit Your Script • Right-click the monkey at the bottom of your page. • Choose Manage User Scripts • Monkeying with Twitter should be highlighted; if it isn't, click it. http://kentbrewster.com/baychi
  • 81. Edit Your Script • Right-click the monkey at the bottom of your page. • Choose Manage User Scripts • Monkeying with Twitter should be highlighted; if it isn't, click it. • Click the Edit button at the bottom left. Your editor should launch. http://kentbrewster.com/baychi
  • 82. Edit Your Script • Right-click the monkey at the bottom of your page. • Choose Manage User Scripts • Monkeying with Twitter should be highlighted; if it isn't, click it. • Click the Edit button at the bottom left. Your editor should launch. • Make changes, save, and reload the page. http://kentbrewster.com/baychi
  • 83. Intermission (In which much hacking occurs.) http://kentbrewster.com/baychi
  • 85. Sharing Your Scripts • In your editor, do Save As http://kentbrewster.com/baychi
  • 86. Sharing Your Scripts • In your editor, do Save As • Name your script yourfile.user.js http://kentbrewster.com/baychi
  • 87. Sharing Your Scripts • In your editor, do Save As • Name your script yourfile.user.js • Save it to your desktop. http://kentbrewster.com/baychi
  • 88. Sharing Your Scripts • In your editor, do Save As • Name your script yourfile.user.js • Save it to your desktop. • To install somewhere else, make sure Greasemonkey is enabled and drag it into the browser. http://kentbrewster.com/baychi
  • 90. All Done? • Don't forget to disable Greasemonkey. Do this by clicking the little brown monkey- face and making it turn gray. http://kentbrewster.com/baychi
  • 91. All Done? • Don't forget to disable Greasemonkey. Do this by clicking the little brown monkey- face and making it turn gray. • Or, maybe you want to leave him running. Find more monkey-powered awesomeness at userscripts.org http://kentbrewster.com/baychi
  • 92. Recommended Reading http://kentbrewster.com/baychi
  • 93. Recommended Reading • Mark Pilgrim's Dive Into Greasemonkey (outdated, but still useful): diveintogreasemonkey.org http://kentbrewster.com/baychi
  • 94. Recommended Reading • Mark Pilgrim's Dive Into Greasemonkey (outdated, but still useful): diveintogreasemonkey.org • The Greasemonkey wiki: wiki.greasespot.net http://kentbrewster.com/baychi
  • 95. Questions? Kent Brewster http://kentbrewster.com @kentbrew on the remaining social networks that haven't kicked me off yet. http://developer.netflix.com http://kentbrewster.com/baychi

Editor's Notes