I added a youtube video in my sig.
Offline
java test [scratch=java]jonzo/2096633[/scratch=java]
Modified version has java player
Offline
can somebody debug this script?
// ==UserScript== // @name enable images on scratch forum and more! // @namespace rookwood101,Cocolover,LS97,flashgocrazy // @description enable images on scratch forum, added youtube and projects // @include http://scratch.mit.edu/forums/viewtopic.php* // ==/UserScript== if (document.URL.indexOf('http://scratch.mit.edu/forums/viewtopic.php') != -1) { var bodyElement = document.getElementsByTagName("body")[0]; var bodyInner = bodyElement.innerHTML; var addImages = bodyInner.replace(/\[img\]/ig, '<img src="').replace(/\[\/img\]/ig, '">'); var addYoutube = addImages.replace(/\[youtube\]/ig, '<iframe width="420" height="315" src="http://www.youtube.com/embed/').replace(/\[\/youtube\]/ig, '"frameborder="0" allowfullscreen></iframe>'); var addProjects = addYoutube.replace(/\[scratch=flash\]/ig, '<object width="483" height="387" type="application/x-shockwave-flash" data="http://scratch.mit.edu/static/misc/PlayerOnly.swf"><param name="allowScriptAccess" value="always"><param name="allowFullScreen" value="true"><param name="flashvars" value="project=http://scratch.mit.edu/static/projects/').replace(/\[\/scratch\]/ig, '.sb?version=1"></object>'); var addJava = addYoutube.replace(/\[scratch=java\]/ig, '<applet id='ProjectApplet' style='display:block' code='ScratchApplet' codebase='http://scratch.mit.edu/static/misc' archive='ScratchApplet.jar' height='387' width='482'><param name='project' value='../../static/projects/').replace(/\[\/scratch=java\]/ig, '.sb"></applet>'); document.getElementsByTagName("body")[0].innerHTML = addJava; }
Last edited by flashgocrazy (2011-12-30 19:21:51)
Offline
It doesn't work. When I click the download link, all it does is bring me to the script
Offline
[youtube]wbxuSwjk13U[/youtube]
Offline
Nexstudent wrote:
It doesn't work. When I click the download link, all it does is bring me to the script
What browser are you using?
Offline
Servine wrote:
http://dl.dropbox.com/u/41073707/get_antidote.png
^
|_ Could we use that to promote it. Try clicking it!
On the website for the safari tutorial, link them to the other website first, then the download link.
Also, for internet explorer, you didn't link to the page.
Finally, I dislike the fact that you have used a flash website, but I appreciate the fact that you did it quickly, and might not have the time to make a non-flash site.
I like the idea though
Offline
How about that? I prefer it
Last edited by rookwood101 (2011-12-30 17:39:03)
Offline
rookwood101 wrote:
http://yourimg.in/m/044tf21.png
How about that? I prefer it
have you checked out this post?
Offline
rookwood101 wrote:
Nexstudent wrote:
It doesn't work. When I click the download link, all it does is bring me to the script
What browser are you using?
Firefox
Offline
Nexstudent wrote:
rookwood101 wrote:
Nexstudent wrote:
It doesn't work. When I click the download link, all it does is bring me to the script
What browser are you using?
Firefox
as long as you have installed the greasemonkey addon, it will work.
Offline
Servine wrote:
K, rookwood101.
I'll fix the website later.
I changed my sig too.
Maybe, we could...
@View SWF's
@Use HTML Code
@Use JavaScript
1. possibly
2. definately not (unless we use different bb code tags)
3. not sure.
Offline
things I think we should work on in the near future: Making it not show in code boxes. Making it so that people can't add extra things into the tags, compromising security.
making it intelligent: being able to check whether it is a complete tag.
Offline
Not sure if anyone has said this before, but the _meow_ doesn't work.
And that also means that cuss words aren't filtered.
Offline
henley wrote:
Not sure if anyone has said this before, but the _meow_ doesn't work.
And that also means that cuss words aren't filtered.
No, because _meow_ is an image. Cuss words aren't.
Offline
ok, got the resizing:
// ==UserScript== // @name enable images on scratch forum and more! // @namespace rookwood101,Cocolover,LS97,flashgocrazy,roijac // @description enable images on scratch forum, added youtube and projects // @include http://scratch.mit.edu/forums/viewtopic.php* // ==/UserScript== if (document.URL.indexOf('http://scratch.mit.edu/forums/viewtopic.php') != -1) { var bodyElement = document.getElementsByTagName("body")[0]; var bodyInner = bodyElement.innerHTML; var addImages = bodyInner.replace(/\[img\]/ig, '<img src="').replace(/\[\/img\]/ig, '" style="max-width: 510px;">'); var addYoutube = addImages.replace(/\[youtube\]/ig, '<iframe width="420" height="315" src="http://www.youtube.com/embed/').replace(/\[\/youtube\]/ig, '"frameborder="0" allowfullscreen></iframe>'); var addProjects = addYoutube.replace(/\[scratch=flash\]/ig, '<object width="483" height="387" type="application/x-shockwave-flash" data="http://scratch.mit.edu/static/misc/PlayerOnly.swf"><param name="allowScriptAccess" value="always"><param name="allowFullScreen" value="true"><param name="flashvars" value="project=http://scratch.mit.edu/static/projects/').replace(/\[\/scratch\]/ig, '.sb?version=1"></object>'); document.getElementsByTagName("body")[0].innerHTML = addProjects; }
works on firefox nightly
test:
Offline
ProgrammingFreak wrote:
henley wrote:
Not sure if anyone has said this before, but the _meow_ doesn't work.
And that also means that cuss words aren't filtered.No, because _meow_ is an image. Cuss words aren't.
But the Scratch team is uses the same filtering system. It treats _meow_ like a cuss word, but instead of replacing it with an asterisk, they replace it with the image.
Offline
henley wrote:
ProgrammingFreak wrote:
henley wrote:
Not sure if anyone has said this before, but the _meow_ doesn't work.
And that also means that cuss words aren't filtered.No, because _meow_ is an image. Cuss words aren't.
But the Scratch team is uses the same filtering system. It treats _meow_ like a cuss word, but instead of replacing it with an asterisk, they replace it with the image.
No, it's just a custom smiley.
Offline
henley wrote:
ProgrammingFreak wrote:
henley wrote:
Not sure if anyone has said this before, but the _meow_ doesn't work.
And that also means that cuss words aren't filtered.No, because _meow_ is an image. Cuss words aren't.
But the Scratch team is uses the same filtering system. It treats _meow_ like a cuss word, but instead of replacing it with an asterisk, they replace it with the image.
Actually, it uses the cuss-word system to replace _meow_ with [img](stuff)[/img]
Offline