KOCtools: The Script

By Rabble Rouser Last update Jun 1, 2011 — Installed 17,483 times.

Incomapatible with...

in
Subscribe to Incomapatible with... 10 posts, 4 voices



bsquared1 User
FirefoxWindows

This is incompatible with:

1. Tools
2. Bot

It removes he access buttons for those two scripts - which are far more critical than updating the server EVERY TIME someone from your domain logs in.

Also not compatible with the way most of us used it ... for a quick update. How do I get a quick update now that there are a couple of hundred updates in front of mine?

 
Rabble Rouser Script's Author
ChromeWindows

Anyone else having this issue? It shouldn't interfere at all. as for your second issue, im working on a change.

Ill check into it aynways.

 
Marti Scriptwright
FirefoxX11

Rabble Rouser wrote:
Ill check into it aynways.
I'll be observing as well. You are the first person besides myself to actually utilize the JavaScript API in this manner so if there are any issues that our group hasn't foreseen we will address it if needed. :)

As simple as this script is I don't see how usoCheckup (usoC) itself could be removing access to DOM elements (buttons) but then I don't play KOC and I really have no clue what your script actually does on the PHP end.

I am going to be enforcing the frameless requirement in request though within the next couple of days as USO requires this. Please let me know if this is going to be a problem... I may be able to recode something to assist.

usoC is intended for Greasemonkey and preferably version 0.9.1+ as less than that has a few security issues that were closed in GM. usoC follows these guidelines as much as possible. usoC is quite modular so manual update checking is possible but I need to understand how it's being used on the target site in order to answer any questions. I highly doubt I'm going to start playing KOC due to lack of time so descriptions would be of great help.

 
Rabble Rouser Script's Author
ChromeWindows

Yes thank you very much for the reply!
I would like to note that the two scripts he says are not compatable are
http://userscripts.org/scripts/show/89356
and
http://userscripts.org/scripts/show/95542
I have not looked through the code yet to see if something is interfering, but i will try a couple things and let you know.

 
Marti Scriptwright
FirefoxX11

Rabble Rouser wrote:
Yes thank you very much for the reply!
You are welcome.

I closed the frameless hole a little while ago and I've been beta testing with my i/frame host ever since. I believe it is working how it should be now. If someone is playing the game through a frame or iframe they won't be alerted on updates... e.g. it only hits USO and alerts once if the top level window is @included and not i/framed. The top-level script of course can decide on it's own if a frameless check is needed for its own execution.

Rabble Rouser wrote:
I would like to note that the two scripts he says are not compatible are
http://userscripts.org/scripts/show/89356
and
http://userscripts.org/scripts/show/95542
...
So if I am understanding this correctly... you have an update check notification queue server in PHP form for other individual scripts on USO and this script here polls USO for updates via usoC? If so please tell everyone if you are using the meta.js routines for all of them. If you aren't and this is the methodology you risk getting unlisted and/or page blocked without login and possible domain blocked along with everyone elses script that you are polling.

I'm still not completely clear on what you are doing since I am not on KOC... Would you explain a little bit more please?

 
Rabble Rouser Script's Author
ChromeWindows

This is the only script i have that uses uso, what my script does is it sends user session data from facebook and KOC to my server. my server saves this info till it hits the top of the queue then its automated to scrape data about the game from KOC's server.

So now since i have @included the game (inside facebooks iframe) it wont check for updates? Is there any way to direct certain portions of code to one include, and other code at another include?
This will also help me overlay a menu on the facebook page rather than the game iframe.

 
Marti Scriptwright
FirefoxX11

Rabble Rouser wrote:
So now since i have @included the game (inside facebooks iframe) it wont check for updates?
Your current and only @include is this:
...
// @include        http://*.kingdomsofcamelot.com/*main_src.php*
...

This applies to new (re)installers here on this script... If the address bar in the browser matches this pattern then it will update check otherwise it just skips it. This is required so it doesn't hit USO a bazillion times and also my server. DDoS attacks with updaters that use update checks on i/frames are quite common and is why USO itself has been taken down a few times. I noticed a rather large increase from this script so I knew right away that someone was i/framing it and usoC had a bug using your unique implementation of the JavaScript API. (Now fixed and fully tested).

Rabble Rouser wrote:
This will also help me overlay a menu on the facebook page rather than the game iframe.
You will probably want to @include that unframed URL also to ensure that framed users are getting update checks. You can always add a sub check conditional in to see if window.location is on the game url for the user.js script here if you wish. So yes this sounds like a reasonable addition to your script. :)

Rabble Rouser wrote:
This is the only script i have that uses uso, what my script does is it sends user session data from facebook and KOC to my server. my server saves this info till it hits the top of the queue then its automated to scrape data about the game from KOC's server.
Thanks for explaining this.

 
Rabble Rouser Script's Author
ChromeWindows

the code is actually being ran when a user navigates to http://apps.facebook.com/kingdomsofcamelot/
This page contains an iframe that points at http://*.kingdomsofcamelot.com/*main_src.php*
I noticed when i included both pages that the code was being ran multiple times.

So i guess i will need to tell users to manually update the script (at least once) since it wont pop up anymore?

 
Marti Scriptwright
FirefoxX11

Rabble Rouser wrote:
So i guess i will need to tell users to manually update the script (at least once) since it wont pop up anymore?
Not necessarily for everyone just new (re)installers but this is something that is required.

Rabble Rouser wrote:
I noticed when i included both pages that the code was being ran multiple times.
This is where a conditional comes forth in this scripts source

I'm pretty sure this is the regular expression but since I'm not on KOC I have no way of ensuring that it is correct. So you will want to check this thoroughly before publishing to USO. usoC will attend to itself based off your unframed @include in your metadatablock.

if (window.location.href
    .match(/http:\/\/.+?\.kingdomsofcamelot\.com/.+?main_src\.php.*/i) {
  // This portion of code should run
  //   on http://*.kingdomsofcamelot.com/*main_src.php*
  //
  // Insert any portion of your script that is specific to playing the game here.
  // Assuming this will always be framed... usoC will not check here.
  //   If it is unframed then it will check.
}

if (window.location.href
    .match(/http:\/\/apps\.facebook\.com\/kingdomsofcamelot\//i) {
  // This portion of code only runs
  //   on http://apps.facebook.com/kingdomsofcamelot/ which should be unframed
  //
  // Optionally insert usoC JavaScript API request method here.
  //   If this window.location ever becomes framed usoC will cease checking here.
}

// If at least one of the @include rules is unframed then usoC will check
//   on that @include rule otherwise it won't

I think this about explains it as best as I can. You certainly did decide on a non-beginner usage of usoC ;) :)

 
ndiguru User
Firefox

Phew! Now say all that but in script for dummies language. I'm suppose to have an update koc button in between tabs like before or not?

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel