The Student Room Group

How can I run this code?

<script type="text/javascript">
// Launch the rocket!
var launchRocket = function (sequence) {
if (sequence === 321) {
var _$_f307 = ["\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65", "\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E\x2D\x77\x69\x6E\x64\x6F\x77", "\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x43\x6C\x61\x73\x73\x4E\x61\x6D\x65", "\x62\x6F\x64\x79", "\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E\x2D\x77\x69\x6E\x64\x6F\x77\x20\x61\x6E\x69\x6D\x61\x74\x65", "\x74\x61", "\x6b\x33\x6d", "\x6f\x76\x33", "\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C", "\x72\x6F\x63\x6B\x65\x74\x2D\x63\x6F\x64\x65"];
document[_$_f307[3]][_$_f307[2]](_$_f307[1])[0][_$_f307[0]] = _$_f307[4];
var e = _$_f307[5];
var x = _$_f307[6];
var n = _$_f307[7];
document[_$_f307[3]][_$_f307[2]](_$_f307[9])[0][_$_f307[8]] = e + x + n;
}
}
</script>

I need to be able to run this code without clicking a "run" button.

Scroll to see replies

Reply 1
is it possible to include a timer?
Original post by shawtyb
is it possible to include a timer?


I'm not sure how to do that :/
Reply 3
Original post by GCSEstudent1307
I'm not sure how to do that :/


its been a long time since i coded and even then it was only basic
try codeacademy
Original post by shawtyb
its been a long time since i coded and even then it was only basic
try codeacademy


Erm... Okayyy
What exactly do you want?
Lol. It's a small world.
Reply 7
Wait how did yi get that code from the image?
You can decode the javascript they've put on the source code using any hex to text converter. It turns into:


// Launch the rocket!
var launchRocket = function (sequence) {
if (sequence === 321) {
var _$_f307 =["className", "animation-window",
"getElementsByClassName", "body", "animation-window animate",
"z0", "omf", "orward", "innerHTML", "rocket-code"];
document[_$_f307[3]][_$_f307[2]](_$_f307[1])[0][_$_f307[0]] = _$_f307[4];
var e = _$_f307[5];
var x = _$_f307[6];
var n = _$_f307[7];
document[_$_f307[3]][_$_f307[2]](_$_f307[9])[0][_$_f307[8]] = e + x + n;
}
}

But it still doesn't work if I try to run it on the chrome console? Any ideas?
I hadn't thought of that. I'll try it and let you know.
im on this question too
code doesn't work on Mac either
Original post by flare001
You can decode the javascript they've put on the source code using any hex to text converter. It turns into:


// Launch the rocket!
var launchRocket = function (sequence) {
if (sequence === 321) {
var _$_f307 =["className", "animation-window",
"getElementsByClassName", "body", "animation-window animate",
"z0", "omf", "orward", "innerHTML", "rocket-code"];
document[_$_f307[3]][_$_f307[2]](_$_f307[1])[0][_$_f307[0]] = _$_f307[4];
var e = _$_f307[5];
var x = _$_f307[6];
var n = _$_f307[7];
document[_$_f307[3]][_$_f307[2]](_$_f307[9])[0][_$_f307[8]] = e + x + n;
}
}

But it still doesn't work if I try to run it on the chrome console? Any ideas?


What happened to the numbers next to the " _$_f307"?
Original post by Mya_oty
im on this question too


Oooh, have you done challenge 9?
yepp
Original post by GCSEstudent1307
What happened to the numbers next to the " _$_f307"?


You have to plug those number into a hexadecimal to text converter and it comes up with the text I posted. Try this one:
http://www.unit-conversion.info/texttools/hexadecimal/
Yeah I've done challenge 9 too
Plz helppppp
I don't get it 😭
Well, I do get it, but everything I type doesn't work :/
Original post by GCSEstudent1307
What happened to the numbers next to the " _$_f307"?


Ohhhh. I know what happened now. The TSR app messed it up

Quick Reply

Latest