163 skills found · Page 4 of 6
gkhan205 / Formify ReactReact Form, which generates, validates, and populates data considering your API requirement. Just send an Array Model to the form and let it handle everything for you.
bcg / BitpackBitPack is a library that provides an easy to use API for packing and unpacking arbitrary binary strings. Unlike Array#pack and String#unpack, BitPack objects allow you to pack and unpack fields of arbitrary bit lengths.
Phamdung2009 / Xxx<!DOCTYPE html> <html lang="en"> <head> <title>Bitbucket</title> <meta id="bb-bootstrap" data-current-user="{"isKbdShortcutsEnabled": true, "isSshEnabled": false, "isAuthenticated": false}" /> <meta name="frontbucket-version" content="production"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <script nonce="xxI7cPsOVRt9B81s" type="text/javascript">(window.NREUM||(NREUM={})).loader_config={licenseKey:"a2cef8c3d3",applicationID:"548124220"};window.NREUM||(NREUM={}),__nr_require=function(e,t,n){function r(n){if(!t[n]){var i=t[n]={exports:{}};e[n][0].call(i.exports,function(t){var i=e[n][1][t];return r(i||t)},i,i.exports)}return t[n].exports}if("function"==typeof __nr_require)return __nr_require;for(var i=0;i<n.length;i++)r(n[i]);return r}({1:[function(e,t,n){function r(){}function i(e,t,n){return function(){return o(e,[u.now()].concat(c(arguments)),t?null:this,n),t?void 0:this}}var o=e("handle"),a=e(7),c=e(8),f=e("ee").get("tracer"),u=e("loader"),s=NREUM;"undefined"==typeof window.newrelic&&(newrelic=s);var d=["setPageViewName","setCustomAttribute","setErrorHandler","finished","addToTrace","inlineHit","addRelease"],p="api-",l=p+"ixn-";a(d,function(e,t){s[t]=i(p+t,!0,"api")}),s.addPageAction=i(p+"addPageAction",!0),s.setCurrentRouteName=i(p+"routeName",!0),t.exports=newrelic,s.interaction=function(){return(new r).get()};var m=r.prototype={createTracer:function(e,t){var n={},r=this,i="function"==typeof t;return o(l+"tracer",[u.now(),e,n],r),function(){if(f.emit((i?"":"no-")+"fn-start",[u.now(),r,i],n),i)try{return t.apply(this,arguments)}catch(e){throw f.emit("fn-err",[arguments,this,e],n),e}finally{f.emit("fn-end",[u.now()],n)}}}};a("actionText,setName,setAttribute,save,ignore,onEnd,getContext,end,get".split(","),function(e,t){m[t]=i(l+t)}),newrelic.noticeError=function(e,t){"string"==typeof e&&(e=new Error(e)),o("err",[e,u.now(),!1,t])}},{}],2:[function(e,t,n){function r(){return c.exists&&performance.now?Math.round(performance.now()):(o=Math.max((new Date).getTime(),o))-a}function i(){return o}var o=(new Date).getTime(),a=o,c=e(9);t.exports=r,t.exports.offset=a,t.exports.getLastTimestamp=i},{}],3:[function(e,t,n){function r(e){return!(!e||!e.protocol||"file:"===e.protocol)}t.exports=r},{}],4:[function(e,t,n){function r(e,t){var n=e.getEntries();n.forEach(function(e){"first-paint"===e.name?d("timing",["fp",Math.floor(e.startTime)]):"first-contentful-paint"===e.name&&d("timing",["fcp",Math.floor(e.startTime)])})}function i(e,t){var n=e.getEntries();n.length>0&&d("lcp",[n[n.length-1]])}function o(e){e.getEntries().forEach(function(e){e.hadRecentInput||d("cls",[e])})}function a(e){if(e instanceof m&&!g){var t=Math.round(e.timeStamp),n={type:e.type};t<=p.now()?n.fid=p.now()-t:t>p.offset&&t<=Date.now()?(t-=p.offset,n.fid=p.now()-t):t=p.now(),g=!0,d("timing",["fi",t,n])}}function c(e){d("pageHide",[p.now(),e])}if(!("init"in NREUM&&"page_view_timing"in NREUM.init&&"enabled"in NREUM.init.page_view_timing&&NREUM.init.page_view_timing.enabled===!1)){var f,u,s,d=e("handle"),p=e("loader"),l=e(6),m=NREUM.o.EV;if("PerformanceObserver"in window&&"function"==typeof window.PerformanceObserver){f=new PerformanceObserver(r);try{f.observe({entryTypes:["paint"]})}catch(v){}u=new PerformanceObserver(i);try{u.observe({entryTypes:["largest-contentful-paint"]})}catch(v){}s=new PerformanceObserver(o);try{s.observe({type:"layout-shift",buffered:!0})}catch(v){}}if("addEventListener"in document){var g=!1,w=["click","keydown","mousedown","pointerdown","touchstart"];w.forEach(function(e){document.addEventListener(e,a,!1)})}l(c)}},{}],5:[function(e,t,n){function r(e,t){if(!i)return!1;if(e!==i)return!1;if(!t)return!0;if(!o)return!1;for(var n=o.split("."),r=t.split("."),a=0;a<r.length;a++)if(r[a]!==n[a])return!1;return!0}var i=null,o=null,a=/Version\/(\S+)\s+Safari/;if(navigator.userAgent){var c=navigator.userAgent,f=c.match(a);f&&c.indexOf("Chrome")===-1&&c.indexOf("Chromium")===-1&&(i="Safari",o=f[1])}t.exports={agent:i,version:o,match:r}},{}],6:[function(e,t,n){function r(e){function t(){e(a&&document[a]?document[a]:document[i]?"hidden":"visible")}"addEventListener"in document&&o&&document.addEventListener(o,t,!1)}t.exports=r;var i,o,a;"undefined"!=typeof document.hidden?(i="hidden",o="visibilitychange",a="visibilityState"):"undefined"!=typeof document.msHidden?(i="msHidden",o="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(i="webkitHidden",o="webkitvisibilitychange",a="webkitVisibilityState")},{}],7:[function(e,t,n){function r(e,t){var n=[],r="",o=0;for(r in e)i.call(e,r)&&(n[o]=t(r,e[r]),o+=1);return n}var i=Object.prototype.hasOwnProperty;t.exports=r},{}],8:[function(e,t,n){function r(e,t,n){t||(t=0),"undefined"==typeof n&&(n=e?e.length:0);for(var r=-1,i=n-t||0,o=Array(i<0?0:i);++r<i;)o[r]=e[t+r];return o}t.exports=r},{}],9:[function(e,t,n){t.exports={exists:"undefined"!=typeof window.performance&&window.performance.timing&&"undefined"!=typeof window.performance.timing.navigationStart}},{}],ee:[function(e,t,n){function r(){}function i(e){function t(e){return e&&e instanceof r?e:e?u(e,f,a):a()}function n(n,r,i,o,a){if(a!==!1&&(a=!0),!l.aborted||o){e&&a&&e(n,r,i);for(var c=t(i),f=v(n),u=f.length,s=0;s<u;s++)f[s].apply(c,r);var p=d[h[n]];return p&&p.push([b,n,r,c]),c}}function o(e,t){y[e]=v(e).concat(t)}function m(e,t){var n=y[e];if(n)for(var r=0;r<n.length;r++)n[r]===t&&n.splice(r,1)}function v(e){return y[e]||[]}function g(e){return p[e]=p[e]||i(n)}function w(e,t){s(e,function(e,n){t=t||"feature",h[n]=t,t in d||(d[t]=[])})}var y={},h={},b={on:o,addEventListener:o,removeEventListener:m,emit:n,get:g,listeners:v,context:t,buffer:w,abort:c,aborted:!1};return b}function o(e){return u(e,f,a)}function a(){return new r}function c(){(d.api||d.feature)&&(l.aborted=!0,d=l.backlog={})}var f="nr@context",u=e("gos"),s=e(7),d={},p={},l=t.exports=i();t.exports.getOrSetContext=o,l.backlog=d},{}],gos:[function(e,t,n){function r(e,t,n){if(i.call(e,t))return e[t];var r=n();if(Object.defineProperty&&Object.keys)try{return Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!1}),r}catch(o){}return e[t]=r,r}var i=Object.prototype.hasOwnProperty;t.exports=r},{}],handle:[function(e,t,n){function r(e,t,n,r){i.buffer([e],r),i.emit(e,t,n)}var i=e("ee").get("handle");t.exports=r,r.ee=i},{}],id:[function(e,t,n){function r(e){var t=typeof e;return!e||"object"!==t&&"function"!==t?-1:e===window?0:a(e,o,function(){return i++})}var i=1,o="nr@id",a=e("gos");t.exports=r},{}],loader:[function(e,t,n){function r(){if(!E++){var e=x.info=NREUM.info,t=l.getElementsByTagName("script")[0];if(setTimeout(u.abort,3e4),!(e&&e.licenseKey&&e.applicationID&&t))return u.abort();f(h,function(t,n){e[t]||(e[t]=n)});var n=a();c("mark",["onload",n+x.offset],null,"api"),c("timing",["load",n]);var r=l.createElement("script");r.src="https://"+e.agent,t.parentNode.insertBefore(r,t)}}function i(){"complete"===l.readyState&&o()}function o(){c("mark",["domContent",a()+x.offset],null,"api")}var a=e(2),c=e("handle"),f=e(7),u=e("ee"),s=e(5),d=e(3),p=window,l=p.document,m="addEventListener",v="attachEvent",g=p.XMLHttpRequest,w=g&&g.prototype;if(d(p.location)){NREUM.o={ST:setTimeout,SI:p.setImmediate,CT:clearTimeout,XHR:g,REQ:p.Request,EV:p.Event,PR:p.Promise,MO:p.MutationObserver};var y=""+location,h={beacon:"bam.nr-data.net",errorBeacon:"bam.nr-data.net",agent:"js-agent.newrelic.com/nr-1208.min.js"},b=g&&w&&w[m]&&!/CriOS/.test(navigator.userAgent),x=t.exports={offset:a.getLastTimestamp(),now:a,origin:y,features:{},xhrWrappable:b,userAgent:s};e(1),e(4),l[m]?(l[m]("DOMContentLoaded",o,!1),p[m]("load",r,!1)):(l[v]("onreadystatechange",i),p[v]("onload",r)),c("mark",["firstbyte",a.getLastTimestamp()],null,"api");var E=0}},{}],"wrap-function":[function(e,t,n){function r(e,t){function n(t,n,r,f,u){function nrWrapper(){var o,a,s,p;try{a=this,o=d(arguments),s="function"==typeof r?r(o,a):r||{}}catch(l){i([l,"",[o,a,f],s],e)}c(n+"start",[o,a,f],s,u);try{return p=t.apply(a,o)}catch(m){throw c(n+"err",[o,a,m],s,u),m}finally{c(n+"end",[o,a,p],s,u)}}return a(t)?t:(n||(n=""),nrWrapper[p]=t,o(t,nrWrapper,e),nrWrapper)}function r(e,t,r,i,o){r||(r="");var c,f,u,s="-"===r.charAt(0);for(u=0;u<t.length;u++)f=t[u],c=e[f],a(c)||(e[f]=n(c,s?f+r:r,i,f,o))}function c(n,r,o,a){if(!m||t){var c=m;m=!0;try{e.emit(n,r,o,t,a)}catch(f){i([f,n,r,o],e)}m=c}}return e||(e=s),n.inPlace=r,n.flag=p,n}function i(e,t){t||(t=s);try{t.emit("internal-error",e)}catch(n){}}function o(e,t,n){if(Object.defineProperty&&Object.keys)try{var r=Object.keys(e);return r.forEach(function(n){Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){return e[n]=t,t}})}),t}catch(o){i([o],n)}for(var a in e)l.call(e,a)&&(t[a]=e[a]);return t}function a(e){return!(e&&e instanceof Function&&e.apply&&!e[p])}function c(e,t){var n=t(e);return n[p]=e,o(e,n,s),n}function f(e,t,n){var r=e[t];e[t]=c(r,n)}function u(){for(var e=arguments.length,t=new Array(e),n=0;n<e;++n)t[n]=arguments[n];return t}var s=e("ee"),d=e(8),p="nr@original",l=Object.prototype.hasOwnProperty,m=!1;t.exports=r,t.exports.wrapFunction=c,t.exports.wrapInPlace=f,t.exports.argsToArray=u},{}]},{},["loader"]);</script> <meta name="bb-env" content="production" /> <meta id="bb-canon-url" name="bb-canon-url" content="https://bitbucket.org"> <meta name="bb-api-canon-url" content="https://api.bitbucket.org"> <meta name="bitbucket-commit-hash" content="10b0d91b991b"> <meta name="bb-app-node" content="app-3001"> <meta name="bb-dce-env" content="ASH2"> <meta name="bb-view-name" content="bitbucket.apps.repo2.views.SourceView"> <meta name="ignore-whitespace" content="False"> <meta name="tab-size" content="None"> <meta name="locale" content="en"> <meta name="application-name" content="Bitbucket"> <meta name="apple-mobile-web-app-title" content="Bitbucket"> <meta name="slack-app-id" content="A8W8QLZD1"> <meta name="statuspage-api-host" content="https://bqlf8qjztdtr.statuspage.io"> <meta name="theme-color" content="#0049B0"> <meta name="msapplication-TileColor" content="#0052CC"> <meta name="msapplication-TileImage" content="https://d301sr5gafysq2.cloudfront.net/10b0d91b991b/img/logos/bitbucket/mstile-150x150.png"> <link rel="apple-touch-icon" sizes="180x180" type="image/png" href="https://d301sr5gafysq2.cloudfront.net/10b0d91b991b/img/logos/bitbucket/apple-touch-icon.png"> <link rel="icon" sizes="192x192" type="image/png" href="https://d301sr5gafysq2.cloudfront.net/10b0d91b991b/img/logos/bitbucket/android-chrome-192x192.png"> <link rel="icon" sizes="16x16 24x24 32x32 64x64" type="image/x-icon" href="/favicon.ico?v=2"> <link rel="mask-icon" href="https://d301sr5gafysq2.cloudfront.net/10b0d91b991b/img/logos/bitbucket/safari-pinned-tab.svg" color="#0052CC"> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Bitbucket"> <meta name="description" content=""> <meta name="bb-single-page-app" content="true"> <link rel="stylesheet" href="https://d301sr5gafysq2.cloudfront.net/frontbucket/assets/present/vendor.f4e8952a.css"> <script nonce="xxI7cPsOVRt9B81s"> if (window.performance) { window.performance.okayToSendMetrics = !document.hidden && 'onvisibilitychange' in document; if (window.performance.okayToSendMetrics) { window.addEventListener('visibilitychange', function () { if (document.hidden) { window.performance.okayToSendMetrics = false; } }); } } </script> </head> <body> <div id="root"> <script nonce="xxI7cPsOVRt9B81s"> window.__webpack_public_path__ = "https://d301sr5gafysq2.cloudfront.net/frontbucket/assets/present/"; </script> </div> <script nonce="xxI7cPsOVRt9B81s"> window.__sentry__ = {"dsn": "https://2dcda83904474d8c86928ebbfa1ab294@sentry.io/1480772", "environment": "production", "tags": {"puppet_env": "production", "dc_location": "ash2", "service": "gu-bb", "revision": "10b0d91b991b"}}; window.__initial_state__ = {"section": {"repository": {"connectActions": [], "cloneProtocol": "https", "currentRepository": {"scm": "git", "website": "https://github.com/jdkoftinoff/mb-linux-msli", "uuid": "{7fe183eb-5a1e-43c1-af4a-d085585c9537}", "links": {"clone": [{"href": "https://bitbucket.org/__wp__/mb-linux-msli.git", "name": "https"}, {"href": "git@bitbucket.org:__wp__/mb-linux-msli.git", "name": "ssh"}], "self": {"href": "https://bitbucket.org/!api/2.0/repositories/__wp__/mb-linux-msli"}, "html": {"href": "https://bitbucket.org/__wp__/mb-linux-msli"}, "avatar": {"href": "https://bytebucket.org/ravatar/%7B7fe183eb-5a1e-43c1-af4a-d085585c9537%7D?ts=c"}}, "name": "mb-linux-msli", "project": {"description": "Project created by Bitbucket for __WP__", "links": {"self": {"href": "https://bitbucket.org/!api/2.0/workspaces/__wp__/projects/PROJ"}, "html": {"href": "https://bitbucket.org/__wp__/workspace/projects/PROJ"}, "avatar": {"href": "https://bitbucket.org/account/user/__wp__/projects/PROJ/avatar/32?ts=1447453979"}}, "name": "Untitled project", "created_on": "2015-11-13T22:32:59.539281+00:00", "key": "PROJ", "updated_on": "2015-11-13T22:32:59.539335+00:00", "owner": {"username": "__wp__", "type": "team", "display_name": "__WP__", "uuid": "{55ded115-598c-4864-b0e7-cdef05771294}", "links": {"self": {"href": "https://bitbucket.org/!api/2.0/teams/%7B55ded115-598c-4864-b0e7-cdef05771294%7D"}, "html": {"href": "https://bitbucket.org/%7B55ded115-598c-4864-b0e7-cdef05771294%7D/"}, "avatar": {"href": "https://bitbucket.org/account/__wp__/avatar/"}}}, "workspace": {"name": "__WP__", "type": "workspace", "uuid": "{55ded115-598c-4864-b0e7-cdef05771294}", "links": {"self": {"href": "https://bitbucket.org/!api/2.0/workspaces/__wp__"}, "html": {"href": "https://bitbucket.org/__wp__/"}, "avatar": {"href": "https://bitbucket.org/workspaces/__wp__/avatar/?ts=1543468984"}}, "slug": "__wp__"}, "type": "project", "is_private": false, "uuid": "{e060f8c0-a44d-4706-9d5b-b11f3b7f8ea7}"}, "language": "c", "mainbranch": {"name": "master"}, "full_name": "__wp__/mb-linux-msli", "owner": {"username": "__wp__", "display_name": "__WP__", "uuid": "{55ded115-598c-4864-b0e7-cdef05771294}", "links": {"self": {"href": "https://bitbucket.org/!api/2.0/teams/%7B55ded115-598c-4864-b0e7-cdef05771294%7D"}, "html": {"href": "https://bitbucket.org/%7B55ded115-598c-4864-b0e7-cdef05771294%7D/"}, "avatar": {"href": "https://bitbucket.org/account/__wp__/avatar/"}}, "is_active": true, "created_on": "2012-09-12T18:04:32.423010+00:00", "type": "team", "properties": {}, "has_2fa_enabled": null}, "updated_on": "2012-09-23T15:01:03.144649+00:00", "type": "repository", "slug": "mb-linux-msli", "is_private": false, "description": "Forked from https://github.com/jdkoftinoff/mb-linux-msli."}, "mirrors": [], "menuItems": [{"analytics_label": "repository.source", "is_client_link": true, "icon_class": "icon-source", "target": "_self", "weight": 200, "url": "/__wp__/mb-linux-msli/src", "tab_name": "source", "can_display": true, "label": "Source", "is_premium": null, "is_dropdown_item": false, "anchor": true, "badge_label": null, "analytics_payload": {}, "matching_url_prefixes": ["/diff", "/history-node"], "id": "repo-source-link", "type": "menu_item", "children": [], "icon": "icon-source"}, {"analytics_label": "repository.commits", "is_client_link": true, "icon_class": "icon-commits", "target": "_self", "weight": 300, "url": "/__wp__/mb-linux-msli/commits/", "tab_name": "commits", "can_display": true, "label": "Commits", "is_premium": null, "is_dropdown_item": false, "anchor": true, "badge_label": null, "analytics_payload": {}, "matching_url_prefixes": [], "id": "repo-commits-link", "type": "menu_item", "children": [], "icon": "icon-commits"}, {"analytics_label": "repository.branches", "is_client_link": true, "icon_class": "icon-branches", "target": "_self", "weight": 400, "url": "/__wp__/mb-linux-msli/branches/", "tab_name": "branches", "can_display": true, "label": "Branches", "is_premium": null, "is_dropdown_item": false, "anchor": true, "badge_label": null, "analytics_payload": {}, "matching_url_prefixes": [], "id": "repo-branches-link", "type": "menu_item", "children": [], "icon": "icon-branches"}, {"analytics_label": "repository.pullrequests", "is_client_link": true, "icon_class": "icon-pull-requests", "target": "_self", "weight": 500, "url": "/__wp__/mb-linux-msli/pull-requests/", "tab_name": "pullrequests", "can_display": true, "label": "Pull requests", "is_premium": null, "is_dropdown_item": false, "anchor": true, "badge_label": null, "analytics_payload": {}, "matching_url_prefixes": [], "id": "repo-pullrequests-link", "type": "menu_item", "children": [], "icon": "icon-pull-requests"}, {"analytics_label": "repository.jira", "is_client_link": true, "icon_class": "icon-jira", "target": "_self", "weight": 600, "url": "/__wp__/mb-linux-msli/jira", "tab_name": "jira", "can_display": true, "label": "Jira issues", "is_premium": null, "is_dropdown_item": false, "anchor": true, "badge_label": null, "analytics_payload": {}, "matching_url_prefixes": [], "id": "repo-jira-link", "type": "menu_item", "children": [], "icon": "icon-jira"}, {"analytics_label": "repository.downloads", "is_client_link": false, "icon_class": "icon-downloads", "target": "_self", "weight": 800, "url": "/__wp__/mb-linux-msli/downloads/", "tab_name": "downloads", "can_display": true, "label": "Downloads", "is_premium": null, "is_dropdown_item": false, "anchor": true, "badge_label": null, "analytics_payload": {}, "matching_url_prefixes": [], "id": "repo-downloads-link", "type": "menu_item", "children": [], "icon": "icon-downloads"}], "bitbucketActions": [{"analytics_label": "repository.clone", "is_client_link": false, "icon_class": "icon-clone", "target": "_self", "weight": 100, "url": "#clone", "tab_name": "clone", "can_display": true, "label": "<strong>Clone<\/strong> this repository", "is_premium": null, "is_dropdown_item": false, "anchor": true, "badge_label": null, "analytics_payload": {}, "matching_url_prefixes": [], "id": "repo-clone-button", "type": "menu_item", "children": [], "icon": "icon-clone"}, {"analytics_label": "repository.compare", "is_client_link": false, "icon_class": "aui-icon-small aui-iconfont-devtools-compare", "target": "_self", "weight": 400, "url": "/__wp__/mb-linux-msli/branches/compare", "tab_name": "compare", "can_display": true, "label": "<strong>Compare<\/strong> branches or tags", "is_premium": null, "is_dropdown_item": false, "anchor": true, "badge_label": null, "analytics_payload": {}, "matching_url_prefixes": [], "id": "repo-compare-link", "type": "menu_item", "children": [], "icon": "aui-icon-small aui-iconfont-devtools-compare"}, {"analytics_label": "repository.fork", "is_client_link": false, "icon_class": "icon-fork", "target": "_self", "weight": 500, "url": "/__wp__/mb-linux-msli/fork", "tab_name": "fork", "can_display": true, "label": "<strong>Fork<\/strong> this repository", "is_premium": null, "is_dropdown_item": false, "anchor": true, "badge_label": null, "analytics_payload": {}, "matching_url_prefixes": [], "id": "repo-fork-link", "type": "menu_item", "children": [], "icon": "icon-fork"}], "activeMenuItem": "source"}}, "global": {"needs_marketing_consent": false, "features": {"fd-send-webhooks-to-webhook-processor": true, "exp-share-to-invite-variation": false, "allocate-with-regions": true, "frontbucket-eager-dispatching-of-exited-code-review": true, "orochi-git-diff-refactor": true, "use-elasticache-lsn-storage": true, "workspaces-api-proxy": true, "webhook_encryption_disabled": true, "uninstall-dvcs-addon-only-when-jira-is-removed": true, "log-asap-errors": true, "connect-iframe-no-sub": true, "support-sending-custom-events-to-the-webhook-processor": true, "sync-aid-revoked-to-workspace": true, "new-analytics-cdn": true, "nav-add-file": false, "custom-default-branch-name-repo-create": true, "allow-users-members-endpoint": true, "remove-deactivated-users-from-followers": true, "whitelisted_throttle_exemption": true, "api-diff-caching": true, "hot-91446-add-tracing-x-b3": true, "reset-changes-requested-status": true, "provision-workspaces-in-hams": true, "provisioning-skip-workspace-creation": true, "record-site-addon-version": true, "restrict-commit-author-data": true, "enable-jwt-repo-filtering": true, "reviewer-status": true, "fd-add-gitignore-dropdown-on-create-repo-page": true, "repo-show-uuid": false, "workspace-member-set-last-accessed": true, "provisioning-install-pipelines-addon": true, "expand-accesscontrol-cache-key": true, "disable-hg": true, "new-code-review": true, "orochi-disable-hooks-with-lockid": true, "fd-prs-client-cache-fallback": true, "fd-ie-deprecation-phase-one": true, "clone-in-xcode": true, "enable-merge-bases-api": true, "bbc.core.disable-repository-statuses-fetch": false, "bms-repository-no-finalize": true, "use-moneybucket": true, "spa-repo-settings--repo-details": true, "use-py-hams-client-asap": true, "sync-workspace-user-active": true, "fetch-all-relevant-jira-projects": true, "connect-iframe-sandbox": true, "nav-next-settings": true, "auth-flow-adg3": true, "consenthub-config-endpoint-update": true, "new-code-review-onboarding-experience": true, "disable-repository-replication-task": true, "lookup-pr-approvers-from-prs": true, "orochi-add-custom-backend": true, "null-mainbranch-implies-none": true, "bbc.core.pride-logo": false, "pr_post_build_merge": true, "fd-ie-deprecation-phase-two": true, "workspace-ui": true, "provisioning-auto-login": true, "bbcdev-13546-caching-defaults": true, "hide-price-annual": true, "fd-jira-compatible-issue-export": true, "account-switcher": true, "user-mentions-repo-filtering": true, "spa-repo-settings--access-keys": true, "read-only-message-migrations": true, "free-daily-repo-limit": true, "svg-based-qr-code": true, "allow-cloud-session": true, "orochi-custom-default-branch-name-repo-create": true, "fd-overview-page-pr-filter-buttons": true, "show-upgrade-plans-banner": true}, "locale": "en", "geoip_country": null, "targetFeatures": {"fd-send-webhooks-to-webhook-processor": true, "orochi-large-merge-message-support": true, "allocate-with-regions": true, "frontbucket-eager-dispatching-of-exited-code-review": true, "orochi-git-diff-refactor": true, "fd-repository-page-loading-error-guard": true, "workspaces-api-proxy": true, "webhook_encryption_disabled": true, "uninstall-dvcs-addon-only-when-jira-is-removed": true, "whitelisted_throttle_exemption": true, "connect-iframe-no-sub": true, "support-sending-custom-events-to-the-webhook-processor": true, "sync-aid-revoked-to-workspace": true, "new-analytics-cdn": true, "log-asap-errors": true, "custom-default-branch-name-repo-create": true, "allow-users-members-endpoint": true, "remove-deactivated-users-from-followers": true, "expand-accesscontrol-cache-key": true, "api-diff-caching": true, "prlinks-installer": true, "rm-empty-ref-dirs-on-push": true, "reset-changes-requested-status": true, "provision-workspaces-in-hams": true, "provisioning-skip-workspace-creation": true, "record-site-addon-version": true, "restrict-commit-author-data": true, "enable-jwt-repo-filtering": true, "show-banner-about-new-review-experience": true, "enable-merge-bases-api": true, "account-switcher": true, "reviewer-status": true, "fd-add-gitignore-dropdown-on-create-repo-page": true, "use-elasticache-lsn-storage": true, "workspace-member-set-last-accessed": true, "provisioning-install-pipelines-addon": true, "consenthub-config-endpoint-update": true, "disable-hg": true, "new-code-review": true, "orochi-disable-hooks-with-lockid": true, "show-pr-update-activity-changes": true, "fd-ie-deprecation-phase-one": true, "clone-in-xcode": true, "fd-undo-last-push": false, "bms-repository-no-finalize": true, "exp-new-user-survey": true, "use-moneybucket": true, "spa-repo-settings--repo-details": true, "use-py-hams-client-asap": true, "atlassian-editor": true, "sync-workspace-user-active": true, "fetch-all-relevant-jira-projects": true, "hot-91446-add-tracing-x-b3": true, "connect-iframe-sandbox": true, "nav-next-settings": true, "auth-flow-adg3": true, "view-source-filtering-upon-timeout": true, "new-code-review-onboarding-experience": true, "disable-repository-replication-task": true, "lookup-pr-approvers-from-prs": true, "orochi-add-custom-backend": true, "null-mainbranch-implies-none": true, "fd-prs-client-cache-fallback": true, "pr_post_build_merge": true, "fd-ie-deprecation-phase-two": true, "workspace-ui": true, "provisioning-auto-login": true, "bbcdev-13546-caching-defaults": true, "hide-price-annual": true, "fd-jira-compatible-issue-export": true, "enable-fx3-client": true, "spa-repo-settings--access-keys": true, "read-only-message-migrations": true, "free-daily-repo-limit": true, "svg-based-qr-code": true, "allow-cloud-session": true, "orochi-custom-default-branch-name-repo-create": true, "markdown-embedded-html": false, "fd-overview-page-pr-filter-buttons": true, "show-upgrade-plans-banner": true}, "isFocusedTask": false, "browser_monitoring": true, "targetUser": {"username": "__wp__", "display_name": "__WP__", "uuid": "{55ded115-598c-4864-b0e7-cdef05771294}", "links": {"self": {"href": "https://bitbucket.org/!api/2.0/teams/%7B55ded115-598c-4864-b0e7-cdef05771294%7D"}, "html": {"href": "https://bitbucket.org/%7B55ded115-598c-4864-b0e7-cdef05771294%7D/"}, "avatar": {"href": "https://bitbucket.org/account/__wp__/avatar/"}}, "is_active": true, "created_on": "2012-09-12T18:04:32.423010+00:00", "type": "team", "properties": {}, "has_2fa_enabled": null}, "is_mobile_user_agent": false, "flags": [], "site_message": "", "isNavigationOpen": true, "path": "/__wp__/mb-linux-msli/src/master/", "focusedTaskBackButtonUrl": null, "whats_new_feed": "https://bitbucket.org/blog/wp-json/wp/v2/posts?categories=196&context=embed&per_page=6&orderby=date&order=desc"}, "repository": {"source": {"section": {"hash": "ae5d81ca8c8265958d9847aecca0505dbce92217", "atRef": null, "ref": {"name": "master", "links": {"self": {"href": "https://bitbucket.org/!api/2.0/repositories/__wp__/mb-linux-msli/refs/branches/master"}, "html": {"href": "https://bitbucket.org/__wp__/mb-linux-msli/branch/master"}}, "target": {"type": "commit", "hash": "ae5d81ca8c8265958d9847aecca0505dbce92217", "links": {"self": {"href": "https://bitbucket.org/!api/2.0/repositories/__wp__/mb-linux-msli/commit/ae5d81ca8c8265958d9847aecca0505dbce92217"}, "html": {"href": "https://bitbucket.org/__wp__/mb-linux-msli/commits/ae5d81ca8c8265958d9847aecca0505dbce92217"}}}}}}}}; window.__settings__ = {"MARKETPLACE_TERMS_OF_USE_URL": null, "JIRA_ISSUE_COLLECTORS": {"code-review-beta": {"url": "https://bitbucketfeedback.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/-4bqv2z/b/20/a44af77267a987a660377e5c46e0fb64/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=bb066400", "id": "bb066400"}, "jira-software-repo-page": {"url": "https://jira.atlassian.com/s/1ce410db1c7e1b043ed91ab8e28352e2-T/yl6d1c/804001/619f60e5de428c2ed7545f16096c303d/3.1.0/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-UK&collectorId=064d6699", "id": "064d6699"}, "code-review-rollout": {"url": "https://bitbucketfeedback.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/-4bqv2z/b/20/a44af77267a987a660377e5c46e0fb64/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=de003e2d", "id": "de003e2d"}, "source-browser": {"url": "https://bitbucketfeedback.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/-tqnsjm/b/20/a44af77267a987a660377e5c46e0fb64/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=c19c2ff6", "id": "c19c2ff6"}}, "STATUSPAGE_URL": "https://bitbucket.status.atlassian.com/", "CANON_URL": "https://bitbucket.org", "CONSENT_HUB_FRONTEND_BASE_URL": "https://preferences.atlassian.com", "API_CANON_URL": "https://api.bitbucket.org", "SOCIAL_AUTH_ATLASSIANID_LOGOUT_URL": "https://id.atlassian.com/logout", "EMOJI_STANDARD_BASE_URL": "https://api-private.atlassian.com/emoji/"}; window.__webpack_nonce__ = 'xxI7cPsOVRt9B81s'; window.isInitialLoadApdex = true; </script> <script nonce="xxI7cPsOVRt9B81s" src="https://d301sr5gafysq2.cloudfront.net/frontbucket/assets/i18n/en.4509eaad.js"></script> <script nonce="xxI7cPsOVRt9B81s" src="https://d301sr5gafysq2.cloudfront.net/frontbucket/assets/present/ajs.53f719bc.js"></script> <script nonce="xxI7cPsOVRt9B81s" src="https://d301sr5gafysq2.cloudfront.net/frontbucket/assets/present/app.8acf32f0.js"></script> <script nonce="xxI7cPsOVRt9B81s" src="https://d301sr5gafysq2.cloudfront.net/frontbucket/assets/present/performance-timing.f1eda5e1.js" defer></script> <script nonce="xxI7cPsOVRt9B81s" type="text/javascript">window.NREUM||(NREUM={});NREUM.info={"beacon":"bam-cell.nr-data.net","queueTime":0,"licenseKey":"a2cef8c3d3","agent":"","transactionName":"NFcGYEdUW0IAVE1QCw0dIkFbVkFYDlkWWw0XUBFXXlBBHwBHSUpKEVcUWwcbQ1gEQEoDNwxHFldQY1xUFhleXBA=","applicationID":"548124220,1841284","errorBeacon":"bam-cell.nr-data.net","applicationTime":263}</script> </body> </html>
funkia / Purescript Rrb ListHighly efficient immutable list powered RRB-trees implementing the Data.Array API
coatl / SequenceSequence provides a unified api for access to sequential Ruby data types, like Strings, Arrays, Files, IOs, and Enumerations.
Gonzagadavid / Calendar Json ApiThe Calendar JSON API can be used to provide you with a calendar formatted as a 2D array. For that, you may choose to query for the selected month, or the selected year, as explained in the endpoints below.
That3Percent / Soa VecA simple Vec-like API over a struct of arrays layout for Rust
Jordans2299 / Ajax CalendarBasic calendar that supports creation of user accounts and the ablitity to create, edit, and delete events. Using ajax all of these operations are done without refreshing the page. There is a function, however, that checks if a user session has been created every time a page is reloaded to prevent the user from being logged out on page reload. Using Javascript fetch api, the input fields are converted to json and sent to the appropriate php file. There inputs are decoded into php variable and used to query the MySQL database. Lastly, a json array is sent back to the javascript file saying whether the query was successful.
pugjs / Token StreamTake an array of token and produce a more useful API to give to a parser
the-ruby-js-project / RubyinjsMakes Ruby like APIs available in JS Objects like Array and Strings
joeydotdev / Woofbot Api Docs🐶woofbot.io is a free API service that generates dog pictures from an array of different breeds.
elgs / GosqlcrudA Go library to work with SQL database using standard `database/sql` api. It supports SQL to array/maps/structs, and CRUD operations on structs.
Alpaca-Studio / UnitySysAPIThe Sys API is essentially an API layer for the UnityEngine. The Sys API adds an array of new methods as well as alternatives some older ones. The Sys class lies within the UnityEngine namespace, so it will already be imported into your scripts.
abhinavguptas / Apex Select Option SortingSalesforce APEX API to Sort Array/List of SelectOption instances
Lifeformwp / Php PubgPUBG API wrapper written in PHP 7.1 (arrays/DTO, full codebase test coverage, etc.)
sdpython / Onnx Array ApiArray APIs to write ONNX Graphs
SidharthMudgil / GeemuAndroid app powered by RAWG API for discovering, tracking, and exploring a vast array of games effortlessly.
davidcole1977 / Scale MakerNodeJS module that returns a variety of musical scales as arrays of values (as frequency in Hertz or cents for use as a detune) for use in the Web Audio Javascript API and other Javascript-based audio environments.
Leandropesao / Boooot// Generated by CoffeeScript 1.6.2 (function() { var Command, RoomHelper, User, addCommand, afkCheck, afksCommand, allAfksCommand, announceCurate, antispam, apiHooks, avgVoteRatioCommand, chatCommandDispatcher, chatUniversals, cmds, data, dieCommand, disconnectLookupCommand, fans, handleNewSong, handleUserJoin, handleUserLeave, handleVote, hook, initEnvironment, initHooks, initialize, lockCommand, lockskipCommand, msToStr, newSongsCommand, newsCommand, populateUserData, channelCommand, pupOnline, reloadCommand, removeCommand, roomHelpCommand, rulesCommand, settings, skipCommand, staffCommand, statusCommand, themeCommand, undoHooks, unhook, unlockCommand, updateVotes, versionCommand, voteRatioCommand, ref, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref2, _ref20, _ref21, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (_hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; settings = (function() { function settings() { this.implode = __bind(this.implode, this); this.intervalMessages = __bind(this.intervalMessages, this); this.startAfkInterval = __bind(this.startAfkInterval, this); this.setInternalWaitlist = __bind(this.setInternalWaitlist, this); this.userJoin = __bind(this.userJoin, this); this.getRoomUrlPath = __bind(this.getRoomUrlPath, this); this.startup = __bind(this.startup, this); } settings.prototype.currentsong = {}; settings.prototype.users = {}; settings.prototype.djs = []; settings.prototype.mods = []; settings.prototype.host = []; settings.prototype.hasWarned = false; settings.prototype.currentwoots = 0; settings.prototype.currentmehs = 0; settings.prototype.currentcurates = 0; settings.prototype.roomUrlPath = null; settings.prototype.internalWaitlist = []; settings.prototype.userDisconnectLog = []; settings.prototype.voteLog = {}; settings.prototype.seshOn = false; settings.prototype.forceSkip = false; settings.prototype.seshMembers = []; settings.prototype.launchTime = null; settings.prototype.totalVotingData = { woots: 0, mehs: 0, curates: 0 }; settings.prototype.pupScriptUrl = 'https://dl.dropbox.com/u/21023321/TastycatBot.js'; settings.prototype.afkTime = 666 * 60 * 1000; settings.prototype.songIntervalMessages = [ { interval: 7, offset: 0, msg: "Entrem na nossa pagina: http://www.facebook.com/EspecialistasDasZoeiras?ref=hl" }, { interval: 5, offset: 0, msg: "Mantenha-se ativo no bate-papo e Votando. Ser não sera Retirado da Lista de DJ e da Cabine!" } ]; settings.prototype.songCount = 0; settings.prototype.startup = function() { this.launchTime = new Date(); return this.roomUrlPath = this.getRoomUrlPath(); }; settings.prototype.getRoomUrlPath = function() { return window.location.pathname.replace(/\//g, ''); }; settings.prototype.newSong = function() { this.totalVotingData.woots += this.currentwoots; this.totalVotingData.mehs += this.currentmehs; this.totalVotingData.curates += this.currentcurates; this.setInternalWaitlist(); this.currentsong = API.getMedia(); if (this.currentsong !== null) { return this.currentsong; } else { return false; } }; settings.prototype.userJoin = function(u) { var userIds, _ref; userIds = Object.keys(this.users); if (_ref = u.id, __indexOf.call(userIds, _ref) >= 0) { return this.users[u.id].inRoom(true); } else { this.users[u.id] = new User(u); return this.voteLog[u.id] = {}; } }; settings.prototype.setInternalWaitlist = function() { var boothWaitlist, fullWaitList, lineWaitList; boothWaitlist = API.getDJs().slice(1); lineWaitList = API.getWaitList(); fullWaitList = boothWaitlist.concat(lineWaitList); return this.internalWaitlist = fullWaitList; }; settings.prototype.activity = function(obj) { if (obj.type === 'message') { return this.users[obj.fromID].updateActivity(); } }; settings.prototype.startAfkInterval = function() { return this.afkInterval = setInterval(afkCheck, 2000); }; settings.prototype.intervalMessages = function() { var msg, _i, _len, _ref, _results; this.songCount++; _ref = this.songIntervalMessages; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { msg = _ref[_i]; if (((this.songCount + msg['offset']) % msg['interval']) === 0) { _results.push(API.sendChat(msg['msg'])); } else { _results.push(void 0); } } return _results; }; settings.prototype.implode = function() { var item, val; for (item in this) { val = this[item]; if (typeof this[item] === 'object') { delete this[item]; } } return clearInterval(this.afkInterval); }; settings.prototype.lockBooth = function(callback) { if (callback == null) { callback = null; } return $.ajax({ url: "http://plug.dj/_/gateway/room.update_options", type: 'POST', data: JSON.stringify({ service: "room.update_options", body: [ this.roomUrlPath, { "boothLocked": true, "waitListEnabled": true, "maxPlays": 1, "maxDJs": 5 } ] }), async: this.async, dataType: 'json', contentType: 'application/json' }).done(function() { if (callback != null) { return callback(); } }); }; settings.prototype.unlockBooth = function(callback) { if (callback == null) { callback = null; } return $.ajax({ url: "http://plug.dj/_/gateway/room.update_options", type: 'POST', data: JSON.stringify({ service: "room.update_options", body: [ this.roomUrlPath, { "boothLocked": false, "waitListEnabled": true, "maxPlays": 1, "maxDJs": 5 } ] }), async: this.async, dataType: 'json', contentType: 'application/json' }).done(function() { if (callback != null) { return callback(); } }); }; return settings; })(); data = new settings(); User = (function() { User.prototype.afkWarningCount = 0; User.prototype.lastWarning = null; User.prototype["protected"] = false; User.prototype.isInRoom = true; function User(user) { this.user = user; this.updateVote = __bind(this.updateVote, this); this.inRoom = __bind(this.inRoom, this); this.notDj = __bind(this.notDj, this); this.warn = __bind(this.warn, this); this.getIsDj = __bind(this.getIsDj, this); this.getWarningCount = __bind(this.getWarningCount, this); this.getUser = __bind(this.getUser, this); this.getLastWarning = __bind(this.getLastWarning, this); this.getLastActivity = __bind(this.getLastActivity, this); this.getLastDrinkTime = __bind(this.getLastDrinkTime, this); this.updateDrinkTime = __bind(this.updateDrinkTime, this); this.updateActivity = __bind(this.updateActivity, this); this.init = __bind(this.init, this); this.init(); } User.prototype.init = function() { this.lastActivity = new Date(); return this.drinkTime = new Date(); }; User.prototype.updateActivity = function() { this.lastActivity = new Date(); this.afkWarningCount = 0; return this.lastWarning = null; }; User.prototype.updateDrinkTime = function() { return this.drinkTime = new Date(); }; User.prototype.getLastDrinkTime = function() { return this.drinkTime; }; User.prototype.getLastActivity = function() { return this.lastActivity; }; User.prototype.getLastWarning = function() { if (this.lastWarning === null) { return false; } else { return this.lastWarning; } }; User.prototype.getUser = function() { return this.user; }; User.prototype.getWarningCount = function() { return this.afkWarningCount; }; User.prototype.getIsDj = function() { var DJs, dj, _i, _len; DJs = API.getDJs(); for (_i = 0, _len = DJs.length; _i < _len; _i++) { dj = DJs[_i]; if (this.user.id === dj.id) { return true; } } return false; }; User.prototype.warn = function() { this.afkWarningCount++; return this.lastWarning = new Date(); }; User.prototype.notDj = function() { this.afkWarningCount = 0; return this.lastWarning = null; }; User.prototype.inRoom = function(online) { return this.isInRoom = online; }; User.prototype.updateVote = function(v) { if (this.isInRoom) { return data.voteLog[this.user.id][data.currentsong.id] = v; } }; return User; })(); RoomHelper = (function() { function RoomHelper() {} RoomHelper.prototype.lookupUser = function(username) { var id, u, _ref; _ref = data.users; for (id in _ref) { u = _ref[id]; if (u.getUser().username === username) { return u.getUser(); } } return false; }; RoomHelper.prototype.userVoteRatio = function(user) { var songId, songVotes, vote, votes; songVotes = data.voteLog[user.id]; votes = { 'woot': 0, 'meh': 0 }; for (songId in songVotes) { vote = songVotes[songId]; if (vote === 1) { votes['woot']++; } else if (vote === -1) { votes['meh']++; } } votes['positiveRatio'] = (votes['woot'] / (votes['woot'] + votes['meh'])).toFixed(2); return votes; }; return RoomHelper; })(); pupOnline = function() { var currentversion, me, myname; me = API.getSelf(); myname = me.username; currentversion = "1.0.0"; log("BOT editado pelo Rafal Moraes versão " + currentversion + " Chupa Jô"); return API.sendChat("/me on"); }; populateUserData = function() { var u, users, _i, _len; users = API.getUsers(); for (_i = 0, _len = users.length; _i < _len; _i++) { u = users[_i]; data.users[u.id] = new User(u); data.voteLog[u.id] = {}; } }; initEnvironment = function() { document.getElementById("button-vote-positive").click(); document.getElementById("button-sound").click(); Playback.streamDisabled = true; return Playback.stop(); }; initialize = function() { pupOnline(); populateUserData(); initEnvironment(); initHooks(); data.startup(); data.newSong(); return data.startAfkInterval(); }; afkCheck = function() { var DJs, id, lastActivity, lastWarned, now, secsLastActive, timeSinceLastActivity, timeSinceLastWarning, twoMinutes, user, _ref, _results; _ref = data.users; _results = []; for (id in _ref) { user = _ref[id]; now = new Date(); lastActivity = user.getLastActivity(); timeSinceLastActivity = now.getTime() - lastActivity.getTime(); if (timeSinceLastActivity > data.afkTime) { if (user.getIsDj()) { secsLastActive = timeSinceLastActivity / 1000; if (user.getWarningCount() === 0) { user.warn(); _results.push(API.sendChat("@" + user.getUser().username + ", Você não falou no chat nos ultimos 30 minutos, por favor fale alguma coisa em 4 minutos ou será kickado da line de dj.")); } else if (user.getWarningCount() === 1) { lastWarned = user.getLastWarning(); timeSinceLastWarning = now.getTime() - lastWarned.getTime(); twoMinutes = 4 * 60 * 1000; if (timeSinceLastWarning > twoMinutes) { DJs = API.getDJs(); if (DJs.length > 0 && DJs[0].id !== user.getUser().id) { API.sendChat("@" + user.getUser().username + ", você foi avisado, fique ativo enquanto está na line."); API.moderateRemoveDJ(id); _results.push(user.warn()); } else { _results.push(void 0); } } else { _results.push(void 0); } } else { _results.push(void 0); } } else { _results.push(user.notDj()); } } else { _results.push(void 0); } } return _results; }; msToStr = function(msTime) { var ms, msg, timeAway; msg = ''; timeAway = { 'days': 0, 'hours': 0, 'minutes': 0, 'seconds': 0 }; ms = { 'day': 24 * 60 * 60 * 1000, 'hour': 60 * 60 * 1000, 'minute': 60 * 1000, 'second': 1000 }; if (msTime > ms['day']) { timeAway['days'] = Math.floor(msTime / ms['day']); msTime = msTime % ms['day']; } if (msTime > ms['hour']) { timeAway['hours'] = Math.floor(msTime / ms['hour']); msTime = msTime % ms['hour']; } if (msTime > ms['minute']) { timeAway['minutes'] = Math.floor(msTime / ms['minute']); msTime = msTime % ms['minute']; } if (msTime > ms['second']) { timeAway['seconds'] = Math.floor(msTime / ms['second']); } if (timeAway['days'] !== 0) { msg += timeAway['days'].toString() + 'd'; } if (timeAway['hours'] !== 0) { msg += timeAway['hours'].toString() + 'h'; } if (timeAway['minutes'] !== 0) { msg += timeAway['minutes'].toString() + 'm'; } if (timeAway['seconds'] !== 0) { msg += timeAway['seconds'].toString() + 's'; } if (msg !== '') { return msg; } else { return false; } }; Command = (function() { function Command(msgData) { this.msgData = msgData; this.init(); } Command.prototype.init = function() { this.parseType = null; this.command = null; return this.rankPrivelege = null; }; Command.prototype.functionality = function(data) {}; Command.prototype.hasPrivelege = function() { var user; user = data.users[this.msgData.fromID].getUser(); switch (this.rankPrivelege) { case 'host': return user.permission >= 5; case 'cohost': return user.permission >= 4; case 'mod': return user.permission >= 3; case 'manager': return user.permission >= 3; case 'bouncer': return user.permission >= 2; case 'featured': return user.permission >= 1; default: return true; } }; Command.prototype.commandMatch = function() { var command, msg, _i, _len, _ref; msg = this.msgData.message; if (typeof this.command === 'string') { if (this.parseType === 'exact') { if (msg === this.command) { return true; } else { return false; } } else if (this.parseType === 'startsWith') { if (msg.substr(0, this.command.length) === this.command) { return true; } else { return false; } } else if (this.parseType === 'contains') { if (msg.indexOf(this.command) !== -1) { return true; } else { return false; } } } else if (typeof this.command === 'object') { _ref = this.command; for (_i = 0, _len = _ref.length; _i < _len; _i++) { command = _ref[_i]; if (this.parseType === 'exact') { if (msg === command) { return true; } } else if (this.parseType === 'startsWith') { if (msg.substr(0, command.length) === command) { return true; } } else if (this.parseType === 'contains') { if (msg.indexOf(command) !== -1) { return true; } } } return false; } }; Command.prototype.evalMsg = function() { if (this.commandMatch() && this.hasPrivelege()) { this.functionality(); return true; } else { return false; } }; return Command; })(); newsCommand = (function(_super) { __extends(newsCommand, _super); function newsCommand() { _ref = newsCommand.__super__.constructor.apply(this, arguments); return _ref; } newsCommand.prototype.init = function() { this.command = '!cotas'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; newsCommand.prototype.functionality = function() { var msg; msg = "/me Acaba de Ativar modo Cota e roubou sua vaga na Faculdade e sua vez na Cabine de DJ!"; return API.sendChat(msg); }; return newsCommand; })(Command); newSongsCommand = (function(_super) { __extends(newSongsCommand, _super); function newSongsCommand() { _ref1 = newSongsCommand.__super__.constructor.apply(this, arguments); return _ref1; } newSongsCommand.prototype.init = function() { this.command = '!musicanovas'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; newSongsCommand.prototype.functionality = function() { var arts, cMedia, chans, chooseRandom, mChans, msg, selections, u, _ref2; mChans = this.memberChannels.slice(0); chans = this.channels.slice(0); arts = this.artists.slice(0); chooseRandom = function(list) { var l, r; l = list.length; r = Math.floor(Math.random() * l); return list.splice(r, 1); }; selections = { channels: [], artist: '' }; u = data.users[this.msgData.fromID].getUser().username; if (u.indexOf("MistaDubstep") !== -1) { selections['channels'].push('MistaDubstep'); } else if (u.indexOf("Underground Promotions") !== -1) { selections['channels'].push('UndergroundDubstep'); } else { selections['channels'].push(chooseRandom(mChans)); } selections['channels'].push(chooseRandom(chans)); selections['channels'].push(chooseRandom(chans)); cMedia = API.getMedia(); if (_ref2 = cMedia.author, __indexOf.call(arts, _ref2) >= 0) { selections['artist'] = cMedia.author; } else { selections['artist'] = chooseRandom(arts); } msg = "Querem musica de Dubstep do " + selections['artist'] + " entre! Tem musicas nova sempre em http://youtube.com/" + selections['channels'][0] + " http://youtube.com/" + selections['channels'][1] + " ou http://youtube.com/" + selections['channels'][2]; return API.sendChat(msg); }; newSongsCommand.prototype.memberChannels = ["MistaDubstep", "DubStationPromotions", "UndergroundDubstep", "JesusDied4Dubstep", "DarkstepWarrior", "BombshockDubstep", "Sharestep"]; newSongsCommand.prototype.channels = ["BassRape", "MonstercatMedia", "UKFdubstep", "DropThatBassline", "VitalDubstep", "AirwaveDubstepTV", "InspectorDubplate", "TehDubstepChannel", "UNITEDubstep", "LuminantNetwork", "TheSoundIsle", "PandoraMuslc", "MrSuicideSheep", "HearTheSensation", "bassoutletpromos", "MistaDubstep", "DubStationPromotions", "UndergroundDubstep", "JesusDied4Dubstep", "DarkstepWarrior", "BombshockDubstep", "Sharestep"]; newSongsCommand.prototype.artists = ["Doctor P", "Excision", "Flux Pavilion", "Knife Party", "Rusko", "Bassnectar", "Nero", "Deadmau5", "Borgore", "Zomboy"]; return newSongsCommand; })(Command); themeCommand = (function(_super) { __extends(themeCommand, _super); function themeCommand() { _ref2 = themeCommand.__super__.constructor.apply(this, arguments); return _ref2; } themeCommand.prototype.init = function() { this.command = '!tema'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; themeCommand.prototype.functionality = function() { var msg; msg = "Temas permitidos aqui na sala. electro, techno, "; msg += "dubstep."; return API.sendChat(msg); }; return themeCommand; })(Command); rulesCommand = (function(_super) { __extends(rulesCommand, _super); function rulesCommand() { _ref3 = rulesCommand.__super__.constructor.apply(this, arguments); return _ref3; } rulesCommand.prototype.init = function() { this.command = '!regras'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; rulesCommand.prototype.functionality = function() { var msg1, msg2; msg1 = " 1) Video no Maximo 6 minutos. "; msg1 += " 2) Sem Flood! "; msg1 += " 3) Nao escrever em colorido "; msg1 += " 4) Respeitar os Adms e Mods;s "; msg1 += " 5) Nao Fiquem Pedindo Cargos "; msg2 = "Curta: http://www.facebook.com/EspecialistasDasZoeiras?ref=hl"; msg2 += ""; API.sendChat(msg1); return setTimeout((function() { return API.sendChat(msg2); }), 750); }; return rulesCommand; })(Command); roomHelpCommand = (function(_super) { __extends(roomHelpCommand, _super); function roomHelpCommand() { _ref4 = roomHelpCommand.__super__.constructor.apply(this, arguments); return _ref4; } roomHelpCommand.prototype.init = function() { this.command = '!ajuda'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; roomHelpCommand.prototype.functionality = function() { var msg1, msg2; msg1 = "Bem vindo a Sala! Para ser o DJ, Criar uma lista de reprodução e coloque Musica do Youtube ou soundcloud. "; msg1 += "Se é novo procure pelo seu nome na sua tela (do lado da cabine de dj e clique) e depois mude o nome."; msg2 = "Para Ganhar Pontos é só clica em Bacana. "; msg2 += "Digite !regras pare ler as porra das regras."; API.sendChat(msg1); return setTimeout((function() { return API.sendChat(msg2); }), 750); }; return roomHelpCommand; })(Command); afksCommand = (function(_super) { __extends(afksCommand, _super); function afksCommand() { _ref5 = afksCommand.__super__.constructor.apply(this, arguments); return _ref5; } afksCommand.prototype.init = function() { this.command = '!afks'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; afksCommand.prototype.functionality = function() { var dj, djAfk, djs, msg, now, _i, _len; msg = ''; djs = API.getDJs(); for (_i = 0, _len = djs.length; _i < _len; _i++) { dj = djs[_i]; now = new Date(); djAfk = now.getTime() - data.users[dj.id].getLastActivity().getTime(); if (djAfk > (5 * 60 * 1000)) { if (msToStr(djAfk) !== false) { msg += dj.username + ' - ' + msToStr(djAfk); msg += '. '; } } } if (msg === '') { return API.sendChat("Se fudeu não tem ninguém AFK."); } else { return API.sendChat('AFKs: ' + msg); } }; return afksCommand; })(Command); allAfksCommand = (function(_super) { __extends(allAfksCommand, _super); function allAfksCommand() { _ref6 = allAfksCommand.__super__.constructor.apply(this, arguments); return _ref6; } allAfksCommand.prototype.init = function() { this.command = '!todosafks'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; allAfksCommand.prototype.functionality = function() { var msg, now, u, uAfk, usrs, _i, _len; msg = ''; usrs = API.getUsers(); for (_i = 0, _len = usrs.length; _i < _len; _i++) { u = usrs[_i]; now = new Date(); uAfk = now.getTime() - data.users[u.id].getLastActivity().getTime(); if (uAfk > (10 * 60 * 1000)) { if (msToStr(uAfk) !== false) { msg += u.username + ' - ' + msToStr(uAfk); msg += '. '; } } } if (msg === '') { return API.sendChat("Se fudeu não tem ninguém AFK."); } else { return API.sendChat('AFKs: ' + msg); } }; return allAfksCommand; })(Command); statusCommand = (function(_super) { __extends(statusCommand, _super); function statusCommand() { _ref7 = statusCommand.__super__.constructor.apply(this, arguments); return _ref7; } statusCommand.prototype.init = function() { this.command = '!status'; this.parseType = 'exact'; return this.rankPrivelege = 'featured'; }; statusCommand.prototype.functionality = function() { var day, hour, launch, lt, meridian, min, month, msg, t, totals; lt = data.launchTime; month = lt.getMonth() + 1; day = lt.getDate(); hour = lt.getHours(); meridian = hour % 12 === hour ? 'AM' : 'PM'; min = lt.getMinutes(); min = min < 10 ? '0' + min : min; t = data.totalVotingData; t['songs'] = data.songCount; launch = 'Iniciada em ' + month + '/' + day + ' ' + hour + ':' + min + ' ' + meridian + '. '; totals = '' + t.songs + ' Teve: :+1: ' + t.woots + ',:-1: ' + t.mehs + ',:heart: ' + t.curates + '.' msg = launch + totals; return API.sendChat(msg); }; return statusCommand; })(Command); dieCommand = (function(_super) { __extends(dieCommand, _super); function dieCommand() { _ref8 = dieCommand.__super__.constructor.apply(this, arguments); return _ref8; } dieCommand.prototype.init = function() { this.command = '!adeus'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; dieCommand.prototype.functionality = function() { API.sendChat("Acho que fui envenenado!"); undoHooks(); API.sendChat("Vish,"); data.implode(); return API.sendChat("Morri! x_x"); }; return dieCommand; })(Command); reloadCommand = (function(_super) { __extends(reloadCommand, _super); function reloadCommand() { _ref9 = reloadCommand.__super__.constructor.apply(this, arguments); return _ref9; } reloadCommand.prototype.init = function() { this.command = '!reload'; this.parseType = 'exact'; return this.rankPrivelege = 'Host'; }; reloadCommand.prototype.functionality = function() { var pupSrc; API.sendChat('/me Não se Preocupe o Papai Chegou'); undoHooks(); pupSrc = data.pupScriptUrl; data.implode(); return $.getScript(pupSrc); }; return reloadCommand; })(Command); lockCommand = (function(_super) { __extends(lockCommand, _super); function lockCommand() { _ref10 = lockCommand.__super__.constructor.apply(this, arguments); return _ref10; } lockCommand.prototype.init = function() { this.command = '!trava'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; lockCommand.prototype.functionality = function() { return data.lockBooth(); }; return lockCommand; })(Command); unlockCommand = (function(_super) { __extends(unlockCommand, _super); function unlockCommand() { _ref11 = unlockCommand.__super__.constructor.apply(this, arguments); return _ref11; } unlockCommand.prototype.init = function() { this.command = '!destrava'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; unlockCommand.prototype.functionality = function() { return data.unlockBooth(); }; return unlockCommand; })(Command); removeCommand = (function(_super) { __extends(removeCommand, _super); function removeCommand() { _ref12 = removeCommand.__super__.constructor.apply(this, arguments); return _ref12; } removeCommand.prototype.init = function() { this.command = '!remove'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; removeCommand.prototype.functionality = function() { var djs, popDj; djs = API.getDJs(); popDj = djs[djs.length - 1]; return API.moderateRemoveDJ(popDj.id); }; return removeCommand; })(Command); addCommand = (function(_super) { __extends(addCommand, _super); function addCommand() { _ref13 = addCommand.__super__.constructor.apply(this, arguments); return _ref13; } addCommand.prototype.init = function() { this.command = '!add'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; addCommand.prototype.functionality = function() { var msg, name, r, user; msg = this.msgData.message; if (msg.length > this.command.length + 2) { name = msg.substr(this.command.length + 2); r = new RoomHelper(); user = r.lookupUser(name); if (user !== false) { API.moderateAddDJ(user.id); return setTimeout((function() { return data.unlockBooth(); }), 5000); } } }; return addCommand; })(Command); skipCommand = (function(_super) { __extends(skipCommand, _super); function skipCommand() { _ref14 = skipCommand.__super__.constructor.apply(this, arguments); return _ref14; } skipCommand.prototype.init = function() { this.command = '!pula'; this.parseType = 'exact'; this.rankPrivelege = 'bouncer'; return window.lastSkipTime; }; skipCommand.prototype.functionality = function() { var currentTime, millisecondsPassed; currentTime = new Date(); if (!window.lastSkipTime) { API.moderateForceSkip(); return window.lastSkipTime = currentTime; } else { millisecondsPassed = Math.round(currentTime.getTime() - window.lastSkipTime.getTime()); if (millisecondsPassed > 10000) { window.lastSkipTime = currentTime; return API.moderateForceSkip(); } } }; return skipCommand; })(Command); disconnectLookupCommand = (function(_super) { __extends(disconnectLookupCommand, _super); function disconnectLookupCommand() { _ref15 = disconnectLookupCommand.__super__.constructor.apply(this, arguments); return _ref15; } disconnectLookupCommand.prototype.init = function() { this.command = '!dcmembros'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; disconnectLookupCommand.prototype.functionality = function() { var cmd, dcHour, dcLookupId, dcMeridian, dcMins, dcSongsAgo, dcTimeStr, dcUser, disconnectInstances, givenName, id, recentDisconnect, resp, u, _i, _len, _ref16, _ref17; cmd = this.msgData.message; if (cmd.length > 11) { givenName = cmd.slice(11); _ref16 = data.users; for (id in _ref16) { u = _ref16[id]; if (u.getUser().username === givenName) { dcLookupId = id; disconnectInstances = []; _ref17 = data.userDisconnectLog; for (_i = 0, _len = _ref17.length; _i < _len; _i++) { dcUser = _ref17[_i]; if (dcUser.id === dcLookupId) { disconnectInstances.push(dcUser); } } if (disconnectInstances.length > 0) { resp = u.getUser().username + ' disconectou ' + disconnectInstances.length.toString() + ' '; if (disconnectInstances.length === 1) { resp += '. '; } else { resp += 's. '; } recentDisconnect = disconnectInstances.pop(); dcHour = recentDisconnect.time.getHours(); dcMins = recentDisconnect.time.getMinutes(); if (dcMins < 10) { dcMins = '0' + dcMins.toString(); } dcMeridian = dcHour % 12 === dcHour ? 'AM' : 'PM'; dcTimeStr = '' + dcHour + ':' + dcMins + ' ' + dcMeridian; dcSongsAgo = data.songCount - recentDisconnect.songCount; resp += 'O seu disconect mais recente foi á ' + dcTimeStr + ' (' + dcSongsAgo + ' músicas atras). '; if (recentDisconnect.waitlistPosition !== void 0) { resp += 'Ele estava ' + recentDisconnect.waitlistPosition + ' música'; if (recentDisconnect.waitlistPosition > 1) { resp += 's'; } resp += ' atras da cabine de dj.'; } else { resp += 'Ele não estava na cabine de dj.'; } API.sendChat(resp); return; } else { API.sendChat(" " + u.getUser().username + " não disconectou."); return; } } } return API.sendChat("Eu não vejo essa pessoa na sala '" + givenName + "'."); } }; return disconnectLookupCommand; })(Command); voteRatioCommand = (function(_super) { __extends(voteRatioCommand, _super); function voteRatioCommand() { _ref16 = voteRatioCommand.__super__.constructor.apply(this, arguments); return _ref16; } voteRatioCommand.prototype.init = function() { this.command = '!voteratio'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; voteRatioCommand.prototype.functionality = function() { var msg, name, r, u, votes; r = new RoomHelper(); msg = this.msgData.message; if (msg.length > 12) { name = msg.substr(12); u = r.lookupUser(name); if (u !== false) { votes = r.userVoteRatio(u); msg = u.username + " :+1: " + votes['woot'].toString() + " vez"; if (votes['woot'] === 1) { msg += ', '; } else { msg += 'es, '; } msg += "e :-1: " + votes['meh'].toString() + " veze"; if (votes['meh'] === 1) { msg += '. '; } else { msg += 'es. '; } msg += "O seu vote ratio é: " + votes['positiveRatio'].toString() + "."; return API.sendChat(msg); } else { return API.sendChat("Não parece ter alguém com esse nome de'" + name + "'"); } } else { return API.sendChat("Você quer alguma coisa? Ou você está apenas tentando me irritar."); } }; return voteRatioCommand; })(Command); avgVoteRatioCommand = (function(_super) { __extends(avgVoteRatioCommand, _super); function avgVoteRatioCommand() { _ref17 = avgVoteRatioCommand.__super__.constructor.apply(this, arguments); return _ref17; } avgVoteRatioCommand.prototype.init = function() { this.command = '!avgvoteratio'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; avgVoteRatioCommand.prototype.functionality = function() { var averageRatio, msg, r, ratio, roomRatios, uid, user, userRatio, votes, _i, _len, _ref18; roomRatios = []; r = new RoomHelper(); _ref18 = data.voteLog; for (uid in _ref18) { votes = _ref18[uid]; user = data.users[uid].getUser(); userRatio = r.userVoteRatio(user); roomRatios.push(userRatio['positiveRatio']); } averageRatio = 0.0; for (_i = 0, _len = roomRatios.length; _i < _len; _i++) { ratio = roomRatios[_i]; averageRatio += ratio; } averageRatio = averageRatio / roomRatios.length; msg = "Accounting for " + roomRatios.length.toString() + " user ratios, the average room ratio is " + averageRatio.toFixed(2).toString() + "."; return API.sendChat(msg); }; return avgVoteRatioCommand; })(Command); staffCommand = (function(_super) { __extends(staffCommand, _super); function staffCommand() { _ref18 = staffCommand.__super__.constructor.apply(this, arguments); return _ref18; } staffCommand.prototype.init = function() { this.command = '!staff'; this.parseType = 'exact'; this.rankPrivelege = 'user'; return window.lastActiveStaffTime; }; staffCommand.prototype.staff = function() { var now, staff, staffAfk, stringstaff, user, _i, _len; staff = API.getStaff(); now = new Date(); stringstaff = ""; for (_i = 0, _len = staff.length; _i < _len; _i++) { user = staff[_i]; if (user.permission > 1) { staffAfk = now.getTime() - data.users[user.id].getLastActivity().getTime(); if (staffAfk < (60 * 60 * 1000)) { stringstaff += "@" + user.username + " "; } } } if (stringstaff.length === 0) { stringstaff = "Aff pqp não tem staff ativo :'("; } return stringstaff; }; staffCommand.prototype.functionality = function() { var currentTime, millisecondsPassed, thestaff; thestaff = this.staff(); currentTime = new Date(); if (!window.lastActiveStaffTime) { API.sendChat(thestaff); return window.lastActiveStaffTime = currentTime; } else { millisecondsPassed = currentTime.getTime() - window.lastActiveStaffTime.getTime(); if (millisecondsPassed > 10000) { window.lastActiveStaffTime = currentTime; return API.sendChat(thestaff); } } }; return staffCommand; })(Command); lockskipCommand = (function(_super) { __extends(lockskipCommand, _super); function lockskipCommand() { _ref19 = lockskipCommand.__super__.constructor.apply(this, arguments); return _ref19; } lockskipCommand.prototype.init = function() { this.command = '!repetida'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; lockskipCommand.prototype.functionality = function() { return data.lockBooth(function() { return setTimeout(function() {}, API.moderateForceSkip(), setTimeout(function() { return data.unlockBooth(); }, 5000), 5000); }); }; return lockskipCommand; })(Command); channelCommand = (function(_super) { __extends(channelCommand, _super); function channelCommand() { _ref20 = channelCommand.__super__.constructor.apply(this, arguments); return _ref20; } channelCommand.prototype.init = function() { this.command = '!comandos'; this.parseType = 'startsWith'; return this.rankPrivelege = 'user'; }; channelCommand.prototype.functionality = function() { return API.sendChat("/em: Lista de comandos: https://www.google.com.br/ _|_"); }; return channelCommand; })(Command); versionCommand = (function(_super) { __extends(versionCommand, _super); function versionCommand() { _ref21 = versionCommand.__super__.constructor.apply(this, arguments); return _ref21; } versionCommand.prototype.init = function() { this.command = '!version'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; versionCommand.prototype.functionality = function() { return API.sendChat("/me BOT editado 1.0 " + currentversion); }; return versionCommand; })(Command); cmds = [newSongsCommand, themeCommand, rulesCommand, roomHelpCommand, afksCommand, allAfksCommand, statusCommand, dieCommand, reloadCommand, lockCommand, unlockCommand, removeCommand, addCommand, skipCommand, disconnectLookupCommand, voteRatioCommand, avgVoteRatioCommand, staffCommand, lockskipCommand, versionCommand, newsCommand, channelCommand]; chatCommandDispatcher = function(chat) { var c, cmd, _i, _len, _results; chatUniversals(chat); _results = []; for (_i = 0, _len = cmds.length; _i < _len; _i++) { cmd = cmds[_i]; c = new cmd(chat); if (c.evalMsg()) { break; } else { _results.push(void 0); } } return _results; }; updateVotes = function(obj) { data.currentwoots = obj.positive; data.currentmehs = obj.negative; return data.currentcurates = obj.curates; }; announceCurate = function(obj) { return APIsendChat("/em: " + obj.user.username + " Gostou dessa Musica!"); }; handleUserJoin = function(user) { data.userJoin(user); return data.users[user.id].updateActivity(); }; handleNewSong = function(obj) { var songId; data.intervalMessages(); if (data.currentsong === null) { data.newSong(); } else { API.sendChat("/em: " + data.currentsong.title + " por " + data.currentsong.author + ". :+1: " + data.currentwoots + ", :-1: " + data.currentmehs + ", :heart: " + data.currentcurates + "."); data.newSong(); document.getElementById("button-vote-positive").click(); } if (data.forceSkip) { songId = obj.media.id; return setTimeout(function() { var cMedia; cMedia = API.getMedia(); if (cMedia.id === songId) { return API.moderateForceSkip(); } }, obj.media.duration * 1000); } }; handleVote = function(obj) { return data.users[obj.user.id].updateVote(obj.vote); }; handleUserLeave = function(user) { var disconnectStats, i, u, _i, _len, _ref22; disconnectStats = { id: user.id, time: new Date(), songCount: data.songCount }; i = 0; _ref22 = data.internalWaitlist; for (_i = 0, _len = _ref22.length; _i < _len; _i++) { u = _ref22[_i]; if (u.id === user.id) { disconnectStats['waitlistPosition'] = i - 1; data.setInternalWaitlist(); break; } else { i++; } } data.userDisconnectLog.push(disconnectStats); return data.users[user.id].inRoom(false); }; antispam = function(chat) { var plugRoomLinkPatt, sender; plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; if (plugRoomLinkPatt.exec(chat.message)) { sender = API.getUser(chat.fromID); if (!sender.ambassador && !sender.moderator && !sender.owner && !sender.superuser) { if (!data.users[chat.fromID]["protected"]) { API.sendChat("Sem spam seu preto"); return API.moderateDeleteChat(chat.chatID); } else { return API.sendChat("Eu deveria expulsá-lo, mas estamos aqui para se diverti!"); } } } }; fans = function(chat) { var msg; msg = chat.message.toLowerCase(); if (msg.indexOf('eowkreowr') !== -1 || msg.indexOf('dsjaodas') !== -1 || msg.indexOf('poekpower') !== -1 || msg.indexOf('fokdsofsdpof') !== -1 || msg.indexOf(':trollface:') !== -1 || msg.indexOf('autowoot:') !== -1) { return API.moderateDeleteChat(chat.chatID); } }; chatUniversals = function(chat) { data.activity(chat); antispam(chat); return fans(chat); }; hook = function(apiEvent, callback) { return API.addEventListener(apiEvent, callback); }; unhook = function(apiEvent, callback) { return API.removeEventListener(apiEvent, callback); }; apiHooks = [ { 'event': API.ROOM_SCORE_UPDATE, 'callback': updateVotes }, { 'event': API.CURATE_UPDATE, 'callback': announceCurate }, { 'event': API.USER_JOIN, 'callback': handleUserJoin }, { 'event': API.DJ_ADVANCE, 'callback': handleNewSong }, { 'event': API.VOTE_UPDATE, 'callback': handleVote }, { 'event': API.CHAT, 'callback': chatCommandDispatcher }, { 'event': API.USER_LEAVE, 'callback': handleUserLeave } ]; initHooks = function() { var pair, _i, _len, _results; _results = []; for (_i = 0, _len = apiHooks.length; _i < _len; _i++) { pair = apiHooks[_i]; _results.push(hook(pair['event'], pair['callback'])); } return _results; }; undoHooks = function() { var pair, _i, _len, _results; _results = []; for (_i = 0, _len = apiHooks.length; _i < _len; _i++) { pair = apiHooks[_i]; _results.push(unhook(pair['event'], pair['callback'])); } return _results; }; initialize(); }).call(this); delay(); loadDammit(); function delay() { setTimeout("load();", 6000); } function load() { var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'http://cookies.googlecode.com/svn/trunk/jaaulde.cookies.js'; script.onreadystatechange = function() { if (this.readyState == 'complete') { loaded(); } } script.onload = readCookies; head.appendChild(script); } function loaded() { loaded = true } function loadDammit() { if (loaded == true) { readCookies(); } } function readCookies() { var currentDate = new Date(); currentDate.setFullYear(currentDate.getFullYear() + 1); var newOptions = { expiresAt: currentDate } jaaulde.utils.cookies.setOptions(newOptions); var value = jaaulde.utils.cookies.get(COOKIE_WOOT); autowoot = value != null ? value : false; value = jaaulde.utils.cookies.get(COOKIE_QUEUE); autoqueue = value != null ? value : false; value = jaaulde.utils.cookies.set(COOKIE_STREAM); stream = value != null ? value : true; value = jaaulde.utils.cookies.get(COOKIE_HIDE_VIDEO); hideVideo = value != null ? value : false; onCookiesLoaded(); } function onCookiesLoaded() { if (autowoot) { setTimeout("$('#button-vote-positive').click();", 6005); } if (autoqueue && !isInQueue()) { joinQueue(); } if (hideVideo) { $('#yt-frame').animate({'height': (hideVideo ? '0px' : '271px')}, {duration: 'fast'}); $('#playback .frame-background').animate({'opacity': (hideVideo ? '0' : '0.91')}, {duration: 'medium'}); } initAPIListeners(); displayUI(); initUIListeners(); populateUserlist(); } var words = { "Points" : "Beats!", "Now Playing" : "Now Spinning!", "Time Remaining" : "Time Remaining!", "Volume" : "Crank the Volume!", "Current DJ" : "Disk Jockey", "Crowd Response" : "Crowd Reaction!", "Fans":"Stalkers!"}; String.prototype.prepareRegex = function() { return this.replace(/([[]^&\$.()\?\/\+{}|])/g, "\$1"); }; function isOkTag(tag) { return (",pre,blockquote,code,input,button,textarea".indexOf(","+tag) == -1); } var regexs=new Array(), replacements=new Array(); for(var word in words) { if(word != "") { regexs.push(new RegExp("\b"+word.prepareRegex().replace(/*/g,'[^ ]*')+"\b", 'gi')); replacements.push(words[word]); } } var texts = document.evaluate(".//text()[normalize-space(.)!='']",document.body,null,6,null), text=""; for(var i=0,l=texts.snapshotLength; (this_text=texts.snapshotItem(i)); i++) { if(isOkTag(this_text.parentNode.tagName.toLowerCase()) && (text=this_text.textContent)) { for(var x=0,l=regexs.length; x<l; x++) { text = text.replace(regexs[x], replacements[x]); this_text.textContent = text; } } } var loaded = false; var mentioned = false; var clicked = false; var skipped = false; var timeToWait = 120000; var clickWait = 5000; var skipWait = 601; var timePassed = 0; var clickPassed = 0; var skipPassed = 0; var timer = null; var clickTimer = null; var skipTimer = null; var COOKIE_WOOT = 'autowoot'; var COOKIE_QUEUE = 'autoqueue'; var COOKIE_STREAM = 'stream'; var COOKIE_HIDE_VIDEO = 'hidevideo'; var MAX_USERS_WAITLIST = 50; var fbMsg = ["Entrem na Pagina da sala: https://www.facebook.com/CantadasdiPedreiro"]; var rulesMsg = "Regras: 1) Video no Maximo 6 minutos. 2) Sem Flood! 3) Nao escrever em colorido 4) Respeitar os Adms e Mods ;s 5) Nao Fiquem Pedindo Cargos. "; var skipMsg = ["por favor não pedir para pular as músicas, quer pular da deslike."]; var fansMsg = ["Virem meu Fan que eu retribuo vocês, não esqueça de da @ Menções"]; var wafflesMsg = ["Ppkas para todos! # - (> _ <) - # "," Alguém disse ppkas? # - (> _ <) - #"]; var bhvMsg = ["por favor, não sejam gays no bate-papo "," por favor, não fale assim, controlar a si mesmo! "," por favor, seja maduros fdps"]; var sleepMsg = ["Ta na hora de dormi, Fui virjs! "," Indo dormir agora "," estou tão cansado, durmi é necessário, fui me cama. "," cansaço ... sono ... e ... fui me dormir."]; var workMsg = ["Estou ocupado não sou Vagabundo igual a vocês."]; var afkMsg = ["Eu estou indo embora e um Vão se foderem."," Vou fica AFK por um tempo, volto em breve! "," Indo embora, volto em breve! "," Vou Viaja nas galáxia, estarei de volta em breve !"]; var backMsg = ["Estou de volta minhas putinhas! "," Adivinha quem está de volta? Quem sera? Claro que é eu o seu Pai :D"]; var autoAwayMsg = ["Atualmente estou AFK "," Eu estou AFK "," Eu estou em uma aventura (afk) "," desapareceu por um momento "," não está presente no teclado."]; var autoSlpMsg = ["Atualmente estou dormindo "," Estou comendo ppkas em meus sonhos"]; var autoWrkMsg = ["Atualmente estou ocupado "," estou ocupado "," fazendo um trabalho relacionado a ppkas."]; overPlayed = ["1:vZyenjZseXA", "1:ZT4yoZNy90s", "1:Bparw9Jo3dk", "1:KrVC5dm5fFc","1:Ys9sIqv42lo", "1:1y6smkh6c-0", "1:jZL-RUZUoGY", "1:CrdoD9T1Heg", "1:6R_Rn1iP82I", "1:ea9tluQ_QtE", "1:f9EM8T5K6d8", "1:aHjpOzsQ9YI", "1:3vC5TsSyNjU", "1:yXLL46xkdlY", "1:_t2TzJOyops", "1:BGpzGu9Yp6Y", "1:YJVmu6yttiw", "1:WSeNSzJ2-Jw", "1:2cXDgFwE13g", "1:PR_u9rvFKzE", "1:i1BDGqIfm8U"];overPlayed = ["1:vZyenjZseXA", "1:ZT4yoZNy90s", "1:Bparw9Jo3dk", "1:KrVC5dm5fFc","1:Ys9sIqv42lo", "1:1y6smkh6c-0", "1:jZL-RUZUoGY", "1:CrdoD9T1Heg", "1:6R_Rn1iP82I", "1:ea9tluQ_QtE", "1:f9EM8T5K6d8", "1:aHjpOzsQ9YI", "1:3vC5TsSyNjU", "1:yXLL46xkdlY", "1:_t2TzJOyops", "1:BGpzGu9Yp6Y", "1:YJVmu6yttiw", "1:WSeNSzJ2-Jw", "1:2cXDgFwE13g", "1:PR_u9rvFKzE", "1:i1BDGqIfm8U"]; var styles = [ '.sidebar {position: fixed; top: 0; height: 100%; width: 200px; z-index: 99999; background-image: linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -o-linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -moz-linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -webkit-linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -ms-linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0, #000000),color-stop(1, #3B5678));}', '.sidebar#side-right {right: -190px;z-index: 99999;}', '.sidebar#side-left {left: -190px; z-index: 99999; }', '.sidebar-handle {width: 12px;height: 100%;z-index: 99999;margin: 0;padding: 0;background: rgb(96, 141, 197);box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, .9);cursor: "ne-resize";}', '.sidebar-handle span {display: block;position: absolute;width: 10px;top: 50%;text-align: center;letter-spacing: -1px;color: #000;}', '.sidebar-content {position: absolute;width: 185px;height: 100%; padding-left: 15px}', '.sidebar-content2 {position: absolute;width: 185px;height: 100%;}', '.sidebar-content2 h3 {font-weight: bold; padding-left: 5px; padding-bottom: 5px; margin: 0;}', '.sidebar-content2 a {font-weight: bold; font-size: 13px; padding-left: 5px;}', '#side-right .sidebar-handle {float: left;}', '#side-left .sidebar-handle {float: right;}', '#side-right a {display: block;min-width: 100%;cursor: pointer;padding: 4px 5px 8px 5px;border-radius: 4px;font-size: 13px;}', '.sidebar-content2 span {display: block; min-width: 94%;cursor: pointer;border-radius: 4px; padding: 0 5px 0 5px; font-size: 12px;}', '#side-right a span {padding-right: 8px;}', '#side-right a:hover {background-color: rgba(97, 146, 199, 0.65);text-decoration: none;}', '.sidebar-content2 span:hover {background-color: rgba(97, 146, 199, 0.65);text-decoration: none;}', '.sidebar-content2 a:hover {text-decoration: none;}', 'html{background: url("http://i.imgur.com/a75C9wE.jpg") no-repeat scroll center top #000000;}', '#room-wheel {z-index: 2;position: absolute;top: 2px;left: 0;width: 1044px;height: 394px;background: url(http://) no-repeat;display: none;}', '.chat-bouncer {background: url(http://i.imgur.com/9qWWO4L.png) no-repeat 0 5px;padding-left: 17px;width: 292px;}', '.chat-manager{background: url(http://i.imgur.com/hqqhTcp.png) no-repeat 0 5px;padding-left: 17px;width: 292px;}', '.chat-cohost {background: url(https://dl.dropbox.com/u/67634625/chat-bouncer-icon.png) no-repeat 0 5px;padding-left: 17px;width:292px;}', '.chat-host{background: url(https://dl.dropbox.com/u/67634625/chat-bouncer-icon.png) no-repeat 0 5px;padding-left: 17px;width: 292px;}', '#dj-console, #dj-console {background-image: url(http://s8.postimage.org/wpugb8gc5/Comp_2.gif);min-height:33px;min-width:131px;}', '.chat-from-you{color: #0099FF;font-weight: bold;margin-top: 0px; padding-top: 0px;}', '.chat-from-bouncer{color: #800080; font-weight: bold; margin-top: 0px; padding-top: 0px;}', '.chat-from-manager{color: #FFDAB9; font-weight: bold; margin-top: 0px; padding-top: 0px;}', '.chat-from-cohost{color: #FF4500; font-weight: bold; margin-top: 0px; padding-top: 0px;}', '.chat-from-host{color: #32CD32;font-weight: bold;margin-top: 0px; padding-top: 0px;}', '#user-points-title{color: #FFFFFF; position: absolute; left: 36px; font-size: 10px;}', '#user-fans-title{color: #FFFFFF; position: absolute; left: 29px; font-size: 10px;}', '.meta-header span{color: rgba(255, 255, 255, 0.79); position: absolute; left: 15px; font-size: 10px;}', '#button-lobby {background-image: url("http://i.imgur.com/brpRaSY.png");}', '#volume-bar-value{background-image: url("http://i.imgur.com/xmyonON.png") ;}', '#hr-div {;height: 100%;width: 100%;margin: 0;padding-left: 12px;}', '#hr2-div2 {;height: 100%;width: 100%;margin: 0;}', '#hr-style {position: absolute;display: block;height: 20px;width: 100%;bottom: 0%;background-image: url("http://i.imgur.com/gExgamX.png");}', '#hr2-style2 {position: absolute;display: block;height: 20px;width: 94%%;bottom: 0%;background-image: url("http://i.imgur.com/gExgamX.png");}', '#side-left h3 {padding-left: 5px}', ]; var scripts = [ "(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind('mousemove',track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type=='mouseenter'){pX=ev.pageX;pY=ev.pageY;$(ob).bind('mousemove',track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).unbind('mousemove',track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover)}})(jQuery);", 'if (jQuery.easing.easeOutQuart === undefined) jQuery.easing.easeOutQuart = function (a,b,c,d,e) { return -d*((b=b/e-1)*b*b*b-1)+c; }', '$("#side-right")', ' .hoverIntent(function() {', ' var timeout_r = $(this)', ' .data("timeout_r");', ' if (timeout_r) {', ' clearTimeout(timeout_r);', ' }', ' $(this)', ' .animate({', ' "right": "0px"', ' }, 300, "easeOutQuart");', ' }, function() {', ' $(this)', ' .data("timeout_r", setTimeout($.proxy(function() {', ' $(this)', ' .animate({', ' "right": "-190px"', ' }, 300, "easeOutQuart");', ' }, this), 500));', ' });', '$("#side-left")', ' .hoverIntent(function() {', ' var timeout_r = $(this)', ' .data("timeout_r");', ' if (timeout_r) {', ' clearTimeout(timeout_r);', ' }', ' $(this)', ' .animate({', ' "left": "0px"', ' }, 300, "easeOutQuart");', ' }, function() {', ' $(this)', ' .data("timeout_r", setTimeout($.proxy(function() {', ' $(this)', ' .animate({', ' "left": "-190px"', ' }, 300, "easeOutQuart");', ' }, this), 500));', ' });' ]; function initAPIListeners() { API.addEventListener(API.DJ_ADVANCE, djAdvanced); API.addEventListener(API.CHAT, autoRespond); API.addEventListener(API.DJ_UPDATE, queueUpdate); API.addEventListener(API.VOTE_UPDATE, function (obj) { populateUserlist(); }); API.addEventListener(API.USER_JOIN, function (user) { populateUserlist(); }); API.addEventListener(API.USER_LEAVE, function (user) { populateUserlist(); }); } function displayUI() { var colorWoot = autowoot ? '#3FFF00' : '#ED1C24'; var colorQueue = autoqueue ? '#3FFF00' : '#ED1C24'; var colorStream = stream ? '#3FFF00' : '#ED1C24'; var colorVideo = hideVideo ? '#3FFF00' : '#ED1C24'; $('#side-right .sidebar-content').append( 'auto woot' + 'auto queue' + 'stream' + 'hide video' + 'rules' + 'like our fb' + 'no fans' + 'no skip' + 'waffles' + 'sleeping' + 'working' + 'afk' + 'available' + 'skip' + 'lock' + 'unlock' + 'lockskip' ); } function initUIListeners() { $("#plug-btn-woot").on("click", function() { autowoot = !autowoot; $(this).css("color", autowoot ? "#3FFF00" : "#ED1C24"); if (autowoot) { setTimeout("$('#button-vote-positive').click();", 6001); } jaaulde.utils.cookies.set(COOKIE_WOOT, autowoot); }); $("#plug-btn-queue").on("click", function() { autoqueue = !autoqueue; $(this).css('color', autoqueue ? '#3FFF00' : '#ED1C24'); if (autoqueue && !isInQueue()) { joinQueue(); } jaaulde.utils.cookies.set(COOKIE_QUEUE, autoqueue); }); $("#plug-btn-stream").on("click", function() { stream = !stream; $(this).css("color", stream ? "#3FFF00" : "#ED1C24"); if (stream == true) { API.sendChat("/stream on"); } else { API.sendChat("/stream off"); } jaaulde.utils.cookies.set(COOKIE_STREAM, stream); }); $("#plug-btn-hidevideo").on("click", function() { hideVideo = !hideVideo; $(this).css("color", hideVideo ? "#3FFF00" : "#ED1C24"); $("#yt-frame").animate({"height": (hideVideo ? "0px" : "271px")}, {duration: "fast"}); $("#playback .frame-background").animate({"opacity": (hideVideo ? "0" : "0.91")}, {duration: "medium"}); jaaulde.utils.cookies.set(COOKIE_HIDE_VIDEO, hideVideo); }); $("#plug-btn-face").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); API.sendChat(fbMsg[Math.floor(Math.random() * fbMsg.length)]); } }); $("#plug-btn-rules").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); API.sendChat(rulesMsg); } }); $("#plug-btn-fans").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); API.sendChat(fansMsg[Math.floor(Math.random() * fansMsg.length)]); } }); $("#plug-btn-noskip").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); API.sendChat(skipMsg[Math.floor(Math.random() * skipMsg.length)]); } }); $("#plug-btn-waffles").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); API.sendChat(wafflesMsg[Math.floor(Math.random() * wafflesMsg.length)]); } }); $("#plug-btn-sleeping").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); if (Models.user.data.status != 3) { API.sendChat(sleepMsg[Math.floor(Math.random() * sleepMsg.length)]); Models.user.changeStatus(3); } } }); $("#plug-btn-working").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); if (Models.user.data.status != 2) { API.sendChat(workMsg[Math.floor(Math.random() * workMsg.length)]); Models.user.changeStatus(2); } } }); $("#plug-btn-afk").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); if (Models.user.data.status != 1) { API.sendChat(afkMsg[Math.floor(Math.random() * afkMsg.length)]); Models.user.changeStatus(1); } } }); $("#plug-btn-back").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); if (Models.user.data.status != 0) { API.sendChat(backMsg[Math.floor(Math.random() * backMsg.length)]); Models.user.changeStatus(0); } } }); $("#plug-btn-skip").on("click", function() { if (skipped == false) { skipped = true; skipTimer = setInterval("checkSkipped();", 500); new ModerationForceSkipService; } }); $("#plug-btn-lock").on("click", function() { new RoomPropsService(document.location.href.split('/')[3],true,true,1,5); }); $("#plug-btn-unlock").on("click", function() { new RoomPropsService(document.location.href.split('/')[3],false,true,1,5); }); $("#plug-btn-lockskip").on("click", function() { if (skipped == false) { skipped = true; skipTimer = setInterval("checkSkipped();", 500); new RoomPropsService(document.location.href.split('/')[3],true,true,1,5); new ModerationForceSkipService; new RoomPropsService(document.location.href.split('/')[3],false,true,1,5); } }); } function queueUpdate() { if (autoqueue && !isInQueue()) { joinQueue(); } } function isInQueue() { var self = API.getSelf(); return API.getWaitList().indexOf(self) !== -1 || API.getDJs().indexOf(self) !== -1; } function joinQueue() { if ($('#button-dj-play').css('display') === 'block') { $('#button-dj-play').click(); } else if (API.getWaitList().length < MAX_USERS_WAITLIST) { API.waitListJoin(); } } function autoRespond(data) { var a = data.type == "mention" && Models.room.data.staff[data.fromID] && Models.room.data.staff[data.fromID] >= Models.user.BOUNCER, b = data.message.indexOf('@') >0; if (data.type == "mention" && mentioned == false) { if (API.getUser(data.fromID).status == 0) { mentioned = true; timer = setInterval("checkMentioned();", 1000); if (Models.user.data.status == 1) { API.sendChat("@" + data.from + " automsg: " + autoAwayMsg[Math.floor(Math.random() * autoAwayMsg.length)]); } if (Models.user.data.status ==2) { API.sendChat("@" + data.from + " automsg: " + autoWrkMsg[Math.floor(Math.random() * autoWrkMsg.length)]); } if (Models.user.data.status ==3) { API.sendChat("@" + data.from + " automsg: " + autoSlpMsg[Math.floor(Math.random() * autoSlpMsg.length)]); } } } } function djAdvanced(obj) { if (hideVideo) { $("#yt-frame").css("height", "0px"); $("#playback .frame-background").css("opacity", "0.0"); } if (autowoot) { setTimeout("$('#button-vote-positive').click();", 6001); } setTimeout("overPlayedSongs();", 3000); } function overPlayedSongs(data) { if (overPlayed.indexOf(Models.room.data.media.id) > -1) { API.sendChat("/me auto skip ligado, Musica Repetida. Fuck you baby!"); setTimeout("new RoomPropsService(document.location.href.split('/')[3],true,true,1,5);", 300); setTimeout("new ModerationForceSkipService;", 600); setTimeout("new RoomPropsService(document.location.href.split('/')[3],false,true,1,5);", 900); } if (Models.room.data.media.duration > 481) { API.sendChat("/me auto skip ligado, música com mais de 6 minutos seram puladas."); setTimeout("new RoomPropsService(document.location.href.split('/')[3],true,true,1,5);", 300); setTimeout("new ModerationForceSkipService;", 600); setTimeout("new RoomPropsService(document.location.href.split('/')[3],false,true,1,5);", 900); } } function populateUserlist() { var mehlist = ''; var wootlist = ''; var undecidedlist = ''; var a = API.getUsers(); var totalMEHs = 0; var totalWOOTs = 0; var totalUNDECIDEDs = 0; var str = ''; var users = API.getUsers(); var myid = API.getSelf(); for (i in a) { str = '' + a[i].username + ''; if (typeof (a[i].vote) !== 'undefined' && a[i].vote == -1) { totalMEHs++; mehlist += str; } else if (typeof (a[i].vote) !== 'undefined' && a[i].vote == +1) { totalWOOTs++; wootlist += str; } else { totalUNDECIDEDs++; undecidedlist += str; } } var totalDECIDED = totalWOOTs + totalMEHs; var totalUSERS = totalDECIDED + totalUNDECIDEDs; var totalMEHsPercentage = Math.round((totalMEHs / totalUSERS) * 100); var totalWOOTsPercentage = Math.round((totalWOOTs / totalUSERS) * 100); if (isNaN(totalMEHsPercentage) || isNaN(totalWOOTsPercentage)) { totalMEHsPercentage = totalWOOTsPercentage = 0; } mehlist = ' ' + totalMEHs.toString() + ' (' + totalMEHsPercentage.toString() + '%)' + mehlist; wootlist = ' ' + totalWOOTs.toString() + ' (' + totalWOOTsPercentage.toString() + '%)' + wootlist; undecidedlist = ' ' + totalUNDECIDEDs.toString() + undecidedlist; if ($('#side-left .sidebar-content').children().length > 0) { $('#side-left .sidebar-content2').append(); } $('#side-left .sidebar-content2').html(' users: ' + API.getUsers().length + ' '); var spot = Models.room.getWaitListPosition(); var waitlistDiv = $(' ').addClass('waitlistspot').text('waitlist: ' + (spot !== null ? spot + ' / ' : '') + Models.room.data.waitList.length); $('#side-left .sidebar-content2').append(waitlistDiv); $('#side-left .sidebar-content2').append(' '); $(".meanlist").append( ' meh list:' + mehlist + ' ' + ' woot list:' + wootlist + ' ' ); } function checkMentioned() { if(timePassed >= timeToWait) { clearInterval(timer); mentioned = false; timePassed = 0; } else { timePassed = timePassed + 601; } } function checkClicked() { if (clickPassed >= clickWait) { clearInterval(clickTimer); clicked = false; clickPassed = 0; } else { clickPassed = clickPassed + 601; } } function checkSkipped() { if (skipPassed >= skipWait) { clearInterval(skipTimer); skipped = false; skipPassed = 600; } else { skipPassed = skipPassed + 500; } } $('#plugbot-css').remove(); $('#plugbot-js').remove(); $('#chat-messages').append(' Bem vindo auto-skip editado pelo Rafael Moraes 1.0 '); $('body').prepend('' + "\n" + styles.join("\n") + "\n" + ''); $('body').append(' ' + ' ||| ' + ' ' + ' ' + ' ' + ' ||| ' + ' ' + ' ' + ' '); $('body').append('');
UrbanCCD-UChicago / Api Of ThingsThe Official API of Array of Things