Build Anything with Perplexity, Here’s How

David Ondrej
30 May 202442:15

Summary

TLDRDavid Andre 展示了如何使用 Perplexity,一个擅长网页搜索的 AI 工具,来构建任何东西,即使没有编程经验。他比较了 Perplexity 和其他 AI 工具的搜索能力,强调了 Perplexity 能够访问更多网站资源。通过 Perplexity,David 选择了构建一个提高生产力的 Chrome 扩展程序,演示了从构思到实现的整个过程,包括使用不同的语言模型生成代码和调试。视频展示了如何利用 AI 工具简化开发流程,鼓励观众使用 Perplexity 解决日常问题,提高效率。

Takeaways

  • 😀 David Andre 介绍了 Perplexity,这是一款专注于网络搜索的 AI 工具,可以结合大型语言模型进行网页搜索。
  • 🔍 Perplexity 通过结合大型语言模型,能够搜索更多网站并提供更全面的答案,与 Chat GPT 相比,它能够访问更多的信息源。
  • 🛠️ David 展示了如何使用 Perplexity 来构建项目,即使用户不是程序员,也可以通过 Perplexity 生成想法和代码。
  • 📚 Perplexity 允许用户选择不同的大型语言模型,例如 Claude 和 GPT-4,以适应不同的编程和调试需求。
  • 🎁 David 提供了一个链接,观众可以通过该链接获得 Perplexity 付费版本的 50% 折扣。
  • 🤖 David 通过 Perplexity 让 AI 选择构建项目,并提出了一个生产力 Chrome 扩展程序的想法,该扩展程序可以在用户访问分心网站时提供任务列表选项。
  • 📝 David 演示了如何使用 Perplexity 生成 Chrome 扩展程序的代码,包括 HTML、CSS 和 JavaScript,而无需自己编写代码。
  • 🖼️ David 利用 Perplexity 的图像生成功能为 Chrome 扩展程序创建了图标,展示了 AI 如何帮助完成设计任务。
  • 🔧 David 遇到了扩展程序在实际使用中的一些问题,并通过 Perplexity 的帮助进行调试和修改代码。
  • 🎉 最终,David 成功构建了一个能够阻止访问 Twitter 和 x.com 的 Chrome 扩展程序,证明了即使是编程新手也能通过 AI 工具实现复杂的项目。
  • 📈 David 强调了使用 AI 工具如 Perplexity 在日常中解决问题的重要性,鼓励观众开始使用这些工具来提高效率和生产力。

Q & A

  • 什么是Perplexity,它与普通的网页搜索有什么区别?

    -Perplexity是一个AI工具,专门用于网页搜索。它与普通搜索的区别在于,Perplexity结合了大型语言模型(LLM)和网络搜索的能力,可以提供更全面的答案,它能够浏览更多不同的网站来源,而普通的搜索可能只显示有限的几个搜索结果。

  • David Andre在视频中提到了哪些AI工具?

    -David Andre在视频中提到了Perplexity和GPT。Perplexity是一个可以进行网页搜索的AI工具,而GPT是一个大型语言模型,可以用来生成代码和调试。

  • 为什么程序员可能更倾向于使用Perplexity?

    -程序员可能更倾向于使用Perplexity,因为它允许用户选择不同的LLM来生成代码,然后可以切换到其他模型如GPT 4进行代码调试。此外,Perplexity提供了一个订阅服务,可以访问所有这些工具。

  • David Andre在视频中展示了如何使用Perplexity来构建一个什么样的项目?

    -David Andre展示了如何使用Perplexity来构建一个Chrome扩展程序,这个扩展程序可以在用户尝试访问分散注意力的网站时弹出提示,让用户选择是继续访问网站还是跳转到任务列表。

  • 在构建Chrome扩展程序时,David Andre提到了哪些技术栈?

    -在构建Chrome扩展程序时,David Andre提到了HTML、CSS和JavaScript,这些是构建扩展程序所需的基本技术栈。

  • David Andre在视频中提到了哪些关于Perplexity的高级功能?

    -David Andre提到了Perplexity的一些高级功能,包括能够使用CLA 3 Opus生成代码,以及拥有200k的上下文窗口,这意味着可以在聊天中进行非常长的对话而不会丢失上下文。

  • David Andre为什么建议使用Perplexity而不是Google搜索?

    -David Andre建议使用Perplexity而不是Google搜索,因为Perplexity可以提供更深入和多样化的搜索结果,它能够浏览更多的网站并提供不同的信息来源,而Google搜索可能只显示有限的结果。

  • 在视频中,David Andre是如何使用Perplexity来解决编码问题的?

    -David Andre通过向Perplexity提出具体的问题和需求,让Perplexity搜索网络并提供解决方案。他没有编写任何代码,而是依赖Perplexity来提供所需的代码片段和步骤。

  • David Andre在视频中提到了哪些关于使用AI工具的建议?

    -David Andre建议人们应该开始在日常生活中使用AI工具,比如Perplexity,来替代传统的搜索方式,比如Google搜索。他还建议当人们在使用过程中遇到问题时,应该利用Perplexity来找到解决方案。

  • 在构建Chrome扩展程序的过程中,David Andre遇到了哪些问题,他是如何使用Perplexity来解决的?

    -在构建Chrome扩展程序的过程中,David Andre遇到了弹出窗口只在点击扩展图标后才出现的問題。他通过向Perplexity描述问题并请求解决方案,然后根据Perplexity提供的代码更改来解决了这个问题。

  • David Andre在视频中提到了哪些关于自定义Chrome扩展程序的好处?

    -David Andre提到自定义Chrome扩展程序的好处在于它可以针对个人的特定需求进行定制,帮助用户避免访问浪费时间的网站,从而提高生产力。

  • David Andre在视频中是如何强调AI工具在现代编程中的重要性的?

    -David Andre通过展示即使是编程新手,也可以通过使用AI工具如Perplexity来构建复杂的应用程序,从而强调了AI工具在现代编程中的重要性。他展示了如何一步步地使用Perplexity来解决问题,而无需深入了解代码。

  • David Andre在视频中提到了哪些关于AI工具的未来发展的看法?

    -David Andre认为AI工具的发展使得现在构建应用程序比过去容易得多,他认为即使是更复杂的项目,未来也可能只需要更少的时间和努力来完成,这表明了AI工具在提高开发效率方面的潜力。

