├── doc
└── img
│ └── apps.png
├── favicon-32x32.png
├── favicon-96x96.png
├── favicon-256x256.png
├── favicon-9c67d4dc.ico
├── .gitignore
├── src
├── about.html
└── menus.js
├── inject
└── preload.js
├── LICENSE
├── package.json
├── README.md
├── main.js
└── index.html
/doc/img/apps.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leftstick/teams-ubuntu/HEAD/doc/img/apps.png
--------------------------------------------------------------------------------
/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leftstick/teams-ubuntu/HEAD/favicon-32x32.png
--------------------------------------------------------------------------------
/favicon-96x96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leftstick/teams-ubuntu/HEAD/favicon-96x96.png
--------------------------------------------------------------------------------
/favicon-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leftstick/teams-ubuntu/HEAD/favicon-256x256.png
--------------------------------------------------------------------------------
/favicon-9c67d4dc.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leftstick/teams-ubuntu/HEAD/favicon-9c67d4dc.ico
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #npm
2 | node_modules/
3 | package-lock.json
4 |
5 | #osx
6 | .DS_Store
7 |
8 |
9 | dist/
--------------------------------------------------------------------------------
/src/about.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
27 |
28 |
29 |
30 |
31 |
32 | Microsoft Teams
33 | Version 1.1.8
34 |
35 | 2019-02-01 16:00
36 |
37 |
--------------------------------------------------------------------------------
/inject/preload.js:
--------------------------------------------------------------------------------
1 | let count = 0;
2 |
3 | window.addEventListener('DOMContentLoaded', function() {
4 | const {remote} = require('electron');
5 | waitForMaximize(remote.getCurrentWindow());
6 | }, false);
7 |
8 | function waitForMaximize(win) {
9 | const initialized = document.querySelector('.initialized.loadingscreendone');
10 | const isLoginPage = document.querySelector('#background_branding_container');
11 | if (initialized) {
12 | return win.maximize();
13 | }
14 | setTimeout(() => {
15 | if (!isLoginPage && count === 300) {
16 | count = 0;
17 | // win.webContents.session.clearStorageData(() => {
18 | win.webContents.session.clearCache(() => {
19 | win.reload();
20 | });
21 | // });
22 | return;
23 | }
24 | if (isLoginPage) {
25 | count = 0;
26 | }
27 | count++;
28 | waitForMaximize(win);
29 | }, 50);
30 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Howard.Zuo
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "teams-ubuntu",
3 | "version": "1.1.8",
4 | "description": "Microsoft teams for ubuntu platforms",
5 | "main": "main.js",
6 | "scripts": {
7 | "start": "electron .",
8 | "dist": "rm -rf dist && npm run 32-bit && npm run 64-bit",
9 | "32-bit": "electron-packager . 'Microsoft Teams' --platform=linux --arch=ia32 --out=./dist --app-version=1.1.8 --ignore=\"node_modules/\"",
10 | "64-bit": "electron-packager . 'Microsoft Teams' --platform=linux --arch=x64 --out=./dist --app-version=1.1.8 --ignore=\"node_modules/\"",
11 | "distMac": "electron-packager . 'Microsoft Teams' --platform=darwin --arch=x64 --out=./dist --app-version=1.1.8 --ignore=\"(dist/|node_modules/)\""
12 | },
13 | "repository": {
14 | "type": "git",
15 | "url": "git+https://github.com/leftstick/teams-ubuntu.git"
16 | },
17 | "keywords": [
18 | "electron",
19 | "teams"
20 | ],
21 | "author": "Howard.Zuo",
22 | "license": "MIT",
23 | "bugs": {
24 | "url": "https://github.com/leftstick/teams-ubuntu/issues"
25 | },
26 | "homepage": "https://github.com/leftstick/teams-ubuntu#readme",
27 | "devDependencies": {
28 | "electron": "^4.0.3",
29 | "electron-packager": "^13.0.1"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | teams-ubuntu
2 | ==================
3 | ![][david-url]
4 | ![][license-url]
5 |
6 | Microsoft teams for ubuntu platforms
7 |
8 | ## Background
9 |
10 | The thing force me to do this is, ubuntu platform was not supported by default, check below:
11 |
12 | 
13 |
14 | That's weird, but ok we don't mind. [electron](http://electron.atom.io/) helps.
15 |
16 | Now you can download the ubuntu version:
17 |
18 | [Microsoft-Teams-1.1.8-linux-64](https://github.com/leftstick/teams-ubuntu/releases/download/1.1.8/Microsoft-Teams-linux-x64.zip)
19 |
20 | [Microsoft-Teams-1.1.8-linux-32](https://github.com/leftstick/teams-ubuntu/releases/download/1.1.8/Microsoft-Teams-linux-ia32.zip)
21 |
22 | ## Want to contribute?
23 |
24 | First you need to clone this repo, for example:
25 |
26 | ```bash
27 | git clone https://github.com/leftstick/teams-ubuntu.git
28 | ```
29 |
30 | Then, install dependencies
31 |
32 | ```bash
33 | cd teams-ubuntu
34 | npm install
35 | ```
36 |
37 | Now, you are free to launch it:
38 |
39 | ```bash
40 | npm start
41 | ```
42 |
43 | ## LICENSE ##
44 |
45 | [MIT License](https://raw.githubusercontent.com/leftstick/teams-ubuntu/master/LICENSE)
46 |
47 |
48 | [david-url]: https://david-dm.org/leftstick/teams-ubuntu.png
49 | [license-url]: https://img.shields.io/github/license/leftstick/teams-ubuntu.svg
50 |
--------------------------------------------------------------------------------
/main.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | process.env.ELECTRON_HIDE_INTERNAL_MODULES = 'true';
3 |
4 | const electron = require('electron');
5 | const app = electron.app;
6 | const Menu = electron.Menu;
7 | const BrowserWindow = electron.BrowserWindow;
8 | const shell = electron.shell;
9 |
10 | let mainWindow = null;
11 |
12 | app.on('window-all-closed', function() {
13 | if (process.platform !== 'darwin') {
14 | app.quit();
15 | }
16 | });
17 |
18 | var startupOpts = {
19 | useContentSize: true,
20 | width: 800,
21 | height: 620,
22 | center: true,
23 | resizable: true,
24 | alwaysOnTop: false,
25 | fullscreen: false,
26 | skipTaskbar: false,
27 | kiosk: false,
28 | title: 'Microsoft Teams',
29 | icon: __dirname + '/favicon-256x256.png',
30 | show: true,
31 | frame: true,
32 | disableAutoHideCursor: false,
33 | autoHideMenuBar: false,
34 | titleBarStyle: 'default',
35 | webPreferences: {
36 | webSecurity: false,
37 | nodeIntegration: false,
38 | allowDisplayingInsecureContent: true,
39 | allowRunningInsecureContent: true,
40 | plugins: true,
41 | preload: __dirname + '/inject/preload.js'
42 | }
43 | };
44 |
45 | app.on('ready', function() {
46 |
47 | Menu.setApplicationMenu(Menu.buildFromTemplate(require('./src/menus')));
48 |
49 | mainWindow = new BrowserWindow(startupOpts);
50 |
51 | mainWindow.loadURL('https://teams.microsoft.com', {
52 | userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134'
53 | });
54 |
55 | mainWindow.on('closed', function() {
56 | mainWindow = null;
57 | });
58 |
59 | mainWindow.webContents.on('new-window', function(event, url) {
60 | event.preventDefault();
61 | shell.openExternal(url);
62 | });
63 |
64 | mainWindow.show();
65 | });
--------------------------------------------------------------------------------
/src/menus.js:
--------------------------------------------------------------------------------
1 | const {app, dialog, nativeImage, BrowserWindow} = require('electron');
2 | const {resolve} = require('path');
3 |
4 | module.exports = [
5 | {
6 | label: 'Application',
7 | submenu: [
8 | {
9 | label: 'About Microsoft Teams',
10 | click: function() {
11 | new BrowserWindow({
12 | width: 285,
13 | height: 230,
14 | center: true,
15 | resizable: false,
16 | minimizable: false,
17 | maximizable: false,
18 | show: true,
19 | title: ''
20 | })
21 | .loadURL('file://' + resolve(__dirname, 'about.html'));
22 | }
23 | },
24 | {
25 | type: 'separator'
26 | },
27 | {
28 | label: 'Quit Microsoft Teams',
29 | accelerator: 'CmdOrCtrl+Q',
30 | click: function() {
31 | app.quit();
32 | }
33 | }
34 | ]
35 | },
36 | {
37 | label: 'Edit',
38 | submenu: [
39 | {
40 | label: 'Undo',
41 | accelerator: 'CmdOrCtrl+Z',
42 | selector: 'undo:',
43 | role: 'undo'
44 | },
45 | {
46 | label: 'Redo',
47 | accelerator: 'Shift+CmdOrCtrl+Z',
48 | selector: 'redo:',
49 | role: 'redo'
50 | },
51 | {
52 | type: 'separator'
53 | },
54 | {
55 | label: 'Cut',
56 | accelerator: 'CmdOrCtrl+X',
57 | selector: 'cut:',
58 | role: 'cut'
59 | },
60 | {
61 | label: 'Copy',
62 | accelerator: 'CmdOrCtrl+C',
63 | selector: 'copy:',
64 | role: 'copy'
65 | },
66 | {
67 | label: 'Paste',
68 | accelerator: 'CmdOrCtrl+V',
69 | selector: 'paste:',
70 | role: 'paste'
71 | },
72 | {
73 | label: 'Select All',
74 | accelerator: 'CmdOrCtrl+A',
75 | selector: 'selectAll:',
76 | role: 'selectall'
77 | }
78 | ]
79 | },
80 | {
81 | label: 'View',
82 | submenu: [
83 | {
84 | label: 'Reload',
85 | accelerator: 'CmdOrCtrl+R',
86 | click: function(item, focusedWindow) {
87 | if (focusedWindow) {
88 | focusedWindow.reload();
89 | }
90 | }
91 | },
92 | {
93 | label: 'Toggle Developer Tools',
94 | accelerator: (function() {
95 | if (process.platform === 'darwin') {
96 | return 'Alt+Command+I';
97 | }
98 | return 'Ctrl+Shift+I';
99 | }()),
100 | click: function(item, focusedWindow) {
101 | if (focusedWindow) {
102 | focusedWindow.toggleDevTools();
103 | }
104 | }
105 | }
106 | ]
107 | }
108 | ];
109 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
10 |
11 |
73 |
74 |
79 | Microsoft Teams - initializing...
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
123 |
124 |
125 |
126 |
221 |
222 |
232 |
235 |
236 |
239 |
240 |
247 |
250 |
251 |
253 |
254 |
258 |
259 |
260 |
262 |
263 |
266 |
267 |
270 |
271 |
272 |
273 |
274 |
275 |
280 |
281 |
284 |
285 |
286 |
287 |
288 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
--------------------------------------------------------------------------------