rolfwessels / google-meet-auto-start-extention Goto Github PK
View Code? Open in Web Editor NEWGoogle chrome extension to automatically join and close google meet/hangout sessions.
License: MIT License
Google chrome extension to automatically join and close google meet/hangout sessions.
License: MIT License
!function(e){function n(n){for(var o,c,r=n[0],l=n[1],a=n[2],h=0,d=[];h<r.length;h++)c=r[h],s[c]&&d.push(s[c][0]),s[c]=0;for(o in l)Object.prototype.hasOwnProperty.call(l,o)&&(e[o]=l[o]);for(u&&u(n);d.length;)d.shift()();return i.push.apply(i,a||[]),t()}function t(){for(var e,n=0;n<i.length;n++){for(var t=i[n],o=!0,r=1;r<t.length;r++){var l=t[r];0!==s[l]&&(o=!1)}o&&(i.splice(n--,1),e=c(c.s=t[0]))}return e}var o={},s={2:0},i=[];function c(n){if(o[n])return o[n].exports;var t=o[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,c),t.l=!0,t.exports}c.m=e,c.c=o,c.d=function(e,n,t){c.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,n){if(1&n&&(e=c(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(c.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)c.d(t,o,function(n){return e[n]}.bind(null,o));return t},c.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(n,"a",n),n},c.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},c.p="";var r=window.webpackJsonp=window.webpackJsonp||[],l=r.push.bind(r);r.push=n,r=r.slice();for(var a=0;a<r.length;a++)n(r[a]);var u=l;i.push([11,0]),t()}({11:function(e,n,t){"use strict";var o=this&&this.__awaiter||function(e,n,t,o){return new(t||(t=Promise))(function(s,i){function c(e){try{l(o.next(e))}catch(e){i(e)}}function r(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){e.done?s(e.value):new t(function(n){n(e.value)}).then(c,r)}l((o=o.apply(e,n||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0});const s=t(12),i=t(1),c=t(25),r=t(2),l=t(0);let a=new i.TabActions,u=null;var h=new l.Settings,d=null;function f(){return o(this,void 0,void 0,function*(){var e=yield h.get(new r.OptionSettings);d&&(console.log("Connected to slack..."),d.close(),d=null),e.slackToken?d=yield function(e){return o(this,void 0,void 0,function*(){var n=new s.SlackSession(atob(e.slackToken),e.slackChannel);a.onMeetingStarted=(e=>{const t=Meeting room ready: https://meet.google.com/${e}
;null!=u?(n.post(t,u),u=null):n.postToDefaultChannel(t)}),n.onMessage(e=>{if(e.isSpeakingToMe||e.isOnMyChannel){let n=new c.MessageParse;n.onStart=(()=>{u=e.channel,a.startMeeting(e)}),n.onOpen=(n=>a.openMeeting(n,e)),n.onClose=(()=>{u=null,a.closeMeetings(e)}),n.parse(e.text,e,!e.isSpeakingToMe&&e.isOnMyChannel)}});try{yield n.connect(),console.log("Connected to slack...")}catch(e){console.error(e)}return n})}(e):console.error("Add slack token to settings to connect to slack.")})}a.onSettingsUpdated=(()=>f()),a.listenToContentScript(),f()},12:function(e,n,t){"use strict";var o=this&&this.__awaiter||function(e,n,t,o){return new(t||(t=Promise))(function(s,i){function c(e){try{l(o.next(e))}catch(e){i(e)}}function r(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){e.done?s(e.value):new t(function(n){n(e.value)}).then(c,r)}l((o=o.apply(e,n||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0});const s=t(13);n.SlackSession=class{constructor(e,n){this._defaultToken={token:e},this._channel=n}connect(){return o(this,void 0,void 0,function*(){try{var e=yield s.rtm.connect(this._defaultToken);console.log("connection",e),this.ensureHasChannel(),this._self=e.self,this._webSocket=new WebSocket(e.url),this._webSocket.onmessage=(e=>{var n=JSON.parse(e.data);"message"==n.type&&null!=this._messageCallBack&&(console.log("Recieved",n),this._messageCallBack(new i(n,this)))}),this._webSocket.onclose=(()=>{console.log("Connection closed ... connecting again in 5s"),setTimeout(()=>{this.connect()},5e3)})}catch(e){return console.log("Connection failed ... connecting again in 5s"),setTimeout(()=>{this.connect()},5e3),!1}return e.ok})}close(){this._webSocket&&(this._webSocket.close(),this._webSocket=null)}onMessage(e){this._messageCallBack=e}lookupChannel(e){return o(this,void 0,void 0,function*(){var n=(yield s.channels.list(this._defaultToken)).channels.filter(n=>n.name==e)[0];return n?n.id:null})}postToDefaultChannel(e){return o(this,void 0,void 0,function*(){return yield this.ensureHasChannel(),yield this.post(e,this._channelId||this._channel)})}ensureHasChannel(){return o(this,void 0,void 0,function*(){return null==this._channelId&&(this._channelId=yield this.lookupChannel(this._channel)),this._channelId||this._channel})}post(e,n){return o(this,void 0,void 0,function*(){try{return(yield s.chat.postMessage(Object.assign({},this._defaultToken,{text:e,channel:n,as_user:!0}))).ok}catch(t){throw console.error(t,{text:e,channel:n}),t}})}};class i{constructor(e,n){this.text=e.text,this.channel=e.channel;let t=null!=e.bot_id||null!=e.subtype;this.isBot=t,this.isSpeakingToMe=!t&&(e.channel.startsWith("D")||-1!=this.text.indexOf(<@${n._self.id}>
)),this.isOnMyChannel=!t&&n._channelId==this.channel,this._session=n}reply(e){return o(this,void 0,void 0,function*(){return yield this._session.post(e,this.channel)})}}},25:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const o=t(10);n.MessageParse=class{parse(e,n,t=!1){if(this.checkAction(e,"start",this.onStart))this.onStart();else if(this.checkAction(e,"open",this.onOpen)){const t=o.getMeetingId(e);t?this.onOpen(t):n.reply("Please add the meeting room eg open xxx-xxxx-xxx
.")}else this.checkAction(e,"close",this.onClose)?this.onClose():t||n.reply("Sorry I can't undestand that command. Options are start
, open xxx-xxxx-xxx
, close
.")}constructor(){}checkAction(e,n,t){const o=e.replace(/<@[A-Z0-9]+>\s?/g,"").toLowerCase().trim();console.log("cleanText",JSON.stringify(o));const s=o.startsWith(n);return null==t?(s&&console.warn(Please add action for '${n}'.
),!1):s}}}});
This gigantic error appears on my extensions tab and I don't know how to fix it
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.