Outlines

00:00

🤖 介绍Perplexity AI工具

David Andre介绍了一个名为Perplexity的AI工具,它利用大型语言模型(LLM)进行网络搜索,帮助用户构建任何东西,即使用户不是程序员。Perplexity与普通搜索引擎不同,它能够搜索更多网站并提供更多样化的信息来源。David还提到了使用不同LLM的优势,以及Perplexity如何帮助程序员生成和调试代码。

05:04

🛠️ 使用Perplexity构建Chrome扩展

David决定使用Perplexity来构建一个提高生产力的Chrome扩展程序。他通过Perplexity的写作模式,让AI生成构建项目的想法,而不需要在线搜索。他提出了一个在访问分散注意力的网站时弹出提示的扩展程序概念,并请求Perplexity提供五种可能的设计。

10:06

💡 设计生产力Chrome扩展的具体步骤

David展示了如何使用Perplexity一步步构建Chrome扩展,包括创建项目目录、编写manifest.json文件、设计popup HTML界面以及添加必要的JavaScript和CSS代码。他强调了即使没有编程经验,也可以通过AI工具来完成这些任务。

15:08

🔧 测试和调试Chrome扩展

David Andre在VS Code中完成了扩展的编码后,介绍了如何在Chrome中测试扩展程序。他提到了需要开启开发者模式、加载未打包的扩展以及如何与扩展进行交互以验证其功能。他还分享了在测试过程中遇到的问题,即扩展没有按预期工作。

20:10

🔄 解决扩展程序不工作的问题

David发现扩展在访问特定网站时没有自动弹出。他使用Perplexity来分析问题,并请求AI提供解决方案。AI建议修改JavaScript代码,以确保只有在访问特定网站时才显示弹出窗口。David按照指示进行了更改,并重新加载了扩展进行测试。

25:10

🖥️ 完善扩展程序的用户体验

尽管扩展程序的核心功能已经实现,David希望改进用户界面,使其在自动弹出时占据整个屏幕,防止用户访问Twitter。他再次使用Perplexity来调整manifest文件和JavaScript代码,以实现这一功能,并成功地使扩展在访问Twitter时自动覆盖整个屏幕。

30:12

🎨 调整扩展程序的视觉效果

David注意到扩展程序的背景透明度可以调整,但他决定将其改为完全不透明,以完全遮挡背后的内容。他请求Perplexity提供CSS代码的更改,并成功地将背景变为全黑色,从而提高了扩展程序的实用性。

35:14

🎉 完成Chrome扩展并分享成果

在经历了一系列的调试和改进后,David成功地完成了Chrome扩展程序的构建。他分享了自己的成就感,并鼓励观众订阅他的频道。David强调了使用AI工具如Perplexity来实现目标的重要性,并提供了扩展程序的代码链接。

Mindmap

Keywords

💡Perplexity

Perplexity是一个AI工具,专门用于网络搜索。它通过结合大型语言模型(LLM)和网络搜索能力,能够回答用户的问题。在视频中,Perplexity被用来展示如何构建各种项目,即使用户不是程序员。例如,用户可以请求关于Elon Musk和Yan Leon的Twitter争论的信息,Perplexity会提供答案。

💡LLM(Large Language Model)

大型语言模型(LLM)是指能够处理和生成自然语言文本的复杂AI系统。在视频脚本中,Perplexity利用LLM的能力来搜索网络并提供信息。LLM是Perplexity的核心,因为它能够理解和生成语言,使得用户可以与工具进行交互并获取所需信息。

💡Chrome扩展

Chrome扩展是一种软件组件,用于增强Google Chrome浏览器的功能。在视频中,David Andre使用Perplexity来指导如何构建一个提高生产力的Chrome扩展,该扩展可以阻止用户访问分散注意力的网站,并将他们重定向到任务列表。

💡HTML

HTML(超文本标记语言)是构建网页和Web应用的标准标记语言。在视频脚本中,HTML被用来创建Chrome扩展的用户界面,例如弹出窗口,这是用户与之交互的前端部分。

💡CSS

CSS(层叠样式表)是一种用于描述HTML文档外观和格式的语言。在脚本中,CSS用于为Chrome扩展的弹出窗口添加样式,使其看起来更美观,并且可以根据用户的需要进行定制。

💡JavaScript

JavaScript是一种常用于网页交互的脚本语言。在视频中,JavaScript被用来编写Chrome扩展的逻辑,控制用户点击按钮时的行为,例如重定向到任务列表或继续访问网站。

💡JSON

JSON(JavaScript对象表示法)是一种轻量级的数据交换格式,易于人阅读和编写,同时也易于机器解析和生成。在脚本中,JSON用于创建Chrome扩展的清单文件(manifest.json),该文件告诉浏览器扩展的基本信息和配置。

💡AI工具

AI工具指的是利用人工智能技术来执行任务或提供服务的工具。在视频脚本中,Perplexity作为一个AI工具,可以帮助用户构建项目,生成代码,甚至创建图像,展示了AI工具如何简化开发过程并提高效率。

💡生产力

生产力是指个人或系统在一定时间内完成工作的能力。在视频中,构建的Chrome扩展旨在提高用户的生产力,通过阻止访问分散注意力的网站,帮助用户专注于任务列表,从而提高工作效率。

💡调试

调试是软件开发过程中识别和修复代码中错误的行为。在视频脚本中,当Chrome扩展未能按预期工作时,David Andre使用AI工具来帮助调试代码,展示了即使对于编程新手,AI工具也能在调试过程中提供帮助。

💡内容脚本

内容脚本是运行在网页上下文中的JavaScript代码,可以访问和修改页面的DOM树。在脚本中,内容脚本被用来在用户访问特定网站时注入一个覆盖层,这是实现Chrome扩展功能的关键技术之一。

Highlights

David Andre 介绍了如何使用 Perplexity 这个 AI 工具来构建任何东西,即使用户不是程序员。

Perplexity 利用大型语言模型并赋予其网络搜索能力,与普通的 GPT 搜索功能相比,它能搜索更多网站并提供更多样化的来源。

