This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-09-27 12:24:04

scratcher7_13
Scratcher
Registered: 2011-02-09
Posts: 1000+

Browser Extesnsion

Does anyone know how to make a browser extension? I am trying to make an extension that replaces a word with an image. Help would be very much appreciated.


♫ 90% of teens can't do math. If you are one of the 40% of teens who can, copy and paste this into your signature. ♫♪
http://dl.dropbox.com/u/6273449/BlockLibraryTitle.pnghttp://i.imgur.com/mr9Hf.gif

Offline

 

#2 2011-09-27 12:42:18

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Browser Extesnsion

Cool project! I make extensions all the time, but they don't work too well for this kind (I tried already, yes).

Offline

 

#3 2011-09-27 12:46:32

scratcher7_13
Scratcher
Registered: 2011-02-09
Posts: 1000+

Re: Browser Extesnsion

LS97 wrote:

Cool project! I make extensions all the time, but they don't work too well for this kind (I tried already, yes).

Nice! I am working on an extension that will add more smileys to the Scratch Forums. Does anyone know how I could do this?


♫ 90% of teens can't do math. If you are one of the 40% of teens who can, copy and paste this into your signature. ♫♪
http://dl.dropbox.com/u/6273449/BlockLibraryTitle.pnghttp://i.imgur.com/mr9Hf.gif

Offline

 

#4 2011-09-27 12:53:52

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Browser Extesnsion

scratcher7_13 wrote:

LS97 wrote:

Cool project! I make extensions all the time, but they don't work too well for this kind (I tried already, yes).

Nice! I am working on an extension that will add more smileys to the Scratch Forums. Does anyone know how I could do this?

I see, that's cool, but do remember that only people with your extension will see the smilies. The method should be a simple JS replace though.

Offline

 

#5 2011-09-27 13:03:35

scratcher7_13
Scratcher
Registered: 2011-02-09
Posts: 1000+

Re: Browser Extesnsion

Do you know the JavaScript replace code? Anyway, I am planning on making the extension freely available.


♫ 90% of teens can't do math. If you are one of the 40% of teens who can, copy and paste this into your signature. ♫♪
http://dl.dropbox.com/u/6273449/BlockLibraryTitle.pnghttp://i.imgur.com/mr9Hf.gif

Offline

 

#6 2011-09-27 13:06:55

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Browser Extesnsion

scratcher7_13 wrote:

Do you know the JavaScript replace code? Anyway, I am planning on making the extension freely available.

it's a simple
document.body.innerHTML = document.body.innerHTML.replace("before", "after")

Offline

 

#7 2011-09-27 13:33:30

scratcher7_13
Scratcher
Registered: 2011-02-09
Posts: 1000+

Re: Browser Extesnsion

LS97 wrote:

scratcher7_13 wrote:

Do you know the JavaScript replace code? Anyway, I am planning on making the extension freely available.

it's a simple
document.body.innerHTML = document.body.innerHTML.replace("before", "after")

Does this work with images?


♫ 90% of teens can't do math. If you are one of the 40% of teens who can, copy and paste this into your signature. ♫♪
http://dl.dropbox.com/u/6273449/BlockLibraryTitle.pnghttp://i.imgur.com/mr9Hf.gif

Offline

 

#8 2011-09-27 13:38:36

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Browser Extesnsion

scratcher7_13 wrote:

LS97 wrote:

scratcher7_13 wrote:

Do you know the JavaScript replace code? Anyway, I am planning on making the extension freely available.

it's a simple
document.body.innerHTML = document.body.innerHTML.replace("before", "after")

Does this work with images?

yes, just put the image tag in the after part.


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#9 2011-09-27 13:46:57

scratcher7_13
Scratcher
Registered: 2011-02-09
Posts: 1000+

Re: Browser Extesnsion

WindowsExplorer wrote:

scratcher7_13 wrote:

LS97 wrote:


it's a simple
document.body.innerHTML = document.body.innerHTML.replace("before", "after")

Does this work with images?

yes, just put the image tag in the after part.

Do you mean the URL?


♫ 90% of teens can't do math. If you are one of the 40% of teens who can, copy and paste this into your signature. ♫♪
http://dl.dropbox.com/u/6273449/BlockLibraryTitle.pnghttp://i.imgur.com/mr9Hf.gif

Offline

 

#10 2011-09-27 13:51:57

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Browser Extesnsion

scratcher7_13 wrote:

WindowsExplorer wrote:

scratcher7_13 wrote:

Does this work with images?

yes, just put the image tag in the after part.

Do you mean the URL?

Just enter the html image tag into the "after" part. Also, how what are you ussing to make the extension anyway?

Last edited by WindowsExplorer (2011-09-27 13:52:42)


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

Board footer