View New Posts
  1. #1
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,014
    SBR Points: 119
    Message Me

    Default Bookmaker/CRIS Stay Logged-In Script for Firefox

    I'm sure I'm not the only who finds the whole auto-logout thing at Bookmaker, CRIS, et. al. rather annoying. This is especially true with Bookmaker/CRIS because the software's login process is so time-consuming.

    For a while I was just using an auto-refresh, but that was kind of annoying as it would flash the page, often refresh at an inopportune time, and I'd always need to remember to reset it when I changed pages.

    Well I played around with it all for a bit and I think I came up with a pretty good solution for FireFox users.

    To install, you'll need the the FireFox add-in GreaseMonkey. If you already have GreaseMonkey you can install the Stay Logged-In Script by clicking here (For new beta version that should work with nearly all books click here.)

    If you don't already have GreaseMonkey visit the FireFox GreaseMonkey page, install the add-in by clicking the "Install Now" button, then restart Firefox and install from the above link.

    (If you want to uninstall, go to Tools/Manage User Scripts, select "Stay Logged-In", and click Uninstall.)

    If you care how it works:
    The script is really quite simple.

    It works by sending making xmlhttpRequest every 5 minutes (to change the refresh time just modify the lRefreshInterval variable, specified in milliseconds) to the main wagering page (wagering2.aspx). This is done behind the scenes with the response summary sent to the Firefox error console ("under Messages") with the response itself is discarded. CRIS & co. treat this request as activity on the player's part and thereby keeping the session alive.

    It's still a bit syntactically messy but it does do the trick. I haven't played around with with it but in order to conserve bandwidth perhaps a page smaller than wagerisng2.aspx might be better suited to the task.

    By design it won't send the request if you're on the main portal page (meaning you're not logged in), if you're viewing the wagering iframe in its own window (which unless you're hacking around you almost certainly are not), or if you're in the process of logging in or out.

    It's currently set up to work with the following sportsbook domains:
    betcris.com
    bookmaker.com
    2betdsi.com
    betdsi.com
    betmaker.com
    yabet.com
    optionsports.com
    betonfighting.com
    4galaxysports.com
    sport-bet.net
    Modifying the script to work with other domains attached to sportsbooks using CRIS software is trivial (it would just be a matter of going to Tools/Manage User Scripts and adding the desired domain).

    Modifying it to work with a different sportsbook (or any other size which automatically logs you out after a period of inactivity) should in most cases probably be fairly easy as well.

    If anyone has any suggestions on how to improve this, please post them here.

    SBR Founder Join Date: 8/28/2005


  2. #2

    Default

    Very useful. This tool should make Mudcat deliriously happy.

    Is this something CRIS might frown upon?

  3. #3
    Bill Dozer's Avatar Administrator
    Join Date: 07-12-05
    Posts: 9,092
    SBR Points: 2931
    Message Me

    Default

    I'm not sure how it looks to them but if player usage time goes up they may look to see why. I wouldn't be surprised if CRIS asks you not to use it the way Pinnacle asks people not to scrape their lines.

    It sounds harmless otherwise... but using stuff like this always seemed like a good way to get profiled.

    SBR Founder Join Date: 7/12/2005


  4. #4

    Default

    I'm already profiled. I just wouldn't want to get profiled out the door.

  5. #5
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,014
    SBR Points: 119
    Message Me

    Default

    To CRIS it just looks identical to a normal Firefox refresh.

    It's only once happening every 5 minutes and it's not like it's requesting any lines or anything. It's basucally just keeping the connection alive by making a simple request.

    SBR Founder Join Date: 8/28/2005


  6. #6

    Default

    This could be a reason for them to not pay your winnings!

  7. #7

    Default

    Quote Originally Posted by 2Pac View Post
    This could be a reason for them to not pay your winnings!
    Let's not get hysterical.

  8. #8
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,014
    SBR Points: 119
    Message Me

    Default

    Quote Originally Posted by 2Pac View Post
    This could be a reason for them to not pay your winnings!
    From CRIS's perspective this is no different from manually refreshing every few minutes.

    SBR Founder Join Date: 8/28/2005


  9. #9

    Default

    I tried it. didnt work
    why are you excluding wagering.aspx?

    SBR Founder Join Date: 9/4/2005


  10. #10
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,014
    SBR Points: 119
    Message Me

    Default

    Quote Originally Posted by Scorpion View Post
    I tried it. didnt work
    why are you excluding wagering.aspx?
    It's not. It's excluding wagering2.aspx.

    wagering2.aspx is the page loaded by AJAX. Under normal usage it would only appear in an IFRAME. If I didn't exclude it would just wind up creating an additional AJAX request.

    What address are you using? Is it one of the one listed above?

    If you go to Tools=>Error Console in FireFox and click the "Messages" button you'll see some script output. Try clearing that and refreshing CRIS/Bookmaker and seeing what it says.

    If it's still logging you out it's possible that for whatever reason your auto-logout period is shorter than 5 minutes. Try changing it to 3 to 4 minutes.

    SBR Founder Join Date: 8/28/2005


  11. #11

    Default

    it works
    thanks

    i think after adding a book, i probably didnt refresh

    how about books like abc islands that use a different software?

    SBR Founder Join Date: 9/4/2005


  12. #12

    Default

    Using these auto refresh utilities at sportsbook slows up the betting pages for other players trying to make plays.

    SBR Founder Join Date: 7/20/2005


  13. #13

    Default

    Quote Originally Posted by Scorpion View Post

    how about books like abc islands that use a different software?
    Good question Scorpion. I would like to know the answer to that one myself.

    SBR Founder Join Date: 8/10/2005


  14. #14
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,014
    SBR Points: 119
    Message Me

    Default

    Quote Originally Posted by jjgold View Post
    Using these auto refresh utilities at sportsbook slows up the betting pages for other players trying to make plays.
    This places considerably less load on a server than a full-page auto-refresh. This script is only requesting the text of a very small page (so no images, for example, are loaded).

    EDIT: I just made a change to the script so that instead of it requesting the entire page it's only requesting the page header, which contains less than 300 bytes of data.
    Last edited by Ganchrow; 12-18-07 at 12:39 PM.

    SBR Founder Join Date: 8/28/2005


  15. #15

    Default

    Quote Originally Posted by bigboydan View Post
    Good question Scorpion. I would like to know the answer to that one myself.
    i tried this but didnt work:

    // ==UserScript==
    // @name Stay Logged-In2
    // @namespace thepig\abc
    // @description Keeps users logged-in to abcislands, 724, thepig, et. al. by sending AJAX request every 5 minutes.
    // @include http://*.abcislands.com/*.*
    // @include http://216.194.167.48/*.*
    // @include http://216.194.163.98/*.*
    // @include http://201.227.241.85/*.*
    // @exclude *PrincipalWithHeader.asp*
    // @exclude *default.aspx*
    // @exclude *login.aspx*
    // @exclude *logout.aspx*
    // ==/UserScript==
    var lRefreshInterval = 5*(60*1000); // in milliseconds
    var fnAJAXRequest = function() **
    var sHTTPName = 'PrincipalWithHeader.asp';
    var myURL = "http://" + document.domain + "/" + sHTTPName;
    GM_log("Auto-refresh: called from " + window.location.href + ", requesting " + myURL);
    GM_xmlhttpRequest(**
    method:"GET",
    url:myURL,
    headers:**
    "User-Agent":"Mozilla/5.0 Gecko/20071127 Firefox/2.0.0.11 (compatible)",
    "Accept":"text/xml,text/html",
    **,
    onload:function(details) **
    GM_log([
    details.status,
    details.statusText,
    details.readyState,
    details.responseHeaders
    ].join("\n"))
    **
    **);
    **;
    GM_log(Date() + "\nAuto-refresh interval for " + window.location.href + " set to " + lRefreshInterval/1000/60 + " minutes.");
    window.setInterval(fnAJAXRequest, lRefreshInterval);

    SBR Founder Join Date: 9/4/2005


  16. #16
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,014
    SBR Points: 119
    Message Me

    Default

    Are there any messages in the FireFox error console?

    SBR Founder Join Date: 8/28/2005


  17. #17

    Default

    Warning: Expected end of value for property but found ':'. Error in parsing value for property 'font-family'. Declaration dropped.
    Source File: http://216.194.167.48/BetBrowse/BetB.../AllStyles.css
    Line: 60

    Warning: Expected end of value for property but found ':'. Error in parsing value for property 'font-family'. Declaration dropped.
    Source File: http://216.194.167.48/BetBrowse/BetB.../AllStyles.css
    Line: 61


    Warning: Expected ':' but found '**'. Declaration dropped.
    Source File: http://216.194.167.48/BetBrowse/BetB.../AllStyles.css
    Line: 62

    SBR Founder Join Date: 9/4/2005


  18. #18
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,014
    SBR Points: 119
    Message Me

    Default

    See if this works for you (make sure to remove the excludes from the GreaseMonkey menu).

    Code:
    // ==UserScript==
    // @name           Stay Logged-In2
    // @namespace      ABC/PIG
    // @description    Keeps users logged-in to abcislands, 724, thepig, et. al. by sending AJAX request every 5 minutes.
    // @include http://*.abcislands.com/*.*
    // @include http://abcislands.com/*.*
    // @include http://216.194.167.48/*.*
    // @include http://216.194.163.98/*.*
    // @include http://201.227.241.85/*.*
    
    
    // ==/UserScript==
    const c_lRefreshInterval = 5*(60*1000);	// in milliseconds
    
    var fnAJAXRequest = function(myURL) **
    	GM_log("Auto-refresh: called from " + window.location.href + ", requesting " + myURL);
    	GM_xmlhttpRequest(**
    	  method:"HEAD",
    	  url:myURL,
    	  headers:**
    	    "User-Agent":"Mozilla/5.0 (compatible) Firefox",
    	    "Accept":"text/xml,text/html",
    	    **,
    	  onload:function(details) **
    	    GM_log([
    	      	(details.readyState == 4 ? "Status: " + details.status + " (" + details.statusText + ")" : "Ready State: " + details.readyState ),
    	      	 details.responseHeaders,
    	    ].join("\n"))
    	  **
    	**);
    **;
    
    if (self.location==top.location) **
    	GM_log(Date() + "\nAuto-refresh interval for " + window.location.href + " set to " + c_lRefreshInterval/1000/60 + " minutes.");
    	window.setInterval(fnAJAXRequest, c_lRefreshInterval, window.location.href);
    **

    If it does work it could pretty much be applied to anything.

    All it does is make an HTTP HEAD request for the top-level window. Let me know if it works.
    Last edited by Ganchrow; 12-18-07 at 03:30 PM. Reason: fixed typos in script code

    SBR Founder Join Date: 8/28/2005


  19. #19

    Default

    for your script "Stay Loggedin" in Manage User Scripts window under Tools I see the include and exclude pages

    For "Stay Loggedin2" I dont see them! I also donet see the list of books or URLs when I install it

    I dont see these in include pages or when I install the script:
    // @include // @include http://*.abcislands.com/*.*
    // @include // @include http://abcislands.com/*.*
    // @include // @include http://216.194.167.48/*.*
    // @include // @include http://216.194.163.98/*.*
    // @include // @include http://201.227.241.85/*.*

    SBR Founder Join Date: 9/4/2005


  20. #20

    Default

    In Firefox can you save the tabs?
    So that next time you load Firefox you see the same tabs, same urls, in order

    SBR Founder Join Date: 9/4/2005


  21. #21
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,014
    SBR Points: 119
    Message Me

    Default

    I just fixed the typos in the above script. Try again.

    SBR Founder Join Date: 8/28/2005


  22. #22

    Default

    there were some error with it:
    Warning: Expected end of value for property but found ':'. Error in parsing value for property 'font-family'. Declaration dropped.
    Source File: http://216.194.167.48/BetBrowse/BetB.../AllStyles.css
    Line: 60


    Warning: Expected end of value for property but found ':'. Error in parsing value for property 'font-family'. Declaration dropped.
    Source File: http://216.194.167.48/BetBrowse/BetB.../AllStyles.css
    Line: 60

    SBR Founder Join Date: 9/4/2005


  23. #23
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,014
    SBR Points: 119
    Message Me

    Default

    Quote Originally Posted by Scorpion View Post
    there were some error with it:
    Warning: Expected end of value for property but found ':'. Error in parsing value for property 'font-family'. Declaration dropped.
    Source File: http://216.194.167.48/BetBrowse/BetB.../AllStyles.css
    Line: 60


    Warning: Expected end of value for property but found ':'. Error in parsing value for property 'font-family'. Declaration dropped.
    Source File: http://216.194.167.48/BetBrowse/BetB.../AllStyles.css
    Line: 60
    You need to look at "Messages". Thos warnings related to the ABC Islands CSS definitions and are completely unrelated to the Stay Logged-In script.

    See this thread.
    Last edited by Ganchrow; 12-19-07 at 06:53 AM.

    SBR Founder Join Date: 8/28/2005


Top