用户可以通过 Perplexity 使用不同的语言模型,例如 Codex 和 GPT-4,来生成代码和调试。

Perplexity 的订阅服务提供了一站式的解决方案,包括访问所有功能,而免费版本也相当稳固。

David 展示了如何使用 Perplexity 来选择构建项目,即使他本人不是程序员,也能通过工具生成项目想法。

Perplexity 允许用户自定义焦点,比如选择学术搜索或仅文本生成,以适应不同的使用场景。

David 选择了构建一个提高生产力的 Chrome 扩展程序,该程序可以在用户访问分心网站时提供任务列表选项。

Perplexity 为 David 提供了五种可能的设计概念,用于构建 Chrome 扩展程序。

即使 David 对 HTML、CSS 和 JavaScript 知之甚少,Perplexity 也能提供一步步的指导来创建项目。

David 使用 Perplexity 生成了 Chrome 扩展程序所需的 manifest.json 文件。

Perplexity 还提供了创建弹出式 HTML 文件的代码,这是扩展程序与用户交互的主要部分。

JavaScript 文件的生成让扩展程序能够在用户点击按钮时执行操作,如打开任务列表或继续访问网站。

通过 Perplexity,David 能够生成 CSS 代码来为扩展程序添加样式,而无需自己编写样式代码。

David 利用 Perplexity 的图像生成功能为 Chrome 扩展程序创建了图标。

Perplexity 提供了详细的步骤来测试 Chrome 扩展程序,确保其在浏览器中正确加载和运行。

在测试过程中,David 发现扩展程序没有按预期工作,并使用 Perplexity 进行调试。

通过更改 JavaScript 代码,David 使扩展程序能够在访问特定网站时自动显示弹出窗口。

David 通过将背景变为完全不透明,改进了扩展程序的用户体验,使用户更专注于任务。

最终,David 成功构建并测试了他的 Chrome 扩展程序,证明了即使没有编程背景,也能通过 AI 工具实现目标。

Transcripts

play00:00

my name is David Andre and I'm going to

play00:01

show you how to build anything with

play00:03

perplexity if you're new here perplexity

play00:06

is an AI tool that specializes in web

play00:09

search for example you can say tell me

play00:11

about the Elon Musk and Yan Leon Twitter

play00:13

brief and it will give you the answer

play00:15

because it takes an llm a large language

play00:17

model and gives it the power to search

play00:19

the web so in this video I'm going to

play00:21

show you how to use this powerful AI

play00:23

tool to make literally anything even if

play00:25

you aren't a programmer now you might be

play00:28

thinking but David CAD GPT can also

play00:30

search the web and you're right however

play00:33

perplexity is a completely different

play00:35

level check this out in ch GPT if we

play00:37

look at this it's not even five sites

play00:39

it's actually three while perplexity

play00:41

went through 20 different websites and

play00:43

we can see all of them are different

play00:45

sources but what's even better is that

play00:47

as you can see I'm using clo fre Opus

play00:48

meaning in complexity you can choose

play00:51

which llm you want to use and this is

play00:53

also why a lot of programmers prefer to

play00:54

use perplexity because you can use clo

play00:56

fre Opus to generate the code and then

play00:58

switch to GPT 4 to debug the code for

play01:01

one subscription you get all of this

play01:03

which is why if I only could pay for one

play01:05

tool it would be perplexity now to be

play01:07

honest even the free version is really

play01:09

solid however in this video I'm going to

play01:11

be using the paid version so if you want

play01:13

50% off I'm going to include a link in

play01:15

the description now I don't even know

play01:17

what I'm going to build yet I'm going to

play01:18

let perplexity choose that list out 10

play01:21

types of cool projects that I could

play01:24

build assume I am not a programmer and

play01:28

what's great is that here in the focus

play01:30

button you can actually change what

play01:33

perplexity should focus on by default

play01:35

it's on all which means search across

play01:38

the entire internet you know exploring

play01:40

all the sources as we saw before but you

play01:42

can also do academic search in published

play01:45

academic papers or writing which is one

play01:47

of my favorites generate the text

play01:50

without searching the web so for this I

play01:52

would probably go with writing because I

play01:54

just want the ideas I just want the llm

play01:56

to generate ideas not necessarily look

play01:58

online for them right distraction

play02:00

blocker oh my God we could actually

play02:02

build a simple productivity extension

play02:04

perhaps okay I have an idea actually

play02:06

something that lets you choose between

play02:08

going to your task list and going to the

play02:11

website you want to visit so

play02:13

perhaps each time I visit I want to

play02:17

visit wit.com or x.com you know both

play02:22

domains I have to be checked in it would

play02:26

give me two buttons one

play02:30

redirecting me to my task list and the

play02:34

other allowing me to continue to the

play02:38

side give me

play02:40

five

play02:42

potential ideas how we could we could

play02:47

execute actually I should probably

play02:48

shouldn't use idea how we could execute

play02:51

upon this idea five

play02:54

potential let's say designs

play02:57

okay now we're getting more spefic

play02:59

specific and we are going to get into

play03:01

building I have a empty python project

play03:03

which actually I don't even know why I

play03:05

have a python project um I guess I

play03:08

didn't know we're going to build a

play03:09

extension obviously for a Chrome

play03:11

extension we need HTML CSS and

play03:12

JavaScript but even if you didn't know

play03:14

that I mean we'll see perplexity will

play03:17

help us figure that out so uh it's

play03:20

building up upon the chat right that's

play03:22

the beauty of perplexity and especially

play03:24

CLA 3 Opus because it's it's using the

play03:28

llm obviously the LM is the brain it's

play03:29

the main thing and perplexity just

play03:31

builds very nice search tools and you

play03:34

know behind the scenes prompts on top of

play03:36

it CLA free Opus has 200k context window

play03:39

meaning your chat can be very long

play03:42

before it runs out of context and it

play03:44

also includes all of the Snippets from

play03:48

the websites in the you know all the

play03:51

retrieval in the context window so you

play03:54

know it can fill up but with 200k cl if

play03:58

you're using CLA 3E you have 200k you're

play04:01

chilling you don't have to worry about

play04:02

that so here are five potential designs

play04:04

for a simple productivity Chrome

play04:05

extension okay popup

play04:09

prompt when the user tries to visit a

