RunouwX Greasemonkey Script

Post questions, comments, and suggestions about Runouw.com here.

RunouwX Greasemonkey Script

Postby Suyo » March 13th, 2010, 9:29 am

This is the development topic for the RunouwX script.

Q: RunouwX? Wut?
RunouwX is a Greasemonkey Script to enhance Runouw.com. May it be additional function for the forums, or for the LDP.

Q: Can I help?
If you have experience in JavaScript and Greasemonkey, of course. Or you just tell us suggestions. Keep in mind not everything is possible, like making a totally new game or something to report comments and stuff since we can't access the database with this.

Q: How do I use it?
Install Greasemonkey, right-click the monkey icon in the bottom right and hit "New Script". Type in:
Name: RunouwX
Namespace: *
Description:
Include: *
Exclude: -empty-
Hit OK, then choose a Notepad Application. May be Wind'ohs Notepad or Notepad++ or wuteva. Copy the header below into the code, replacing everything. Then you may copy the functions you want into the code.

Header
Code: Select all
// ==UserScript==
// @name           RunouwX
// @namespace      http://runouw.com/forums/*
// @description    Extending runouw.com - by Superyoshi
// @include        http://runouw.com/forums/*
// ==/UserScript==

/* Header Update Log (GMT)
13th March 2010, 5:29 pm - With explodeArray function and splitting URL
*/

function explodeArray(item,delimiter) {
   tempArray=new Array(1);
   var Count=0;
   var tempString=new String(item);

   while (tempString.indexOf(delimiter)>0) {
      tempArray[Count]=tempString.substr(0,tempString.indexOf(delimiter));
      tempString=tempString.substr(tempString.indexOf(delimiter)+1,tempString.length-tempString.indexOf(delimiter)+1);
      Count=Count+1
      }

   tempArray[Count]=tempString;
   return tempArray;
   }

// parts[0] will be the page you're on (for example "http://runouw.com/forums/posting.php"), variables[x] the PHP values (for example variables[0]="mode=post" and variables="f=11" if URL is "http://runouw.com/forums/posting.php?mode=post&f=11")
var parts = explodeArray(location,'?')
var variables = explodeArray(parts,'&')

Any functions used in scripts go here, so others can use them too.

Functions
Skip "Message was successfully posted" page
Code: Select all
   //----------------------
    // Skip "Message was successfully posted" page
    // by Superyoshi
    //----------------------
    // I dunno if there are errors when deleting posts/topics.
    //----------------------
   
    if (parts[0] == 'http://runouw.com/forums/posting.php') {
      links = document.getElementsByTagName('a');
      for (var i = 0; i < links.length; i++) {
         a = links[i];
         if (a.innerHTML == 'View your submitted message') {
            window.location.href = a.href;
            }
         }
      }

/* Function Update Log (GMT)
13rd March 2010, 6:06 pm - Now going to posted post instead of start of the topic
13th March 2010, 5:29 pm - First version, going to first page of topic
*/
Image

Image

Image

Image

Image

Image
User avatar
Suyo
"quite easily the most manly man of all" --Raz

Error contacting Twitter
Error contacting last.fm
 
Posts: 2771
Joined: July 28th, 2009, 2:41 am
Location: Nuremberg (Germany)

Runouw Votes Winner
For winning the RV New Year 2012 Award for Best Moderator. Like you didn't know. XD

Thumbs Up given: 26 times
Thumbs Up received: 359 times

Re: RunouwX Greasemonkey Script

Postby TrappedTime » March 13th, 2010, 11:43 am

Name: RunouwX
Namespace: *
Description:
Include: *
Exclude: -empty-

For the *'s do we put exactly what's between the *'s in the code box?
Gregg Shorthand : http://gregg.angelfishy.net/
(Chapters on the right column)
TrappedTime
The Legacy

 
Posts: 777
Joined: August 6th, 2009, 7:58 pm

Thumbs Up given: 0 times
Thumbs Up received: 1 time

Re: RunouwX Greasemonkey Script

Postby Suyo » March 14th, 2010, 1:06 am

Whoops, little error ^.^" Both should be
Code: Select all
http://runouw.com/forums/*
Image

Image

Image

Image

Image

Image
User avatar
Suyo
"quite easily the most manly man of all" --Raz

Error contacting Twitter
Error contacting last.fm
 
Posts: 2771
Joined: July 28th, 2009, 2:41 am
Location: Nuremberg (Germany)

Runouw Votes Winner
For winning the RV New Year 2012 Award for Best Moderator. Like you didn't know. XD

Thumbs Up given: 26 times
Thumbs Up received: 359 times


Return to Site Discussion