< Return to Video

11.1: Introduction to Chrome Extensions - Programming with Text

  • 0:00 - 0:05
    Hello. Welcome to another session for the
  • 0:05 - 0:08
    course Programming from A to Z. And
  • 0:08 - 0:10
    except that you're watching this
  • 0:10 - 0:13
    video, it's called Programming with Text
  • 0:13 - 0:15
    on YouTube because programming from A to
  • 0:15 - 0:17
    Z sounds like it's a beginner course, and
  • 0:17 - 0:19
    this course is really for people who have
  • 0:19 - 0:21
    already gone through my Foundations of
  • 0:21 - 0:23
    JavaScript stuff, and who want to do more
  • 0:23 - 0:24
    things with programming with text –
  • 0:24 - 0:27
    generating text, analyzing text, and a lot
  • 0:27 - 0:30
    of different things like that. So,
  • 0:30 - 0:32
    what is this playlist going to
  • 0:32 - 0:34
    be about? This playlist is about Chrome
  • 0:34 - 0:37
    extensions and a word that I can't say,
  • 0:37 - 0:39
    bookmarklets. I like to say "bookmark-lay"
  • 0:39 - 0:42
    No, that doesn't make any sense. That was like
  • 0:42 - 0:44
    the French for the bookmark-lay? No.
  • 0:44 - 0:45
    Bookmarklets. It's very hard to say.
  • 0:45 - 0:48
    Bookmarklets. So why is this
  • 0:48 - 0:51
    interesting? Why is this important? So all
  • 0:51 - 0:54
    of my sessions in this particular course
  • 0:54 - 0:57
    have all been about – I mean this is not
  • 0:57 - 1:00
    entirely true – but this is a web browser.
  • 1:00 - 1:02
    The sessions have all been about
  • 1:02 - 1:06
    programming, kind of, what happens inside
  • 1:06 - 1:10
    here – inside the actual content of the
  • 1:10 - 1:13
    page – by creating your own – I know – It's a
  • 1:13 - 1:15
    vacuum cleaner because I live in the
  • 1:15 - 1:18
    real world where things happen, like
  • 1:18 - 1:23
    vacuuming. But I'm gonna just go on.
  • 1:23 - 1:25
    Sometimes, my mind lives in its own
  • 1:25 - 1:27
    universe though, which hopefully, makes
  • 1:27 - 1:30
    these videos somewhat watchable, but, or
  • 1:30 - 1:32
    not anyway. So, this is what we've been
  • 1:32 - 1:35
    focusing on. And maybe you make an HTML
  • 1:35 - 1:39
    file, and a JavaScript file, all sorts of
  • 1:39 - 1:43
    things to make things happen in here. But
  • 1:43 - 1:45
    working with text. So you make
  • 1:45 - 1:47
    a web page. It generates a poem and it
  • 1:47 - 1:49
    makes a chatbot with the user. All these
  • 1:49 - 1:51
    kinds of things that I've looked at.
  • 1:51 - 1:54
    Analyzes text that a user typed in. But
  • 1:54 - 1:56
    what if what you really want to do is
  • 1:56 - 1:59
    affect the browsing experience as a
  • 1:59 - 2:02
    whole? So what if what you want to do is
  • 2:02 - 2:04
    say when the user is on the website
  • 2:04 - 2:06
    github, or when the user is on the
  • 2:06 - 2:09
    website of a particular newspaper, their
  • 2:09 - 2:12
    experience that user's experience of
  • 2:12 - 2:13
    browsing that web
  • 2:13 - 2:16
    page changes. Now this is typically done –
  • 2:16 - 2:19
    and so, a way to do this is with two
  • 2:19 - 2:22
    different things. One is called a
  • 2:22 - 2:26
    bookmarklet, which is a way of creating a
  • 2:26 - 2:29
    simple bookmark button that can live up
  • 2:29 - 2:33
    here that can run some JavaScript code
  • 2:33 - 2:36
    to alter and change your view of the
  • 2:36 - 2:39
    current web page you're on. The other is
  • 2:39 - 2:43
    called a Chrome extension. Now you can
  • 2:43 - 2:48
    imagine here the reason, sort of, one
  • 2:48 - 2:50
    limitation of me making this
  • 2:50 - 2:52
    tutorial video is that it is a Chrome
  • 2:52 - 2:55
    extension. It is only for the browser
  • 2:55 - 2:58
    Chrome. But it allows you to essentially
  • 2:58 - 3:00
    make – If you think about Chrome like you
  • 3:00 - 3:02
    might think about your phone, you can
  • 3:02 - 3:04
    develop an app for your phone to alter
  • 3:04 - 3:06
    your experience of using your phone – a
  • 3:06 - 3:08
    Chrome extension is like an app for the
  • 3:08 - 3:11
    web browser Chrome itself that allows
  • 3:11 - 3:12
    you to alter the behavior of the browser
  • 3:12 - 3:15
    beyond just what's happening in the page.
  • 3:15 - 3:17
    So you can add interface elements, you
  • 3:17 - 3:19
    can know about what people are typing
  • 3:19 - 3:21
    into the address bar, you can create a
  • 3:21 - 3:23
    page that shows up whenever somebody has
  • 3:23 - 3:25
    a new tab. You could know that somebody
  • 3:25 - 3:28
    said "new tab," you could know –
  • 3:28 - 3:30
    you could pop up a timer whenever a
  • 3:30 - 3:33
    user is on some sort of
  • 3:33 - 3:35
    social media website to tell them, "You
  • 3:35 - 3:36
    only have five more minutes to look at
  • 3:36 - 3:38
    this website and then close the tab for
  • 3:38 - 3:40
    them anything you could do to alter
  • 3:40 - 3:43
    subvert change the browsing experience
  • 3:43 - 3:45
    now this exists as a business model
  • 3:45 - 3:48
    because companies can make Chrome
  • 3:48 - 3:49
    extensions to you know offer you a
  • 3:49 - 3:54
    coupon or I don't know have pop-up chat
  • 3:54 - 3:56
    pop-up that get offers to give you help
  • 3:56 - 3:58
    on that page I use a Chrome extension
  • 3:58 - 4:00
    called two buddy I'm now projecting out
  • 4:00 - 4:02
    by accident promoting which gives me
  • 4:02 - 4:05
    extra features to see how to manipulate
  • 4:05 - 4:07
    and know my stats and all the sort of
  • 4:07 - 4:09
    stuff while I'm browsing YouTube so
  • 4:09 - 4:11
    that's really but what I want to think
  • 4:11 - 4:15
    about in this playlist are this idea I'm
  • 4:15 - 4:16
    just gonna call it for lack of a better
  • 4:16 - 4:18
    word creative Chrome extensions so what
  • 4:18 - 4:20
    if you use a crow what if you create a
  • 4:20 - 4:23
    Chrome extension to subvert distort
  • 4:23 - 4:25
    change our browsing experience for the
  • 4:25 - 4:27
    purpose of social commentary
  • 4:27 - 4:30
    or art or activism and I should mention
  • 4:30 - 4:31
    there's something important about this
  • 4:31 - 4:33
    this is not something that you can just
  • 4:33 - 4:36
    put on somebody's computer you can make
  • 4:36 - 4:38
    a webpage put it on a web server email
  • 4:38 - 4:41
    all your friends they come to my webpage
  • 4:41 - 4:44
    but you you can't put a Chrome extension
  • 4:44 - 4:46
    on somebody's computer without them
  • 4:46 - 4:48
    opting into that we'll see that in a
  • 4:48 - 4:49
    moment as we look at the Chrome
  • 4:49 - 4:49
    extension
  • 4:49 - 4:52
    store however I'm not really in this
  • 4:52 - 4:54
    playlist going to focus at all about how
  • 4:54 - 4:56
    you can deploy your Chrome extension to
  • 4:56 - 4:57
    the store I'm gonna show you how to use
  • 4:57 - 4:59
    a Chrome extension in what's called
  • 4:59 - 5:03
    developer mode so you can write and
  • 5:03 - 5:05
    create and debug and edit and change
  • 5:05 - 5:07
    your Chrome extension right there on
  • 5:07 - 5:09
    your own computer if it's something that
  • 5:09 - 5:11
    you then want to distribute you can
  • 5:11 - 5:14
    package it and put it into the chrome
  • 5:14 - 5:16
    store and I'm just super some kind of
  • 5:16 - 5:18
    approval process there but we're gonna
  • 5:18 - 5:19
    stay with a sort of local development
  • 5:19 - 5:22
    environment so this is kind of the
  • 5:22 - 5:26
    overall picture and so in the first two
  • 5:26 - 5:28
    first tutorial what I'm going to do is
  • 5:28 - 5:31
    has a warm up kind of looking a
  • 5:31 - 5:34
    bookmarklet which is kind of a much
  • 5:34 - 5:39
    simpler lower look lower barrier of
  • 5:39 - 5:40
    entry point to just do something
  • 5:40 - 5:42
    interesting with manipulating the
  • 5:42 - 5:43
    browsing experience so I'm gonna start
  • 5:43 - 5:45
    with that and that so if you--if you
  • 5:45 - 5:46
    want to get to the code stuff you can
  • 5:46 - 5:48
    stop this video now just go to the next
  • 5:48 - 5:52
    one but what I'm going to do before I
  • 5:52 - 5:53
    get to that is let's look at some
  • 5:53 - 5:54
    examples of some different Chrome
  • 5:54 - 5:56
    extensions all right so let's look at a
  • 5:56 - 5:58
    couple examples of things that I'm
  • 5:58 - 6:00
    thinking about this is a bookmarklet
  • 6:00 - 6:04
    called the deletion ascent to me on
  • 6:04 - 6:06
    Twitter and I believe it actually
  • 6:06 - 6:07
    relates to something that I did a
  • 6:07 - 6:09
    previous video about erase your poetry
  • 6:09 - 6:11
    kind of which is that let's try it so a
  • 6:11 - 6:14
    bookmarklet is a thing that I can drag
  • 6:14 - 6:18
    into the bookmark bar and then in theory
  • 6:18 - 6:22
    when I press this button ooh
  • 6:22 - 6:27
    it got rid of stuff so let's go to let's
  • 6:27 - 6:31
    go to github.com and let me click the
  • 6:31 - 6:34
    deletion nest well and it got rid this
  • 6:34 - 6:36
    is actually very very similar to one of
  • 6:36 - 6:38
    my favorite bookmarklets called wordless
  • 6:38 - 6:40
    web which actually gets rid of
  • 6:40 - 6:43
    everything on a webpage that is text
  • 6:43 - 6:44
    which has some really surprising and
  • 6:44 - 6:47
    interesting effects trying to think of
  • 6:47 - 6:49
    one more website that's not going to
  • 6:49 - 6:51
    make me feel so awkward and
  • 6:51 - 6:54
    uncomfortable to go to to demonstrate
  • 6:54 - 6:56
    this idea but anyway I encourage you to
  • 6:56 - 6:58
    play with the deletion so this is
  • 6:58 - 6:59
    something I'm Mabel will make a
  • 6:59 - 7:02
    bookmarklet that replaces every image on
  • 7:02 - 7:04
    the webpage with like kitten kitten
  • 7:04 - 7:06
    images or something like that we'll do
  • 7:06 - 7:10
    that another Chrome extension that I
  • 7:10 - 7:11
    wanted to show you is by one of my
  • 7:11 - 7:14
    favorite artists um addy wagenknecht her
  • 7:14 - 7:17
    website is places I've never been calm
  • 7:17 - 7:19
    this is a Chrome extension that she
  • 7:19 - 7:22
    created called girls versus get I'll
  • 7:22 - 7:24
    just read to you what it does every
  • 7:24 - 7:26
    username on github is replaced with a
  • 7:26 - 7:27
    generic female username every Gravatar
  • 7:27 - 7:29
    is a place with a Gravatar of a woman or
  • 7:29 - 7:33
    female type image why there is a death
  • 7:33 - 7:34
    of women contribute to open source
  • 7:34 - 7:36
    software this plug-in is presented as a
  • 7:36 - 7:38
    filter to challenge assumptions about
  • 7:38 - 7:39
    gender roles and software and to rewire
  • 7:39 - 7:42
    your brain so you can see here you can
  • 7:42 - 7:44
    imagine this is a chrome one something
  • 7:44 - 7:45
    you can do with a Chrome extension is it
  • 7:45 - 7:47
    only activates when you're on certain
  • 7:47 - 7:50
    web pages and changes your view of that
  • 7:50 - 7:51
    web page and so you can see this is uh
  • 7:51 - 7:54
    this is on github I will include links
  • 7:54 - 7:56
    to all these chrome extensions and
  • 7:56 - 7:59
    bookmarklets in the video description
  • 7:59 - 8:01
    I'm going to come back to wordless web
  • 8:01 - 8:05
    this is a Chrome extension that was
  • 8:05 - 8:08
    submitted by I'm just want to make sure
  • 8:08 - 8:10
    I have the right name looking in the
  • 8:10 - 8:12
    slack channel here
  • 8:12 - 8:17
    I believe sorry Noah van boven I
  • 8:17 - 8:18
    apologize for pronouncing the name
  • 8:18 - 8:19
    incorrectly called
  • 8:19 - 8:22
    Web Paint. Let's try adding it. So if you
  • 8:22 - 8:24
    make a Chrome extension that's in the
  • 8:24 - 8:27
    actual Chrome Extension Store, you can
  • 8:27 - 8:31
    just go and hit "Add to Chrome" – Now here's
  • 8:31 - 8:33
    something really important. This is what
  • 8:33 - 8:35
    I mean by opting in. Chrome extensions
  • 8:35 - 8:38
    get a lot more permission to do stuff
  • 8:38 - 8:40
    beyond what you would normally have just
  • 8:40 - 8:43
    in a generic, regular web page. So this
  • 8:43 - 8:44
    Chrome extension says it can read and
  • 8:44 - 8:46
    change all your data on the websites you
  • 8:46 - 8:49
    visit. Presumably, this has been vetted by
  • 8:49 - 8:50
    Google, I suppose, and
  • 8:50 - 8:52
    in the Chrome Store because it doesn't
  • 8:52 - 8:55
    do stuff like steal all your
  • 8:55 - 8:57
    passwords. But this is certainly – there
  • 8:57 - 9:00
    are certainly security and privacy issues
  • 9:00 - 9:01
    that are at play here. But I'm gonna add
  • 9:01 - 9:05
    this extension. And then what I'm going
  • 9:05 - 9:07
    to do is I'm going to go back to
  • 9:07 - 9:10
    github.com/Schiffmana-to-z. I'm gonna –
  • 9:10 - 9:11
    Now one thing a Chrome extension
  • 9:11 - 9:14
    can do – and we're gonna see this – is you
  • 9:14 - 9:17
    can add menu options to the menu, like
  • 9:17 - 9:19
    this button. So now, I'm gonna click this
  • 9:19 - 9:22
    button. Oh and look! You can even do a
  • 9:22 - 9:23
    pop-up! Well, I'm gonna show you how to do
  • 9:23 - 9:26
    pop-ups too. And I'm gonna pick this
  • 9:26 - 9:29
    pencil, and now I'm gonna just start
  • 9:29 - 9:30
    doodling art. So this is, by the way,
  • 9:30 - 9:34
    this is very similar to a – What else can
  • 9:34 - 9:36
    I do? This is so fun! This is way better
  • 9:36 - 9:38
    than my example. Aah! Anyway. I clicked off
  • 9:38 - 9:40
    of it. But you can see, this is something
  • 9:40 - 9:42
    that I intend to make as part of this
  • 9:42 - 9:44
    playlist a Chrome extension that allows
  • 9:44 - 9:47
    you to use p5.js to draw and make a canvas
  • 9:47 - 9:51
    overlay over the webpage that
  • 9:51 - 9:54
    you're currently browsing on. Okat. Another
  • 9:54 - 9:56
    Chrome extension is one called Code
  • 9:56 - 9:59
    Doodles. This is something you can do to – I
  • 9:59 - 10:01
    forgot what it's called, but to create a
  • 10:01 - 10:03
    webpage that appears. So right now if I
  • 10:03 - 10:05
    make a new tab, I don't have any
  • 10:05 - 10:07
    extension that replaces the default
  • 10:07 - 10:10
    Chrome new tab, which just shows me the
  • 10:10 - 10:11
    Google search bar and some recently
  • 10:11 - 10:14
    visited sites. But Momentum is another
  • 10:14 - 10:16
    one. All my students all have this one. I
  • 10:16 - 10:17
    should probably install it. But let's try the
  • 10:17 - 10:19
    Code Doodles one. So I'm going to add
  • 10:19 - 10:21
    this one. It says this one all I can do
  • 10:21 - 10:23
    is replace the page you see when opening
  • 10:23 - 10:28
    a new tab. Add extension. And so now, every
  • 10:28 - 10:31
    time I make a new tab, I get – Whoa! I get
  • 10:31 - 10:35
    some cool interesting Code Doodle
  • 10:35 - 10:38
    project. Oh! So I would have to research
  • 10:38 - 10:41
    this more to know credits-wise, like, who
  • 10:41 - 10:44
    these are coming from. I wonder if it's
  • 10:44 - 10:45
    still – Oh, it's loading. Wow! These are all
  • 10:45 - 10:48
    like super crazy WebGL 3d things, which
  • 10:48 - 10:52
    is kind of wild. So you can see the
  • 10:52 - 10:54
    range of possibilities. This is a Chrome
  • 10:54 - 10:56
    extension by Melanie Hoff called Deco
  • 10:56 - 10:58
    Delia. And I don't know if I pronounced
  • 10:58 - 11:00
    that right. It's a Chrome extension and
  • 11:00 - 11:02
    glasses set that uses basic principles
  • 11:02 - 11:03
    of color theory to render
  • 11:03 - 11:05
    your browsers content visible only with
  • 11:05 - 11:08
    the use of red tinted glasses. So
  • 11:08 - 11:10
    you can see here, I can't see what's
  • 11:10 - 11:12
    going on here, but if I happen to have
  • 11:12 - 11:14
    the red-tinted glasses – so I could
  • 11:14 - 11:16
    essentially, if I'm in a coffee shop and
  • 11:16 - 11:18
    I didn't want anybody to see what I'm
  • 11:18 - 11:20
    doing, I could wear my glasses and use my
  • 11:20 - 11:22
    computer without anyone being able to see
  • 11:22 - 11:24
    This is probably a nice video
  • 11:24 - 11:27
    summary Melanie is an alum of both the
  • 11:27 - 11:28
    school for a point of computation and
  • 11:28 - 11:31
    ITP the graduate program where I teach
  • 11:31 - 11:33
    So I encourage you to check out this
  • 11:33 - 11:35
    wonderful Chrome extension. I just want
  • 11:35 - 11:38
    to see if there's a right. So you can
  • 11:38 - 11:42
    search for some like things on your. So
  • 11:42 - 11:44
    this is obviously a kind of like an art
  • 11:44 - 11:46
    project. But it actually does work. I've
  • 11:46 - 11:49
    seen it. It's great. But I also want to
  • 11:49 - 11:51
    mention A Wordless Web, which is one of
  • 11:51 - 11:57
    my favorite projects. Very similar to the
  • 11:57 - 12:01
    Wordless Web. Sorry. By Corey Forsythe and
  • 12:01 - 12:04
    Gigli, which – this is a Chrome extension
  • 12:04 - 12:06
    that takes whatever website you're on. So
  • 12:06 - 12:08
    you can see this is an image of Facebook
  • 12:08 - 12:10
    and just gets rid of all the words and
  • 12:10 - 12:12
    all you're left with are just the images. This would
  • 12:12 - 12:13
    be interesting to think about doing one
  • 12:13 - 12:16
    that does the other. So I hope this
  • 12:16 - 12:17
    video gives you kind of a general
  • 12:17 - 12:20
    introduction to, the – This is the worst
  • 12:20 - 12:22
    diagram ever! – overview of why it is we're
  • 12:22 - 12:25
    here. And a range of some kind of
  • 12:25 - 12:27
    creative and artistic possibilities. And
  • 12:27 - 12:29
    what I'm gonna do in the next bunch of
  • 12:29 - 12:31
    videos is just really go through the
  • 12:31 - 12:33
    nuts and bolts of how to make these
  • 12:33 - 12:35
    things. And then at some point, hopefully
  • 12:35 - 12:36
    towards the end, I'll do a couple coding
  • 12:36 - 12:39
    challenges to make some quirky Chrome
  • 12:39 - 12:41
    extension or bookmarklet projects. Okay?
  • 12:41 - 12:43
    Thanks for watching and I'll see you
  • 12:43 - 12:48
    maybe in the next video.
  • 12:48 - 12:53
    [Music]
  • 12:53 - 12:54
    {Blank}
Title:
11.1: Introduction to Chrome Extensions - Programming with Text
Description:

more » « less
Video Language:
English
Duration:
12:55

English subtitles

Revisions