play04:11

distracting site like Twitter a popup

play04:13

appears the popup has two buttons go to

play04:16

task list and continue to site hm almost

play04:19

as if it's just my idea okay let's see

play04:23

what it added

play04:24

though yeah task list URL yes okay okay

play04:30

to wup could have a simple clean design

play04:32

with a reminder message about staying

play04:33

focused uh I don't like these messages

play04:36

to be honest I just want the button like

play04:39

you know okay it could say like are you

play04:41

choosing to waste time or back to work

play04:44

or something like that okay sidebar

play04:46

Notch when the distracting side loads a

play04:49

sidebar slides in from the right of the

play04:53

browser what

play04:59

okay this is just bad full page

play05:04

intertial what what is that word inter

play05:08

okay I don't even

play05:09

know extension redirects you you want to

play05:13

stay

play05:20

focused okay this I don't know what what

play05:23

exactly is different here Omni books

play05:25

action whatever I'm not even going to

play05:27

read this I'm I just want the first

play05:28

execution

play05:30

this design is by far the best

play05:36

okay assume I am a complete beginner

play05:40

when it comes to

play05:42

HTML CSS and JavaScript tell me what to

play05:48

do

play05:49

next step by step I do have vs code

play05:54

installed and open by the way if you

play05:57

don't have vs code installed and open

play06:00

just use perplexity I mean it's amazing

play06:03

how many people even people who are in

play06:04

the AI space are still um not using

play06:08

perplexity okay wait this is what I

play06:10

wanted to sear show you if you're using

play06:12

the pro search in perplexity which you

play06:14

know is 20 bucks a month or 10 if you

play06:16

use my link below you sometimes get this

play06:19

followup question which personally um

play06:23

sometimes I would like to skip it

play06:24

because I just want to go fast but a lot

play06:26

of people love this feature because it

play06:28

you can give it more context that you

play06:30

wouldn't think of while writing the

play06:31

original prompt so let's see what's the

play06:33

URL of your task list uh I'm just going

play06:35

to do skip for now we'll figure that out

play06:38

later I'm going to use todoist but it

play06:40

doesn't matter the design of the Chrome

play06:42

extension is exactly the same no matter

play06:45

where you want to redirect

play06:47

so

play06:49

okay let's

play06:52

see again goes through 20 different

play06:54

sources and starts giving you Steps step

play06:58

by step now yeah as I was saying if you

play07:00

get stuck at any point just please use

play07:03

this tool so many people just ask you

play07:06

know even email me questions that could

play07:09

be answered by perplexity I'm like

play07:11

baffled every single day I get at least

play07:14

one or two emails that are just simple

play07:15

questions that could even chat GPD or

play07:18

Pro answer so please don't be one of

play07:21

those people that just consumes videos

play07:23

actually start using this tool in your

play07:24

day-to-day replace your Google if you

play07:26

have your default window uh set to

play07:28

Google or what whatever replace it with

play07:30

perplexity or CH GPD that way you start

play07:33

building the habits to become an AI

play07:36

focused person which you know actually

play07:38

using the AI tools is how you get the

play07:40

benefits not watching videos about it so

play07:42

let's see what CLA free is cooking up

play07:45

great choice blah blah blah step one

play07:47

create the project directory in vs code

play07:49

click on file in the top menu and select

play07:52

open folder so let's do that

play07:54

actually okay so I'm going to do it like

play07:58

this oh um open folder we have that

play08:05

yes okay we we have a folder I just

play08:08

named it code but whatever new file I'm

play08:11

going to name it manifest.json okay new

play08:13

file manifest.json

play08:15

again you don't have to know any

play08:17

JavaScript here I'm a complete dummy

play08:20

when it comes to JavaScript I mean I

play08:22

made one video on it but that's about it

play08:24

so been a few months I probably forgot

play08:26

about a lot but that's the thing

play08:30

JavaScript and actually Json is you know

play08:33

um JavaScript object notation if I'm not

play08:37

mistaken you don't have to know this you

play08:40

can use the AI tools to do that for you

play08:43

you just need to have an idea and make a

play08:45

decision to build that idea that is all

play08:47

you need in this age so don't be

play08:49

overwhelmed like oh my God I don't

play08:51

understand every line of code you can

play08:52

build simple Chrome extensions without

play08:54

understanding the code it just just

play08:57

watch what I do okay so we have the file

play09:00

manifest ad Json and open it copy and

play09:02

paste the following code going to click

play09:04

the copy button plain and simple and

play09:06

going to paste it control s to save so

play09:09

just a quick glance we can see that we

play09:11

have multiple different categories in

play09:13

the Json file different lists

play09:16

permissions host permissions actions

play09:19

default popup some icons or we probably

play09:23

need to add those I guess um whatever

play09:26

let's see this manifest file tells

play09:28

Chrome about your extension its name

play09:31

version icons blah blah blah step three

play09:33

create the popup HTML file okay I don't

play09:37

know why they named it popup but I guess

play09:40

that's going to be the name of our

play09:41

productivity Chrome extension just uh

play09:45

popup new file HTML and this is going to

play09:48

be the main HTML and I'm going to Simply

play09:51

copy paste this code that perlex gave

play09:55

me okay so this is the text do you want

play09:58

to continue to this potentially

play10:00

distracting site or go to your task list

play10:03

instead this is this is so weak we need

play10:06

to have do you really want to waste your

play10:10

life away okay I'm just going to do

play10:13

David

play10:14

Andre's

play10:16

productivity super extension uh let's go

play10:19

back this creates the basic structure of

play10:22

your popups so we need the JavaScript

play10:24

right now so I'm just going to name this

play10:26

it's very important to have the exact

play10:28

same name that way there is no conflict

play10:30

when the files want to communicate with

play10:32

each other that's why I'm copy pasting

play10:34

it from perplexity instead of manually

play10:36

typing and let's copy the JavaScript

play10:39

okay I guess this is missing so we need

play10:42

to expand on this Javascript file maybe

play10:45

CL 3 was feeling a bit lazy we'll see

play10:47

this JavaScript waits for the popup well

play10:50

actually no it needs to just click and

play10:53

then do nothing right okay maybe we have

play10:55

to change this to

play10:57

be replace the current URL instead of

