this code works if manually run by replacing the address bar and
adding javascript:
but it doesnt work if run via gm4ie, its greasemonkey for ie. I'm
doing this because the website has a protection against firefox so
only ie6 will run. Thanks everyone.
var zz = location.href;
var y=zz.indexOf("koid=");
if(y>1)
{
var now = zz.substr(y+5,4);
var now2 = parseInt(zz.substr(y+5,4));
if(now!=now2)
{
now = zz.substr(y+5,3);
now2 = parseInt(zz.substr(y+5,3));
if(now!=now2)
{
now = zz.substr(y+5,2);
}
}
if(document.body.innerHTML.indexOf("How to Use Agent...")==-1)
{
alert("will save now");
var fso1 = new ActiveXObject("Scripting.FileSystemObject");
var newFileObject1 = fso1.CreateTextFile("C:\\"+now+".html",
true);
newFileObject1.WriteLine(document.body.innerHTML);
newFileObject1.close();
var z=zz.substring(0,y);
var p=""+z+"koid="+(parseFloat(now)+1)+"#ctAnchor";
location.href = p;
}
else
{
alert("will not save");
var z=zz.substring(0,y);
var p=""+z+"koid="+(parseFloat(now)+1)+"#ctAnchor";
location.href = p;
}
}
else
{
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/greasemonkey-users?hl=en
-~----------~----~----~----~------~----~------~--~---