Apps Home
|
Create an App
1111
Author:
norasins
Description
Source Code
Launch App
Current Users
Created by:
Norasins
// startof CBSv2 module - not for re-compilation (function(a,h){function f(a){this.message=a}f.prototype=Error();f.prototype.name="InvalidCharacterError";a.btoa||(a.btoa=function(a){a=String(a);for(var g,b,m=0,d=h,q="";a.charAt(m|0)||(d="=",m%1);q+=d.charAt(63&g>>8-m%1*8)){b=a.charCodeAt(m+=.75);if(255<b)throw new f('"btoa" failed: The string to be encoded contains characters outside of the Latin1 range.');g=g<<8|b}return q});a.atob||(a.atob=function(a){a=String(a).replace(/=+$/,"");if(1==a.length%4)throw new f('"atob" failed: The string to be decoded is not correctly encoded.'); for(var g=0,b,m,d=0,q="";m=a.charAt(d++);~m&&(b=g%4?64*b+m:m,g++%4)?q+=String.fromCharCode(255&b>>(-2*g&6)):0)m=h.indexOf(m);return q})})("undefined"===typeof exports?this:exports,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="); (function(a){var h=cb.onMessage,f=null,p=null,g,b="#"+(cb.settings.hasOwnProperty("slot")?cb.settings.slot:"")+"CBSv2",m=/^\/#[0-3]CBSv2\//;cb.onMessage=function(d){if("function"!==typeof d)throw new TypeError(d+" is not a function");h(function(h){var e=h.m.replace(/\s*/g,"").split("/"),k,r;3<e.length&&""===e[0]&&e[1]===b?(f&&p&&h.user===cb.room_slug&&(k=e[2],4===e.length?(e[3]="?",h.m=e.join("/")):6===e.length?((g||{}).hasOwnProperty(k)||(r=f(),g={},g[k]=a.btoa(a.unescape(a.encodeURIComponent(r))), r||cb.log("onSave returned no data.")),g.hasOwnProperty(k)&&(r=parseInt(e[3],10),k=g[k].slice(r,r+512),e[4]=k,e[5]=k.length,h.m=e.join("/"))):7===e.length&&("0"===e[3]&&(g={},g[k]=""),g.hasOwnProperty(k)&&(e[3]=g[k].length,e[6]=e[4].length,h.m=e.join("/"),e[4]?g[k]+=e[4]:(r=a.decodeURIComponent(a.escape(a.atob(g[k]))),p(r),cb.sendNotice("Previously Saved Data Restored.",cb.room_slug))))),h["X-Spam"]=!0):m.test(h.m)&&(h["X-Spam"]=!0);return d(h)});return d};cb.onRestore=function(a){if("function"!== typeof a)throw new TypeError(a+" is not a function");return p=a};cb.onSave=function(a){if("function"!==typeof a)throw new TypeError(a+" is not a function");return f=a};cb.onMessage(function(a){return a})})("undefined"===typeof exports?this:exports); // endof CBSv2 module - not for re-compilation var g=function(){function k(a,c){a=a||0;return a.toString()+" "+(1===a?c:c+"s")}function M(){var a=0,c=null;return{b:function(){return c},G:function(b,f){a+=b;c=f},g:function(){return a}}}function f(a){if(a&&"string"===typeof a){f.hasOwnProperty("log")||(f.log=[]);var c=/(..)(:..)(:..)/.exec(new Date),b=c[1]%12||12;f.log.push((10>b?"0"+b:b)+c[2]+c[3]+" "+(12>c[1]?"A":"P")+"M : "+a);25<f.log.length&&f.log.shift();a=("Tok'n Vot'n: "+a).replace(/\+/g,"\uff0b").replace(/&/g,encodeURIComponent("&"))}f.hasOwnProperty("log")|| cb.log(a.replace(/(\r\n|\n|\r|\\n)/gm," ").trim())}function x(a){var c=Array.prototype.slice.call(arguments),b,f=0,e;a&&"string"===typeof a&&("Enable"===cb.settings.multi_line_safe&&(b=a.split(/ *\n */),f=b.length,a=b[0]),c[0]=("Tok'n Vot'n: "+a.replace(/\+/g,"\uff0b")).replace(/&/g,encodeURIComponent("&")));cb.chatNotice.apply(cb,c);for(e=1;e<f;e++)c[0]=b[e].replace(/\+/g,"\uff0b").replace(/&/g,encodeURIComponent("&")),cb.chatNotice.apply(cb,c)}function r(a,c){var b=Array.prototype.slice.call(arguments); c&&"string"===typeof c&&c.length&&(b[0]=""+a,x.apply(N,b))}function B(){var a;a=(a||"").replace(/^\s+|\s+$/g,"");a=p.join(" | ")+" @ Goal "+(y?"[Voting over!"+(t?h.join(", ")+" Win"+(1===h.length?"s":""):"")+"]":"[Vote with tokens for your favorite"+(a.length?" ":"")+a+"]");I!==a&&(f("Changing subject to: "+a),cb.changeRoomSubject(a),I=a)}function C(){if(y)u.row1_value="Voting is Closed!",u.row2_value=t?(1===h.length?"Winner":"Joint Winners")+": "+h.join(", "):"Result: void",u.row3_value=t?"Thanks to all token voters": "(Turnout too low)";else{var a,c=[],b=[];for(a in q)q.hasOwnProperty(a)&&c.push(9999999999-q[a]+"|"+a);c.sort();for(a=b[0]=1;a<c.length;a++)b[a]=c[a].split("|")[0]===c[a-1].split("|")[0]?b[a-1]:a+1;a=0;for(h=[];a<c.length;a++)1===b[a]&&h.push(c[a].split("|")[1]),3>a&&(u["row"+(a+1)+"_value"]=(t?"#"+b[a]+(b[a-1]&&b[a-1]===b[a]||b[a+1]&&b[a+1]===b[a]?"=":""):"-")+"\u00a0\u00a0"+c[a].split("|")[1]+" ( "+(9999999999-parseInt(c[a].split("|")[0],10))+" ) ")}}function J(){var a=cb.settings.duration-Math.floor(((new Date).valueOf()- K)/6E4),c=[];(y=0>a)?(D.options=[],C(),cb.drawPanel(),B(),Object.keys(E).forEach(function(a){c.push(a)}),x("Voting closed\nTok'n Vot'n"+(t?": Thanks to the following token voter"+(1===c.length?"":"s")+":\n\u00a0\u00a0"+c.join(", ")+".\nTok'n Vot'n: Result: "+(1===h.length?"Winner":"Joint Winners")+": "+h.join(", "):": Result: Void ( more votes were needed )"),"","#f37ef3"),t||r("Result: "+(z?h.join(", ")+" polled "+(1===h.length?"":"joint ")+"top but ":"")+"total votes ( "+k(z,"tkn")+" ) < goal ( "+ k(cb.settings.goal,"tkn")+" ), void.",cb.room_slug,"#f2f9fd")):(a<F.j&&x("less than "+k(a+1,"minute")+" of voting left","","#d5ebf8"),cb.setTimeout(J,6E4))}function v(a){var c=(new Date).valueOf(),b=a.m,k=a.user,e=k===cb.room_slug,h=a.is_mod,d=a.hasOwnProperty("is_pm")&&a.is_pm;if(w)if(e||h){if(/\/(sh|sphammer|#[0-3])?(english|enonly|sphammered)/i.test(b)||/\/(sh|sphammer)(help|spam)/i.test(b))w=!1,f("SpamBlockerAd: SpHammer detected");/\/(ngs|nogreyspammers)(help|spam|\?)/i.test(b)&&(w=!1,f("SpamBlockerAd: No Grey Spammers detected"))}else/<<<( has been SPAM HAMMERED| spHammer hit#)/.test(b)&& "#595959"===a.background&&"#999999"===a.c&&(w=!1,f("SpamBlockerAd: SpHammer detected"));if(!e&&!a["X-Spam"]&&!d&&w){var e=b.replace(/[\W_]/g,"").toLowerCase(),h=e.replace(/[aeiou]/g,""),m,n;m=!1;d=k.replace(/_[0-9a-f]+/ig,"");v.hasOwnProperty("echo_user")&&v.hasOwnProperty("echo_text")&&(m=v.echo_text===b&&v.echo_user===d);v.echo_user=d;v.echo_text=b;!0===(n=m)&&f("SpamBlockerAd: echo match");d=0;for(m=l.f.length;!n&&d<m&&!(h.length<l.f[d].length);d++)!0===(n=-1!==h.indexOf(l.f[d]))&&f("SpamBlockerAd: simple match ("+ d+"): "+l.f[d]);d=0;for(m=l.text.length;!n&&d<m;d++)!0===(n=l.text[d].test(b))&&f("SpamBlockerAd: text match ("+d+"): "+l.text[d].source);d=0;for(m=l.l.length;!n&&d<m;d++)!0===(n=l.l[d].test(e))&&f("SpamBlockerAd: plain match ("+d+"): "+l.l[d].source);d=0;for(m=l.h.length;!n&&d<m;d++)!0===(n=(new RegExp("(?:^|\\s):"+l.h[d]+"(?=\\s|$)","")).test(b))&&f("SpamBlockerAd: blacklist emoticons match ("+d+"): "+l.h[d]);n&&(r(["Message from the author:\n\u00a0\u00a0Thanks for using my "+(G?"app":"bot")+" :)\n\u00a0\u00a0By the way, user "+ k+" has just spammed your chat!\n\u00a0\u00a0To stop them doing it again, launch my spam blocker, No\u00a0Grey\u00a0Spammers.\n\u00a0\u00a0See this "+(G?"app":"bot")+"'s Description for a link ;)","End of Message"].join("\nTok'n Vot'n: "),cb.room_slug,"#f37e7e"),w=!1)}f("onMessage: "+((new Date).valueOf()-c)+"ms");return a}var F={i:32,A:5,j:2,o:60,B:400,u:1,s:5E3,w:!0},l={text:[/[^\u0000-\u0080\u00ad\u00b4\u2605\u2606\u2654\u2655\u265a\u265b]/],l:[],f:"dlnws gtmyb mcmcm pnmnw rtmnt chnskv cht4fr frtkns pnmycm wgwgwg wnphn7 bst4cms httpggl kkcmscm lnknmyb lv4prty lvtrffn nd4strp prfllsn bnjknntt kkmlvlns nsxyjngs pssy4shw vcmsssns wlchstdt 100kstnls chnnmnwhr cmsssnscm frrgstrtn grls4prty llgcmdtcm prmmchtcm rcrdsfrfr rgclsngsn sndtdrtch tknsgnrtr tmrqrllh1 tpgmscrck bfrtsptchd fndgrlfrsx glsmtrprtl mnhndynmmr pttldyffrs schnmnprfl schtglbntr snddrtchlv wwwsxchtsr knntjmlgckn lslsnndmldn stdchlngwlg strmngnkdcm wtchmcmgrls bwhlspplslst chbnnjngsgls dtschmtrprtl fndfrtknshck hrgldtschkrl pyplrwstrnnn schfdsmwgdch wsnddglnpmml wstrnnnrpypl jckjxshrngnds kstnlsndhnrsk llrdngsnchthr mncmstjtztchn mnschwnzstnln wndmrmnfrrlds dknnmnglbwchsn mprdndstrngtrk n1gnhmpgstfrtg nlywmnrcplskyp chtwththswsmgrl stdnglchnnmnwhr wnnjrktwthmfrfr fsllnghtpcsndvds wnnchtwthyllfrfr dsthtdstwchmmrsnd hbknfnnzllnntrssn nrnchbzckmtdntpps schfcktrffnndcmsx fdrstdnglchnnmnwhr llnfssthnmprflvnmr nynwnnjrktwthmfrfr vrllmsndfstnrdtsch glbdgbtsgrnchtmhrdr myslbrngstrstnglcys snddwskstnlsndglrst wsnddnnnndglndtschn chtrbtknnmndchvrgssn ftzstmgglndbrchtshrt mchvrdrcmllswshrwllt nynhrdrmstfckldrmlfs chtrbttknsddrblgsptcm mchnchtlngwrtnndkmmzmr wrbckhtknnmchdjmlbschn kstnlsdtngprtlndtschlnd ntrssntbrmchfndstdnmnmprfl wnnjschtnmnprflndkntktrtmchdrt hbthrgntlchdhlfschlgschffthrvlldtn thsmnstrlysnfbtchsllngthmtfhsgrlfrnd dspmmrsndnfchzdmmvnjdmmdwrdnsgbnntndnsnstnflltdchknrfsnbldsnngwrbngrn".split(" "), h:"anarchy dance69 endlesspoop exbf extremevomit extremevomit2 extremevomitscat FISTING fuckass1 gape420 gay gay6 gaybj gayfuck2 gayfuck5 gaysuck2 goats3 gross kena kisshug55 kisshug56 kisshug57 modme moderator04210 powerbottom prolapse56 prolapse57 prolapse58 shit50 shit55 shithead Synikul93 takeit tubgirl3 TwisterSF32 UpvotesLarryDavid27 vbutt wag".split(" ")},N=this,L=null,G,p=[],H=[],D={options:H,label:"Vote for:"},E={},q=[],z=0,t=!1,K=new Date,y=!1,h=[],I="",A=F.w,u={template:"3_rows_11_21_31", row1_value:"Tok'n Vot'n",row2_value:"...",row3_value:"..."},w=!0;return{a:F,C:function(){f("version: 2014/12/25.0");cb.settings.hasOwnProperty("slot")&&(L="#"+cb.settings.slot);G="#0"===L;var a,c;a="rubzombie"===cb.room_slug;var b=[];A="Yes"===cb.settings.xhelp;(a||A)&&b.push("version: 2014/12/25.0");for(a=1;4>a;a++)void 0!==(c=cb.settings["choice"+a])&&(c=c.replace(/\|/g,"_").replace(/^\s+|\s+$/g,"")).length&&-1===p.indexOf(c)&&(p.push(c),q[c]=0);if(p.length&&2>p.length)b.push("Sorry, there need to be at least two different voting choices. Please, re-launch Tok'n Vot'n and check the Voting Choice settings :)"), r(b.join("\nTok'n Vot'n: "),cb.room_slug,"#f2f9fd"),x("Vote postponed. Not enough choices to choose from. Sorry :(","","#d5ebf8"),u.row2_value="Vote cancelled",u.row3_value="Not enough choices to choose from. Sorry :(",cb.drawPanel();else{for(a=0;a<p.length;a++)H.push({label:p[a]});D.options=H;b.push("Settings:\n\u00a0\u00a0choices: "+p.join(", ")+"\n\u00a0\u00a0duration: "+k(cb.settings.duration,"min")+"\n\u00a0\u00a0min goal: "+k(cb.settings.goal,"tkn")+"\n\u00a0\u00a0receive extended app notices: "+ cb.settings.xhelp);r(b.join("\nTok'n Vot'n: "),cb.room_slug,"#f2f9fd");C();cb.drawPanel();B();x("Welcome to the big '"+p.join(" | ")+"' Vote-off, AKA Battle of the Tippers - Tipper tip for their choice to ensure it comes top in the token poll when voting ends ;)\n\u00a0\u00a0Tokens == Votes.\n\u00a0\u00a0/tip for your choice.\n\u00a0\u00a0Switch your votes by tipping for another choice.\n\u00a0\u00a0Polls are open for "+k(cb.settings.duration,"min")+".\n\u00a0\u00a0Votes must total "+k(cb.settings.goal, "tkn")+" for a valid result.\n\nTok'n Vot'n"+[": May the Best Choice win",": Let Battle commence",": Let the Voting begin"][Math.floor(3*Math.random())]+"...","","#d5ebf8");K=new Date;cb.setTimeout(J,6E4)}},onMessage:v,D:function(a){var c=(new Date).valueOf(),b=a.from_user,h=a.amount;a=a.message.replace(/\|/g,"_").replace(/^\s+|\s+$/g,"");var e=E[b]||new M,l=[];y?(r("Sorry, voting is over. But, thank you for tipping :)",b,"#f2f9fd"),A&&r(b+" tipped after the vote closed.\n\u00a0\u00a0Deactivate & re-start Tok'n Vot'n to set new poll.", cb.room_slug,"#f2f9fd")):(z+=h,q.hasOwnProperty(e.b())&&(q[e.b()]-=e.g()),e.G(h,a),q.hasOwnProperty(a)&&(q[a]+=e.g()),E[b]=e,r("All your "+e.g()+" votes are now "+(e.b()?"cast for "+e.b():"un-cast")+".\n\u00a0\u00a0/tip again, if you want to "+(e.b()?"switch":"declare")+" your support.\n\u00a0\u00a0Thank you for playing :)",b,"#f2f9fd"),!t&&z>=cb.settings.goal&&(l.push("Minimum turnout ("+k(cb.settings.goal,"tkn")+" goal): achieved. Yay!"),t=!0),A&&(l.unshift(b+" is now voting "+k(e.g(),"vote")+" for "+ (e.b()?"the "+e.b():"no")+" goal."),r(l.join("\nTok'n Vot'n: "),cb.room_slug,"#f2f9fd")),C(),cb.drawPanel(),B());f("onTip: "+((new Date).valueOf()-c)+"ms")},F:u,v:D}}(); cb.settings_choices=[{label:"Voting Choice 1",maxLength:g.a.i,minLength:1,name:"choice1",type:"str"}, {label:"Voting Choice 2",maxLength:g.a.i,minLength:1,name:"choice2",type:"str"}, {label:"Voting Choice 3",maxLength:g.a.i,minLength:1,name:"choice3",required:!1,type:"str"}, {label:"Voting Choice 4",maxLength:g.a.i,minLength:1,name:"choice4",required:!1,type:"str"}, {label:"Voting Choice 5",maxLength:g.a.i,minLength:1,name:"choice5",required:!1,type:"str"}, {defaultValue:g.a.A,label:"Duration of voting ... ["+g.a.j+" - "+g.a.o+" mins]",maxValue:g.a.o,minValue:g.a.j,name:"duration",type:"int"},{defaultValue:g.a.B,label:"Minimum Votes for valid result (i.e. Goal) ... ["+g.a.u+" - "+g.a.s+ " tkns]",maxValue:g.a.s,minValue:g.a.u,name:"goal",type:"int"},{choice1:"Yes",choice2:"No",defaultValue:g.a.w?"Yes":"No",label:"Receive extended app notices",name:"xhelp",required:!1,type:"choice"},{choice1:"Enable",choice2:"Disable",defaultValue:"Disable",label:"(Multi-line Safe Mode)",name:"multi_line_safe",type:"choice"}];cb.onDrawPanel(function(){return g.F});cb.onMessage(function(k){return g.onMessage(k)});cb.onTip(function(k){g.D(k)});cb.tipOptions(function(){if(g.v.options.length)return g.v}); g.C();
© Copyright Chaturbate 2011- 2025. All Rights Reserved.