play11:00

opening a new window we'll see we'll see

play11:03

the JavaScript waits for the popup HTML

play11:05

to load then finds the two buttons and

play11:09

adds click events listeners to them Tas

play11:12

clicks button opens a new tab to

play11:15

ur okay we need to change that yeah we

play11:18

need to change that our script okay our

play11:21

script needs to change the current

play11:26

website replace the to-do line what

play11:30

allow continue to the original side to

play11:32

let the user continue to the original

play11:34

distracting side when they click

play11:35

continue replace SL SL Todo

play11:40

line okay I don't know why I didn't

play11:43

write that right away but

play11:48

sure this code grabs the current Ur and

play11:52

reloads it then closes the pop okay

play11:57

style okay now we need to see CSS to you

play12:00

know add some style so it's not

play12:02

completely Bare Bones and I did exactly

play12:04

what I advised against doing which is

play12:06

typing the name but since it's so simple

play12:09

you know it's hard to mess up anyways

play12:12

we're going to copy this obviously

play12:15

CSS no point going over this customizing

play12:18

it um you can customize it endlessly you

play12:20

can spend endless hours adjusting colors

play12:23

and borders but we're interested in

play12:25

building a productivity Chrome extension

play12:27

that works only using perplexity if you

play12:31

noticed I haven't written a single line

play12:33

of code I'm just getting perplexity to

play12:35

search the web and use CLA free as the

play12:38

llm to give me the

play12:41

code I mean legit I'm not lying when I

play12:45

say like I'm terrible at JavaScript I

play12:47

know this like just the fundamentals of

play12:49

HTML and CSS

play12:51

so if you're not into programming if you

play12:53

haven't bu built any websites in your

play12:56

life if you haven't built any Chrome

play12:57

extensions you can still do this just

play12:59

ask it to go slower or explain it if you

play13:02

want So Okay add icons download icon

play13:05

images for your extensions

play13:09

okay you know what actually why not

play13:11

create these why not create these we can

play13:14

create these within perplexity if you

play13:15

most people don't know this but

play13:16

perplexity can create images so right

play13:18

here we have the generate image feature

play13:21

and we can do that so choose the style

play13:23

we can actually do custom

play13:25

prompt

play13:27

and um

play13:31

Let's do an icon a minimalist icon for a

play13:38

productivity Chrome

play13:43

extension uh

play13:45

simple

play13:49

simple simple minimalist icon whatever

play13:52

submit let's see what it Cooks up if

play13:53

it's pretty bad I can always change to

play13:56

uh D free in the settings I mean this is

play14:00

okay I guess nothing crazy but the point

play14:03

here is just have an icon so going to

play14:06

open Photoshop and just make the three

play14:08

different sizes 16 by 16 okay let's

play14:11

start by 128 by 128 so I'm going to

play14:15

do8

play14:17

by

play14:19

128 boom create and this is our

play14:24

icon let's take this image and let's you

play14:28

know I'm going to just screenshot it

play14:31

paste and obviously it's much bigger

play14:33

than that so we have to center it boom

play14:37

boom and realign it obviously this icon

play14:41

I mean I would spend a lot more time on

play14:43

the logo but like this is not about the

play14:46

logo so yeah this will work icon 128.

play14:50

PNG

play14:51

okay all

play14:53

right so let's go back into Photoshop

play14:57

and save this as one icon one 28 and El

play15:00

has to be

play15:02

BNG and the next one

play15:04

was 48 and 16 okay so let's do the same

play15:08

simply you know changing the name icon

play15:11

48 and then going PNG and you don't have

play15:15

to use Photoshop you can just any image

play15:17

edit anything tool and what I just did

play15:20

was very uh stupid because I did not

play15:24

even change

play15:26

the size so obviously I have to change

play15:28

CH the size actually 48x 48 boom

play15:34

create I'm just going to drag the icon

play15:37

um I don't even mind doing that so

play15:43

boom save now we can save this icon

play15:48

48 and we need 16 as

play15:51

well so we're going to have our free

play15:53

icons for our productivity extension

play15:56

which was generated by perplexity as

play15:58

well it's ni to have everything

play15:59

generated by complexity makes it um I

play16:03

don't know makes it more nice more

play16:05

complete you know shows you like you can

play16:07

seriously do everything with just one AI

play16:10

tool which is kind of insane you know

play16:12

even a year ago you couldn't do that so

play16:14

yeah so this is going to be icon 16 this

play16:17

is the last one we need

play16:21

beautiful now we have we have our free

play16:25

icons let's go

play16:27

back test your Chrome extension okay

play16:30

exciting so actually we need to

play16:34

do one more thing

play16:37

right what I'm going to do is I'm going

play16:39

to use Chad gp.com as our productivity

play16:42

kind of ironic or actually let's

play16:44

dolex.com why not I mean pity. a not.com

play16:49

a that's going to be some different

play16:50

website so I'm going to do the

play16:52

suggestions right I'm going to

play16:54

do copy our current JavaScript code and

play16:57

I'm going to explain

play16:58

what I envisioned so again you only need

play17:01

the idea and the determination to see it

play17:04

through so I'm going to say um here is

play17:08

my current Javascript file boom paste

play17:14

it I want to

play17:16

make the following two changes and I'm

play17:20

just going to copy this straight from

play17:22

this our skip needs to change the

play17:24

current

play17:27

website okay

play17:30

wait what else did I want to do oh yeah

play17:33

I know okay the current website and yeah

play17:36

yeah

play17:38

so and

play17:40

then current website not a new

play17:44

tab okay our script needs to

play17:50

change the current website

play17:54

okay the URL for

play17:57

the produ deductive option will be and

play18:02

then we just give it perplexity a but

play18:06

like the whole thing right so

play18:09

boom okay this is going to be change

play18:12

number

play18:13

one and then change number two change

play18:16

number two is to change the current

play18:19

website not a new

play18:21

tab

play18:25

um option not just

play18:29

open a new

play18:31

tab

play18:33

okay if the

play18:35

user chooses to be

play18:39

productive all right I think this is

play18:41

solid let's see how perplexity CLA 3

play18:46

updates it here's the updated JavaScript

play18:49

code with the changes as

play18:50

requested

play18:52

okay so let me just copy the code and

