| View previous topic :: View next topic |
| Author |
Message |
gogodr I post too much
Reputation: 125
Joined: 19 Dec 2006 Posts: 2041
|
Posted: Thu Jun 10, 2010 3:38 pm Post subject: ;-; what is wrong? |
|
|
| Code: | // ==UserScript==
// @name adding text styling test
// @namespace http://forum.cheatengine.org/*
// @include *forum.cheatengine.org/*
// ==/UserScript==
var postButton = document.forms.namedItem("post").elements.namedItem("post");
var newmsg = "";
var oldmsg = "";
function FLQ(){
var evalutaionMessage = document.forms.namedItem("post").elements.namedItem("message");
var newmsgpos;
while (parseInt(evaluationMessage.value.search("[/quote]")) != -1 ){
newmsgpos = evaluationMessage.value.search("[/quote]");
evaluationMessage.value.replace("[/quote]","[/oldquote]");
}
newmsg = evaluationMessage.substring(newmsgpos + 8);
oldmsg = evaluationMessage.substring(0,newmsgpos + 8);
function styling(newmsg,oldmsg)
{
FLQ();
var postMessage = document.forms.namedItem("post").elements.namedItem("message");
postMessage.value=oldmsg+"[color=darkblue][size=9] "+newmsg+" [/size][/color]";
}
postButton.addEventListener("click", styling, true); |
Last edited by gogodr on Thu Jun 10, 2010 4:00 pm; edited 2 times in total |
|
| Back to top |
|
 |
Haxory' Grandmaster Cheater Supreme
Reputation: 92
Joined: 30 Jul 2007 Posts: 1900
|
Posted: Thu Jun 10, 2010 3:38 pm Post subject: |
|
|
Error console log?
_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel |
|
| Back to top |
|
 |
gogodr I post too much
Reputation: 125
Joined: 19 Dec 2006 Posts: 2041
|
Posted: Thu Jun 10, 2010 3:40 pm Post subject: |
|
|
| Haxory' wrote: | | Error console log? | where is that?
testing there was a missing.value after evaluationMessage
;-; that was not it ;-;
|
|
| Back to top |
|
 |
Haxory' Grandmaster Cheater Supreme
Reputation: 92
Joined: 30 Jul 2007 Posts: 1900
|
Posted: Thu Jun 10, 2010 3:40 pm Post subject: |
|
|
Err, the line should be given in the firefox error console, it's pretty neat.
_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel |
|
| Back to top |
|
 |
gogodr I post too much
Reputation: 125
Joined: 19 Dec 2006 Posts: 2041
|
Posted: Thu Jun 10, 2010 3:44 pm Post subject: |
|
|
| Haxory' wrote: | | Err, the line should be given in the firefox error console, it's pretty neat. |
oh nice, test
syntax error
while (evaluationMessage.value.search("[/quote]") <> -1 ){
but it should be fine ...
oh wait I know
is there any string to number function ?
|
|
| Back to top |
|
 |
Haxory' Grandmaster Cheater Supreme
Reputation: 92
Joined: 30 Jul 2007 Posts: 1900
|
Posted: Thu Jun 10, 2010 3:48 pm Post subject: |
|
|
Isnt it != in javascript?
_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel |
|
| Back to top |
|
 |
gogodr I post too much
Reputation: 125
Joined: 19 Dec 2006 Posts: 2041
|
Posted: Thu Jun 10, 2010 3:52 pm Post subject: |
|
|
yeah
and also I needed to use parseInt()
----
updated code up there.
now it says syntax error at line 31
THERE IS NO LINE 31 !
|
|
| Back to top |
|
 |
Haxory' Grandmaster Cheater Supreme
Reputation: 92
Joined: 30 Jul 2007 Posts: 1900
|
|
| Back to top |
|
 |
gogodr I post too much
Reputation: 125
Joined: 19 Dec 2006 Posts: 2041
|
Posted: Thu Jun 10, 2010 4:00 pm Post subject: |
|
|
| Haxory' wrote: | | gogodr wrote: |
yeah
and also I needed to use parseInt()
----
updated code up there.
now it says syntax error at line 31
THERE IS NO LINE 31 ! |
:S
Dont know what's the problem then, sorry  |
oh wait.. test
there was a} in thw rong place.. but it wasnt it..
|
|
| Back to top |
|
 |
|