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

#1 2011-12-29 16:02:36

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

lets make a new img tag

Update!!!
Rookwood10 has successfully made the img tag work in scratch!

rookwood101 wrote:

Basically, this is a special script (called a userscript) that applies javascript code to certain browser pages. It changes all of the broken img tags into images!

If the scratch team do not like what I have done I will happily take this down. Remember kids; use this at your own risk - if you see inappropriate images, it's not my fault!

Thanks to Cocolover for some of the code!

Firefox works
Google chrome works
Opera probably works
Safari works if you install some stuff (follow this guide)
Internet explorer works if you install some stuff (follow this guide) - advanced users only


All you have to do is:

1. (firefox only) go to the addons page and search for greasemonkey, install it.

2. (all supported browsers) click this link to Download the script or this one

3. click allow/install on the message that pops up

4. Visit any scratch forum topic with images and be amazed!
(beware that it doesn't work on some threads - probably ones that use the img tag without putting an image in/when refering to it)

THERE WILL BE BUGS

5. ???

6. PROFIT!

Refresh the page after completing all the steps to check if you can see the image below:

http://ludix.com/moriarty/images/works.jpg

Last edited by flashgocrazy (2011-12-29 21:28:47)


◕‿◕

Offline

 

#2 2011-12-29 16:06:20

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: lets make a new img tag

Umm... How are you going to accomplish this?


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#3 2011-12-29 16:08:13

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

Re: lets make a new img tag

I have an idea which will still enable users to use the image tag, but will only be able to view it if they use either chrome or firefox (possibly others) and install a 'userscript' that converts all [img] to html img tags.


http://i.imgur.com/zeIZW.png

Offline

 

#4 2011-12-29 16:08:58

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: lets make a new img tag

I like the javascript idea

EDIT: I can dev.

Last edited by bobbybee (2011-12-29 16:11:55)


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#5 2011-12-29 16:12:55

meowmeow55
Scratcher
Registered: 2008-12-24
Posts: 1000+

Re: lets make a new img tag


Yawn.

Offline

 

#6 2011-12-29 16:14:29

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

Re: lets make a new img tag

A very primitive solution, but useful none-the-less.


http://i.imgur.com/zeIZW.png

Offline

 

#7 2011-12-29 16:14:48

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: lets make a new img tag

bobbybee wrote:

I like the javascript idea

EDIT: I can dev.

HIRED!  big_smile
@meowmeow55
It only makes 50X50 images


◕‿◕

Offline

 

#8 2011-12-29 16:23:45

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: lets make a new img tag

there is a reason the img tag was disabled, and I'm pretty sure it's temporary.

Offline

 

#9 2011-12-29 16:24:56

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: lets make a new img tag

samtwheels wrote:

there is a reason the img tag was disabled, and I'm pretty sure it's temporary.

probably not.


◕‿◕

Offline

 

#10 2011-12-29 16:26:04

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: lets make a new img tag

Thanks, flashgocrazy. What should we start?


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#11 2011-12-29 16:26:13

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: lets make a new img tag

rookwood101 wrote:

I have an idea which will still enable users to use the image tag, but will only be able to view it if they use either chrome or firefox (possibly others) and install a 'userscript' that converts all [url]to html img tags.

added idea  big_smile


◕‿◕

Offline

 

#12 2011-12-29 16:28:02

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: lets make a new img tag

flashgocrazy wrote:

samtwheels wrote:

there is a reason the img tag was disabled, and I'm pretty sure it's temporary.

probably not.

check misc. It's because of the troll attacks, and you will be sorry if you put a lot of work into it and it just gets enabled again.

Offline

 

#13 2011-12-29 16:32:40

TRocket
Scratcher
Registered: 2009-08-18
Posts: 1000+

Re: lets make a new img tag

I think this is a better long term solution


http://i.imgur.com/1QqnHxQ.png

Offline

 

#14 2011-12-29 16:49:05

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

Re: lets make a new img tag

TRocket wrote:

I think this is a better long term solution

that will take time (if it even happens at all) so a short term solution is more favorable at this current time.


http://i.imgur.com/zeIZW.png

Offline

 

#15 2011-12-29 17:51:44

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: lets make a new img tag

The risk here is that the Scratch team won't like you using this. It is there for a reason, after all  hmm


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#16 2011-12-29 18:03:28

nickbrickmaster
Scratcher
Registered: 2010-02-02
Posts: 500+

Re: lets make a new img tag

It's disabled for a reason.


Ask me what I'm doing, wait an hour than roll a die, if it's 4-6, I'm playing Skyrim, if it's 1, I'm eating, if it's 2-3 I'm programming.
Steam: nickbrickmaster | RotMG: PwnThemAll | Minecraft: nickbrickmaster | League Of Legends: BaneOfTitans

Offline

 

#17 2011-12-29 18:16:23

cocolover76
Scratcher
Registered: 2011-10-09
Posts: 500+

Re: lets make a new img tag

I can dev a bookmarklet that would do that.
(bookmarklets are bookmarks that are javascript [such as javascript:code here])


http://i.imgur.com/HfEPZ.gifhttp://i.imgur.com/pvKb6.png

Offline

 

#18 2011-12-29 18:21:23

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: lets make a new img tag

So you are going to make a web plugin?


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#19 2011-12-29 18:34:49

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: lets make a new img tag

I missed this whole thing... I'm guessing they have a rlly good reason for disabling it. XD

I don't know how you could do this... unless you mean by making a safer img tag for the scratch team to replace.

I could be an idea maker... once I understand this fully.  tongue 

For now if ppl are rlly desperate they can use:
http://scratch.mit.edu/forums/viewtopic … 59&p=1
It is a panther program made by sparks that takes a picture and turns it into bb code using color tags.

Last edited by Pecola1 (2011-12-29 18:35:16)


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#20 2011-12-29 18:39:37

cocolover76
Scratcher
Registered: 2011-10-09
Posts: 500+

Re: lets make a new img tag

I have code that should work, but doesn't.  mad

Code:

var bodyElement = document.getElementsByTagName("body")[0];
var bodyInner = bodyElement.innerHtml;
var replaceOne = bodyInner.replace(/[img]/i, "<img src='");
var replaceTwo = replaceOne.replace(/[/img]/i, "'>");
document.write("<h3>Optimized by a script by Coco! :)</h3>" + replaceTwo);

Last edited by cocolover76 (2011-12-29 18:40:45)


http://i.imgur.com/HfEPZ.gifhttp://i.imgur.com/pvKb6.png

Offline

 

#21 2011-12-29 19:32:14

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: lets make a new img tag

@cocolover76
There was a couple of errors. Try this.

Code:

<script>
function imagify(){
var bodyElement = document.getElementsByTagName("body")[0];
var bodyInner = bodyElement.innerHTML;
var replaceOne = bodyInner.replace("[img]", "<img src='");
var replaceTwo = replaceOne.replace("[/img]", "'>");
document.write("<h3>Optimized by a script by Coco! :)</h3>" + replaceTwo);
}
</script>
<body onload="imagify();">
[img]http://firemmo.site50.net/firemmo.png[/img]
</body>

I support the Free Software Foundation. Protect our digital rights!

Offline

 

#22 2011-12-29 19:38:45

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

Re: lets make a new img tag

I have made a few modifications to your code, and it works!

You cannot use it in internet explorer.

All you have to do is:

1. (firefox only) go to the addons page and search for greasemonkey, install it.

2. (all supported browsers) click this link to Download the script

3. click allow/install on the message that pops up

4. Visit any scratch forum topic with images and be amazed!
(beware that it doesn't work on this thread - I'm guessing that the code on here interfers with the script.)

THERE WILL BE BUGS

5. ???

6. PROFIT!


A topic I made about it

Last edited by rookwood101 (2011-12-29 19:46:01)


http://i.imgur.com/zeIZW.png

Offline

 

#23 2011-12-30 04:15:48

Zeusking19
Scratcher
Registered: 2011-07-10
Posts: 1000+

Re: lets make a new img tag

for example. on the frozen coco thread, only one image turns up. The rest stays text.


http://i49.tinypic.com/2w7e1jm.pnghttp://dragcave.net/image/eFGFz.gifhttp://dragcave.net/image/9hE5q.gif

Offline

 

#24 2011-12-30 04:18:34

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: lets make a new img tag

Zeusking19 wrote:

for example. on the frozen coco thread, only one image turns up. The rest stays text.

Yeah I have that problem also ;/
Anyway really nice scripting  big_smile


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#25 2011-12-30 05:01:37

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

Re: lets make a new img tag

I'm guessing it's because they use capital letters in the image tag.

Edit: it also could be because they use images within links (and I'm not sure why that doesn't work)

Any problem with capitalization should now be fixed.

Last edited by rookwood101 (2011-12-30 05:19:39)


http://i.imgur.com/zeIZW.png

Offline

 

Board footer