play18:54

paste it inside save

play19:00

and then as you can see it changes the

play19:02

URL to

play19:04

this here is what changed the URL for

play19:06

the productive option is now set to

play19:09

perplexity for the second change instead

play19:11

of opening a new tab The Screen Now

play19:13

updates the current tabs URL to the

play19:15

protective option

play19:18

URL Chrome tabs query again you don't

play19:20

have to understand any of this let's

play19:22

just test it out okay so let me say

play19:24

great now give me step by step

play19:29

instructions on how I should test my

play19:32

extension out I still only have it in vs

play19:36

code so it's good to remind it of the

play19:38

current state of the project where

play19:40

you're in and give it in as much context

play19:42

as possible uh is this necessary I have

play19:47

t project I don't think this is

play19:48

necessary so I'm going to skip it it

play19:50

might be necessary though we'll see I

play19:52

guess if it

play19:53

struggles H so we might need to do

play19:57

developer mode and and again if you

play20:00

haven't built extensions you will not

play20:01

know that but it I'm betting it will

play20:03

tell us that so here are stepbystep

play20:06

instructions for testing your Chrome

play20:08

extension from V by the way one thing I

play20:10

should have done with this prompt is

play20:11

turn off the pro search that way it was

play20:14

it would be faster because I don't need

play20:16

to go through 20 websites for

play20:18

this you know this is a good thing you

play20:20

learn over time when you can trust the

play20:22

llm and when you need external website

play20:25

so open your extension um

play20:30

okay is the Manifest properly set up pop

play20:33

up

play20:36

HTML we'll see I guess the best way is

play20:39

to test it

play20:42

out ensure your extensions manifest

play20:47

file in Chrome open the extension

play20:51

page actually in Brave so whatever but I

play20:54

can open it like this so these are my

play20:57

Chrome extensions as you can see I'm

play20:58

using 1 two three

play21:01

4

play21:03

five for productivity you can say like

play21:06

even the you know hu block origin is for

play21:08

productivity but yeah I'm using five

play21:12

productivity extensions so time to add a

play21:14

six one if you don't have any extensions

play21:16

obviously it will be empty but you

play21:17

probably have a few so you will see them

play21:20

you have to toggle developer mode first

play21:23

now let's go back let's follow the

play21:25

instructions I mean I'm I'm not doing

play21:26

anything crazy

play21:30

after enabling load unpacked so we have

play21:33

to click on load unpacked this will open

play21:36

up um

play21:38

simple folder so I'm going to go into

play21:41

here and we have the code right here

play21:43

what do we have to search though let's

play21:47

see H in the file dialogue that appears

play21:51

navigate to your extension project

play21:52

folder select

play21:55

folder all right so I have to load

play21:57

unpacked and select my folder here

play22:00

select folder boom we have the extension

play22:03

with the correct icon loaded helps you

play22:05

stay focused by redirecting from

play22:07

distracting sides where is that written

play22:09

in the Manifest yes sir beautiful let's

play22:12

go

play22:18

back if the

play22:20

file if the file dialogue that appears

play22:24

what okay yeah we did that chome will

play22:26

now load extension if there are no

play22:27

errors you should your extension with

play22:29

its icon beautiful if your extension has

play22:32

a popup click the extension puzzle icon

play22:35

in the Chrome toolbar and pin your

play22:37

extension for easy to use during testing

play22:39

so we can actually do that you can pin

play22:40

it and test it out more

play22:45

easily test your extension functionality

play22:47

if it has a popup click the extensions

play22:50

icon to open it interact with your

play22:52

extension and verify it behaves and

play22:54

expect it so okay um

play22:58

let's let's try it out right what I'm

play23:00

going to do is I'm actually going to

play23:01

turn off this one because I have this

play23:03

setup for Twitter as well as this one so

play23:07

I'm going to turn these two off and I'm

play23:09

going to turn our off just to test it

play23:11

out so this is what happens when I go to

play23:13

Twitter by default right open up Twitter

play23:16

and it just opens up right going to load

play23:18

the feed and we have some posts that are

play23:21

probably just wasting our time by the

play23:23

way this is arav inas the creator of

play23:26

perplexity it's kind of ironic that

play23:29

right now I'm making video on perplexity

play23:30

and one of the top tweets is from him so

play23:33

now I'm going to close Twitter I'm going

play23:35

to enable our extension productivity

play23:38

extension super original name let's

play23:41

rename that let's do

play23:43

David's super

play23:45

duper extension boom save a little bit

play23:48

more fun uh I'm going to click on reload

play23:51

boom and we reloaded the name beautiful

play23:53

let's go back to Twitter and test the

play23:55

moment of

play23:57

truth it did not

play24:00

work maybe it's because of it's

play24:03

x.com yeah it's yeah I think it's

play24:06

because of that so let's go back to

play24:07

perplexity and uh mention

play24:09

it I went onto Twitter and it did not

play24:16

work maybe it's because recently Elon

play24:20

migrated Twitter to

play24:25

x.com but I would

play24:29

rather make the

play24:31

extension work on both URLs just to be

play24:35

safe and now we can actually give it the

play24:38

code so probably the JavaScript is the

play24:41

most important one and actually it's if

play24:44

am I crazy or is it checking the URL

play24:48

somewhere I don't even know man okay

play24:52

actually I'm going I'm going to include

play24:54

all that in PR so here is

play24:57

the Json file

play25:01

boom then I'm going to do the HTML

play25:04

file here is the HTML

play25:07

file boom you know separated with these

play25:10

four dashes um that way you keep the

play25:12

prompt organized here is the Javascript

play25:17

file and the reason I'm doing this is to

play25:19

give the llm context again to remind it

play25:22

of the current state of the project that

play25:24

way it knows what to change and what to

play25:26

keep and here is the Cs s s file

play25:31

boom analyze the entire

play25:35

project write down a

play25:38

paragraph or two reasoning why it

play25:41

probably doesn't work and then only then

play25:47

implement the changes the reason I'm

play25:48

asking to do this is to burn some tokens

play25:51

on reasoning on an analysis before

play25:55

it you know starts changing stuff up

play25:59

after analyzing project I can see a

play26:00

couple of reasons functionality is not

play26:02

tied to specific websites oh

