Bookmaker/CRIS Stay Logged-In Script for Firefox

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ganchrow
    SBR Hall of Famer
    • 08-28-05
    • 5011

    #1
    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.
  • RickySteve
    Restricted User
    • 01-31-06
    • 3415

    #2
    Very useful. This tool should make Mudcat deliriously happy.

    Is this something CRIS might frown upon?
    Comment
    • Bill Dozer
      www.twitter.com/BillDozer
      • 07-12-05
      • 10894

      #3
      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.
      Comment
      • RickySteve
        Restricted User
        • 01-31-06
        • 3415

        #4
        I'm already profiled. I just wouldn't want to get profiled out the door.
        Comment
        • Ganchrow
          SBR Hall of Famer
          • 08-28-05
          • 5011

          #5
          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.
          Comment
          • 2Pac
            SBR MVP
            • 12-12-07
            • 1474

            #6
            This could be a reason for them to not pay your winnings!
            Comment
            • RickySteve
              Restricted User
              • 01-31-06
              • 3415

              #7
              Originally posted by 2Pac
              This could be a reason for them to not pay your winnings!
              Let's not get hysterical.
              Comment
              • Ganchrow
                SBR Hall of Famer
                • 08-28-05
                • 5011

                #8
                Originally posted by 2Pac
                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.
                Comment
                • Scorpion
                  SBR Hall of Famer
                  • 09-04-05
                  • 7797

                  #9
                  I tried it. didnt work
                  why are you excluding wagering.aspx?
                  Comment
                  • Ganchrow
                    SBR Hall of Famer
                    • 08-28-05
                    • 5011

                    #10
                    Originally posted by Scorpion
                    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.
                    Comment
                    • Scorpion
                      SBR Hall of Famer
                      • 09-04-05
                      • 7797

                      #11
                      it works
                      thanks

                      i think after adding a book, i probably didnt refresh

                      how about books like abc islands that use a different software?
                      Comment
                      • jjgold
                        SBR Aristocracy
                        • 07-20-05
                        • 388179

                        #12
                        Using these auto refresh utilities at sportsbook slows up the betting pages for other players trying to make plays.
                        Comment
                        • bigboydan
                          SBR Aristocracy
                          • 08-10-05
                          • 55420

                          #13
                          Originally posted by Scorpion

                          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.
                          Comment
                          • Ganchrow
                            SBR Hall of Famer
                            • 08-28-05
                            • 5011

                            #14
                            Originally posted by jjgold
                            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.
                            Comment
                            • Scorpion
                              SBR Hall of Famer
                              • 09-04-05
                              • 7797

                              #15
                              Originally posted by bigboydan
                              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);
                              Comment
                              • Ganchrow
                                SBR Hall of Famer
                                • 08-28-05
                                • 5011

                                #16
                                Are there any messages in the FireFox error console?
                                Comment
                                • Scorpion
                                  SBR Hall of Famer
                                  • 09-04-05
                                  • 7797

                                  #17
                                  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
                                  Comment
                                  • Ganchrow
                                    SBR Hall of Famer
                                    • 08-28-05
                                    • 5011

                                    #18
                                    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.
                                    Comment
                                    • Scorpion
                                      SBR Hall of Famer
                                      • 09-04-05
                                      • 7797

                                      #19
                                      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/*.*
                                      Comment
                                      • Scorpion
                                        SBR Hall of Famer
                                        • 09-04-05
                                        • 7797

                                        #20
                                        In Firefox can you save the tabs?
                                        So that next time you load Firefox you see the same tabs, same urls, in order
                                        Comment
                                        • Ganchrow
                                          SBR Hall of Famer
                                          • 08-28-05
                                          • 5011

                                          #21
                                          I just fixed the typos in the above script. Try again.
                                          Comment
                                          • Scorpion
                                            SBR Hall of Famer
                                            • 09-04-05
                                            • 7797

                                            #22
                                            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
                                            Comment
                                            • Ganchrow
                                              SBR Hall of Famer
                                              • 08-28-05
                                              • 5011

                                              #23
                                              Originally posted by Scorpion
                                              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.
                                              Comment
                                              Search
                                              Collapse
                                              SBR Contests
                                              Collapse
                                              Top-Rated US Sportsbooks
                                              Collapse
                                              Working...