[app]http://www.w3schools.com/tags/helloworld.swf[/app]
Last edited by gbear605 (2012-02-20 17:29:13)
Offline
veggieman001 wrote:
wat
I was testing an applet inserter thing. It obviously didn't work
Offline
gbear605 wrote:
veggieman001 wrote:
wat
I was testing an applet inserter thing. It obviously didn't work
![]()
Flash doesn't use applets
Offline
veggieman001 wrote:
gbear605 wrote:
veggieman001 wrote:
wat
I was testing an applet inserter thing. It obviously didn't work
![]()
Flash doesn't use applets
![]()
Really what I was testing is an object inserter, but I named it applet, because object would sound weird in context
Offline
KajHacker wrote:
I don't think HTML works on the forums, only BBcode.
It is custom BBcode. I think he is making a userscript or something that allows people to embed flash content. I'm not exactly sure.
Btw, nice username XP
Offline
Eh, I'm too lazy to finish it, so if anyone wants to fix my bug, go ahead. You can publish it if you like, but give me credit.
// ==UserScript==
// @name Applet Enabler
// @namespace gbear605
// @description Enable applets on scratch forum, based on the image enabler by rookwood101,Cocolover,LS97,flashgocrazy
// @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 appurls = new Array();
for (i=0;i<bodyInner.split(/\[app\]/i).length-1;i++) {
appurls[i] = bodyInner.split(/\[app\]/i)[i+1].split(/\[\/app\]/i)[0];
if (appurls[i].replace(/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/i, "") != "") {
appurls[i] = 'http://img94.imageshack.us/img94/6045/invalidimage.png';
}
}
var addJava = bodyInner;
for (i=0;i<javaurls.length;i++) {
addApplet = addApplet.replace(/\[app\](http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?\[\/app\]/i, '<object data="' + appurls[i] + '"></object>');
}
}Offline