play26:06

no that is a

play26:09

problem yeah okay so to make the

play26:13

extension work specifically for Twitter

play26:14

and x.com you'll need to modify the code

play26:17

to check the current website URL and

play26:19

only show the popup or perform actions

play26:22

if the user is on one of those sites

play26:25

here's how you can Implement those

play26:26

changes update the JavaScript code right

play26:29

so I'm going to copy this paste into

play26:31

JavaScript make sure make sure you paste

play26:34

the correct file you know you don't want

play26:36

to paste JavaScript into CSS or vice

play26:38

versa and

play26:41

then we update the CSS update the CSS to

play26:45

initially hide the

play26:47

popup wait

play26:51

what okay just the body I

play26:54

guess we need to change the CSS body

play26:59

boom and then wait what is in this

play27:02

updated code we use chrome. tabs. Query

play27:05

to get the current types URL okay if

play27:08

it's Twitter or

play27:15

X includes yeah okay that's

play27:21

good we showed the

play27:24

popup all right adding display none

play27:27

let's let see so I've saved these both

play27:30

files with contrl s make sure everything

play27:33

is saved let's go back to our extensions

play27:34

and reload this very important reload it

play27:38

now let's open up Twitter

play27:42

again and it still does not work let's

play27:45

see why does the extension not work

play27:48

reload

play27:50

it update extensions

play27:53

now I think that's going to ignore our

play27:55

extension but whatever uh yeah I don't

play27:58

know why this doesn't work wa is it like

play28:01

I have to click this or

play28:02

something oh I have to click the

play28:06

extension and then it works go to task

play28:08

list

play28:10

oh so okay the extension is solid but it

play28:14

just needs to appear take up the whole

play28:17

screen I see okay

play28:21

so all right yeah

play28:24

yeah the extension is basically finished

play28:30

maybe this is Famous Last Words except

play28:32

for the fact that I have to click on the

play28:35

icon of the extension to make it pop up

play28:40

and redirect me to to the

play28:45

productive option this is not how I

play28:50

envisioned the Chrome extension to run

play28:54

it has to

play28:55

automatically open

play28:59

while I

play29:02

visit either of these two sites taking

play29:06

up the entire screen and not letting me

play29:10

browse

play29:12

Twitter the current

play29:15

functionality is I mean okay I'll say

play29:18

the

play29:19

core features are there it's just the UI

play29:23

that needs to

play29:25

change because right now it's

play29:29

not making not going to make

play29:32

me any more

play29:35

productive let's be honest all of us

play29:37

need Custom Chrome extensions because

play29:39

all of us has different sites or styles

play29:42

of wasting time which is just beautiful

play29:44

now you can build your own Chrome

play29:45

extension 5 years ago was 50 times

play29:49

harder let's see if perplexity

play29:52

understands the issue

play30:02

actually you know what for this I have

play30:03

an idea we should probably go to a new

play30:06

threet that's just for writing and paste

play30:09

that inside I'm going to do that I'm

play30:11

going to go here take this entire

play30:20

prompt okay I'm going to take this

play30:23

entire prompt put it

play30:25

here and then

play30:31

oh actually you know

play30:38

what yeah we should probably do this in

play30:40

writing mode that way we don't get

play30:43

unnecessary

play30:49

interruptions yeah yeah this is my bad I

play30:51

should have not done this so I'm going

play30:55

to what changed CSS changed so let's do

play30:59

this uh let's oh my God okay

play31:11

whatever all right

play31:13

so I just want to copy this long prompt

play31:16

to be

play31:17

honest yeah so I'm going to use the

play31:19

perplexity feature which is for editing

play31:21

the

play31:22

prompt sometime it's kind of annoying

play31:24

it's like here edit query but you have

play31:26

to scroll to the bottom of the query

play31:28

find the button could be better could be

play31:31

next to the prompt but hey whatever so

play31:33

I'm going to copy this go here create a

play31:35

new threet for writing do not um I'm not

play31:39

going to use the pro feature because I I

play31:40

don't need it um okay I'm going to

play31:43

actually send it so we create a new

play31:45

thread and then I'm going to change the

play31:50

what do we change we change the

play31:51

Javascript file so I'm going to stop the

play31:53

generation and edit the

play31:56

prompt Bas on is the same JavaScript

play32:00

file is different boom save oops not

play32:03

like

play32:04

this and then CSS file has been altered

play32:10

slightly

play32:13

so the extension works but only when I

play32:17

click the

play32:21

icon in the top right it has to automat

play32:27

that is

play32:29

not ended it it has to automatically

play32:34

take up the whole screen when

play32:38

visiting twitter.com or

play32:42

x.com preventing me from wasting time on

play32:46

the

play32:47

website okay make the required changes

play32:53

beautiful so now we are not going to get

play32:56

any interference from the web search

play32:57

because right now we don't need web

play32:59

search before it was useful now it could

play33:01

be potentially distracting the

play33:04

llm we just want to use the best of CLA

play33:06

3 which is amazing at programming to

play33:09

help us fix this so to make the

play33:11

extension orally take up the whole

play33:12

screen when visiting twitter.com you

play33:13

need to modify the Manifest file so I'm

play33:15

going to copy this manifest file I'm not

play33:18

sure why it's not in what the

play33:21

heck why is not as a code

play33:25

block make sure to Output the code in

play33:28

code

play33:29

blocks why did it not do

play33:32

that that's very

play33:34

weird yeah much

play33:36

better yeah I don't know why I didn't do

play33:38

that so I'm just going to copy this boom

play33:41

this is the Json go back change this up

play33:45

and then we need to change

play33:48

the oh new file new file name content JS

play33:53

interesting all right why not new file

play33:56

content Js

play33:58

copy the

play34:04

code wait remove the popup JS file Jesus

play34:09

okay I'm just going to create a new

play34:11

folder. old and drag popup JS into there

play34:22

sure

play34:24

and I should probably do new new folder

play34:29

icons and then drag everything in there

play34:32

but we have to you know change it

play34:35

obviously so we have to do icon slash

play34:40

hopefully this

play34:43

works or maybe slash icons or whatever

play34:46

we'll see we'll see if it works or not

play34:50

um update CSS

play34:57

okay so from the

play34:59

