Yishan
2100 posts
|
We want our Mac Dashboard Widget naow! :D
|
coolman11135
13 posts
|
thats very useful thanks alot aC!
|
Vara
763 posts
|
I’ve created a mod-search script: (V1.04)
javascript:var timed = 5; var att = 1; var onlineMods = new Array(); var myMods = window.open("http://www.kongregate.com/accounts/Modfriend/friends"); myMods.blur(); function readMods() { var mods = myMods.document.getElementsByTagName("td"); for(i=0;i<mods.length;i++) { if(i+1 < mods.length) { if(mods[i+1].innerHTML.substring(0,7) == "playing") { onlineMods.push(mods[i].innerHTML.substring(mods[i].innerHTML.indexOf(">")+1, mods[i].innerHTML.indexOf("</A>"))); }}}; if(onlineMods.length > 0) { var myText = "Some online moderators:\n"; for(i=0;i<onlineMods.length;i++) {myText += onlineMods[i]+"\n"; } alert(myText); myMods.close(); } else {att++; if(att <= 25) { myMods.location.href = "http://www.kongregate.com/accounts/Modfriend/friends?page="+att; setTimeout("readMods()", timed*1000); } else {alert("Sorry, but I can't find any online mods, possible causes:\n+Your connection is too slow - the page must be loaded in "+timed+" seconds\n+ There aren't any online mods\n+ This script is outdated"); myMods.close(); }}}; setTimeout("readMods()", timed*1000); void(0);
I have tested this on IE (I haven’t tested it a lot through)
What it does:
This scrip is meant to find some online mods without having you to waste your time.
This script automatically opens a window and instandly removes its focus so you won’t see it. NOTE: it will be visible for a very short time and then directly removes it, so if you have elipesy (or how it’s writed; you get hurt from flashing lights), you better don’t use this. Then it browses the page from modfriend until it finds a page that contains online mods. Then it lists the online mods and alerts it to you, after that will the window (containing the mods) automatically close itself.
How to use:
It works if you copy-paste it in your URL-bar (no greasemonkey needed, yay!), and then press ENTER.
This might wase your as much as going to modfriend and checking his friens, so there is an easier way: you can add it to your favorites (add a random page, then right-click>properties and change the URL), and you only have to click on it and you’re done.
Advanced use:
The variable timed (var timed = 5;) reflects how long the script gives the page to load, it is the time the page has to load (in seconds) before the script checks if there are online mods, if the page didn’t load, if won’t find any mods. If you have a slow connection, you’ll have to increase the time (eg. change it to var timed = 10;).
Disclaimer:
I am not responsible for any damage this may cause
(that doesn’t mean that this will cause damage, but eg. in case somebody with elipsy used this and starts complaining)
|
Ventero
1271 posts
|
This one’s a modified version of Vara’s script, which doesn’t open a new window/tab, but uses Ajax:
javascript:var page = 1,mods = new Array();function findMods(){new Ajax.Request("/accounts/Modfriend/friends?page="+page, {method: "get",onComplete: function(r){if(r.status == 200){a = r.responseText.split("<td>");for(var i = 0; i < a.length; i++){var k = a[i].match(/<a href="\/accounts\/(\w+)">/);if(k && k[1] && a[i+1].substring(0, 8) == "playing "){l = a[i+2].match(/>join in ([^<]+)</);mods.push(k[1]+" in room "+l[1]);}}}if(mods.length){alert("Some online mods:\n"+mods.join("\n"));} else if (page <= 25){page++;findMods();} else {alert("Could not find any online mods!")}}});}findMods();
|
Vara
763 posts
|
A version of Ventero with an extra feature:
/mod
This script works the same as Venteros one exept it has the /mod command, syntax:
/mod AbusiveUser [, problem]
If you type this in the chat (eg. /mod Vara spamming) and USE THE SCRIPT (do NOT press enter) it will replace it with a private message targetted at a random online mod.
Syntax explainded:
/mod : This is the basic command to use a modcall, without it will it just list the online mods
AbusiveUser : The user that should be reported
problem : This is optional, not required. If not given, it will say “abusing the chat”
And the script:
javascript:var page = 1,mods = new Array();function findMods(){new Ajax.Request("/accounts/Modfriend/friends?page="+page, {method: "get",onComplete: function(r){if(r.status == 200){a = r.responseText.split("<td>");for(var i = 0; i < a.length; i++){var k = a[i].match(/<a href="\/accounts\/(\w+)">/);if(k && k[1] && a[i+1].substring(0, 8) == "playing "){l = a[i+2].match(/>join in ([^<]+)</);mods.push(k[1]+" in room "+l[1]);}}}if(mods.length){var myChat = document.getElementsByTagName("textarea")[1]; var myCommands = myChat.innerHTML.split(" "); if(myCommands[0] == "/mod" && myCommands[1]) { javascript:var myDivs = document.getElementsByTagName("div"); var l; for(l=0;l<myDivs.length;l++) {if(myDivs[l].className == "room_name_container") {while(myCommands.length>3) {myCommands[2] += " "+myCommands[3]; myCommands.splice(3,1); }; var myChatRoom = myDivs[l].getElementsByTagName("span")[0].innerHTML}}; myChat.innerHTML = "/w "+mods[Math.floor(Math.random()*mods.length)].split(" ")[0]+" An user called \""+myCommands[1]+"\" is "+(myCommands[2] ? myCommands[2] : "abusing the chat")+" in "+myChatRoom+", can you come there, please?"; } else {alert("Some online mods:\n"+mods.join("\n"));}} else if (page <= 25){page++;findMods();} else {alert("Could not find any online mods!")}}});}findMods();
Disclaimer: I am not responsible for any damage this script may cause.
NOTE: This script was created before the modcall script
|
Real_AwEsUm
61 posts
|
Never got the Download for a Mod Call button T-T
Any chance of Posting that?
|
googoolyeye
3996 posts
|
Originally posted by Yishan:
We want our Mac Dashboard Widget naow! :D
|
Jonny666
745 posts
|
awsome, the web widget this is great
|
JohnRulz
2218 posts
|
|