H2 boom

play35:02

save and let's see let's reload the

play35:04

extension and see if third time is the

play35:08

charm we have it reloaded let's go

play35:10

Twitter can it block it can it block it

play35:14

no it did not block

play35:17

it

play35:19

h x.com

play35:23

home x.com

play35:30

all right so obviously we have to

play35:32

somehow debug it which is kind of tough

play35:35

because I'm a complete Noob when it

play35:37

comes to Chrome

play35:38

extensions but hey at least I have the

play35:41

power of AI at my fingertips so

play35:43

whatever uh we are right here so I'm

play35:46

going to close this threet I'm not using

play35:47

that one

play35:49

anymore I'm going to

play35:51

say the extension still does not work

play35:56

when I visit x.com or twitter.com it has

play36:02

to it has

play36:05

to take up the entire

play36:10

screen before the site even loads and

play36:13

showing the two

play36:17

buttons in the

play36:19

center

play36:21

with the text above very simple

play36:27

step one brainstorm three

play36:32

paragraphs where you look at all of the

play36:36

current files

play36:39

reasoning on why it does not work step

play36:44

two

play36:46

implement the changes and give me the

play36:50

full code of all changed files in code

play36:54

blocks I don't know why I had to mention

play36:55

that last time but it's good to use code

play36:58

blocks for you know just visibility

play37:01

because without them it's kind of hard

play37:03

to orient yourself into

play37:08

response it appears the main issue lies

play37:10

in the content script script is injected

play37:12

into web page I have to this load

play37:16

it it is the overlay is not displayed

play37:19

though like I'm here and overlay does

play37:23

not

play37:26

display hm

play37:32

TR again then there you know no shame in

play37:35

debugging and this is also maybe a good

play37:38

thing that is happening live as I'm

play37:40

doing it is that it's you know if it

play37:42

worked on the first try I think it would

play37:43

set unrealistic expectations because you

play37:46

might want to build something more

play37:47

advanced and it might take you few few

play37:49

tries to do it you would be like oh my

play37:52

God David why did it work for you

play37:54

doesn't work for me now you can see like

play37:56

I have to actually put some effort and F

play37:58

into it to make it happen because AI is

play38:01

not perfect yet now obviously I could

play38:02

use more AI tools I could utilize GitHub

play38:05

copilot from vs code I could utilize

play38:08

curser IDE CH

play38:10

GPD I was just this video is about

play38:13

building anything with Gemini so I just

play38:14

want to not Gemini perplexity I just

play38:17

want to use perplexity to do the entire

play38:19

job so I think we can do that so let's

play38:22

see um

play38:30

but actually I have an idea earlier if

play38:33

you remember I said that gbd4 is better

play38:36

at

play38:38

debugging than perplexity right so what

play38:42

I'm going to do is I'm going to copy

play38:43

this go into settings change the AI

play38:46

model to GPT 40 the greatest model from

play38:49

open AI which is perhaps the best model

play38:51

at debugging and I'm going to use this

play38:53

to debug the code let's see if it

play38:55

figures out let's let's cut to the chase

play38:59

update the Manifest Json

play39:02

file okay

play39:05

copy boom save might need to bring this

play39:08

guy up revive

play39:10

it inject a full screen overlay when you

play39:13

visit these sides here I can do it so we

play39:15

have the new Json file again I'm going

play39:17

to copy paste save Let's see we made the

play39:20

changes maybe I should tell it to always

play39:24

output the whole code or something like

play39:27

that we'll see I'm going to reload it it

play39:29

is reloaded and actually let's do by

play39:32

attacking distracting sides save reload

play39:36

right beautiful let's go Twitter oh

play39:41

excuse my language but it actually works

play39:44

I mean I can still scroll it in the

play39:45

background but this is this is

play39:47

amazing

play39:49

wow I'm actually going to use this

play39:51

extension I'm not even not even joking

play39:53

so go to task list and we go to

play39:55

perplexity which is the URL we set

play39:58

oh my God and okay let's do another test

play40:01

it actually works go continue to side

play40:03

and I can continue to side wow obviously

play40:05

this is not perfect you know if I were

play40:08

to spend more time on this I could fix

play40:11

it up but like wow okay maybe uh one

play40:15

last change I want to do is that you

play40:17

know instead of like lowering the

play40:18

opacity just make the background black

play40:20

like fully

play40:22

black uh yeah I mean I'm just going to

play40:25

I'm just going to ask it why not

play40:28

wow this is amazing this is actually

play40:29

amazing man I'm going to be using this

play40:32

extension like actually so let's see um

play40:35

instead of dimming

play40:37

the background slash lower lowering

play40:43

opacity which is what the code is doing

play40:48

is doing now why not just make it fully

play40:52

black so I don't even see the tweets

play40:56

below it

play40:58

make the necessary changes is it in the

play41:02

CSS I'm going to copy change the CSS

play41:05

file and then we do no changes to

play41:08

anything else yes makes sense reload the

play41:11

extension and let's see boom fully black

play41:15

background I mean I would say this is

play41:17

amazing success as you can see it took

play41:19

me less than an hour to build a Chrome

play41:22

extension that will save me many hours

play41:25

in the future and I'm a complete Noob

play41:28

when it comes to JavaScript Json HTML

play41:31

and CSS I've built all okay all of the

play41:34

Chrome extens I've built in the past

play41:36

were with ch gbt or proxity none of them

play41:39

by myself so don't get scared thinking

play41:42

oh my God it involves code I cannot do

play41:44

this you absolutely can just decide what

play41:48

you're going to do and start making

play41:50

progress on it and as I always say if

play41:52

you get stuck in anything just ask

play41:55

perplexity to help you get unstuck St

play41:57

describe the situation give it all the

play41:59

necessary context and use these AI tools

play42:02

to achieve your goals if you found this

play42:04

video valuable Please Subscribe because

play42:07

I'm I'm blown away I'm actually going to

play42:08

use this and if you want the code to uh

play42:10

extension I'm going to leave it um in

play42:12

the description below thanks for

play42:14

watching

Rate This

5.0 / 5 (0 votes)

Related Tags
AI工具Chrome扩展生产力编程教学网页开发JavaScript用户界面自定义效率提升技术教程
Do you need a summary in English?