Compare commits
41 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92c24fe5c3 | ||
|
|
5303cf6906 | ||
|
|
579f2014e4 | ||
|
|
f42c6c80b2 | ||
|
|
72ddfe7b62 | ||
|
|
5a70499ad0 | ||
|
|
2a0b175c78 | ||
|
|
5f69e53123 | ||
|
|
1ef0457246 | ||
|
|
38f04012b5 | ||
|
|
b708b9e0e2 | ||
|
|
5c1421f3bb | ||
|
|
2997e82cad | ||
|
|
924183dc84 | ||
|
|
71557c205c | ||
|
|
401ba1c879 | ||
|
|
e788a933d5 | ||
|
|
803c9bde90 | ||
|
|
98f0a57307 | ||
|
|
cf8ee83edc | ||
|
|
406b7041f2 | ||
|
|
8b3103c318 | ||
|
|
b0746d48ec | ||
|
|
ac4d21cdf9 | ||
|
|
2f82a165f8 | ||
|
|
122c78cb92 | ||
|
|
bec002d50a | ||
|
|
c417702de6 | ||
|
|
cecd797ee2 | ||
|
|
9da7d35d0e | ||
|
|
7826a40187 | ||
|
|
5ceccb3510 | ||
|
|
97ac91b64a | ||
|
|
10da125fed | ||
|
|
b3d857f095 | ||
|
|
3deb15080f | ||
|
|
8a2e48c3c0 | ||
|
|
8b72100ae4 | ||
|
|
fe1e564dff | ||
|
|
f4b9f6d421 | ||
|
|
4c2effbbd4 |
@@ -1,5 +0,0 @@
|
||||
yarn.lock
|
||||
node_modules/
|
||||
docs/
|
||||
.github/
|
||||
README.md
|
||||
15
.eslintrc.js
@@ -1,15 +0,0 @@
|
||||
module.exports = {
|
||||
"env": {
|
||||
"commonjs": true,
|
||||
"es2021": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"overrides": [
|
||||
],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": "latest"
|
||||
},
|
||||
"rules": {
|
||||
}
|
||||
}
|
||||
2
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
github: agam778
|
||||
ko_fi: agam778
|
||||
2
.github/workflows/build.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v1
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Node.js, NPM and Yarn
|
||||
uses: actions/setup-node@v3
|
||||
|
||||
49
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
name: CI
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-latest, windows-latest]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Node.js, NPM and Yarn
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: latest
|
||||
|
||||
- name: Build with Electron Builder
|
||||
run: |
|
||||
export GH_TOKEN=${{ secrets.GITHUB_TOKEN }}
|
||||
yarn
|
||||
if [ "$RUNNER_OS" == "Linux" ]; then
|
||||
yarn dist --publish never
|
||||
elif [ "$RUNNER_OS" == "Windows" ]; then
|
||||
yarn dist --publish never
|
||||
elif [ "$RUNNER_OS" == "macOS" ]; then
|
||||
yarn dist -m --x64 --arm64 --publish never
|
||||
else
|
||||
echo "$RUNNER_OS not supported"
|
||||
exit 1
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.os }}-dist
|
||||
path: |
|
||||
release/*.exe
|
||||
release/*.dmg
|
||||
release/*.deb
|
||||
release/*.snap
|
||||
release/*.tar.gz
|
||||
release/*.AppImage
|
||||
release/*.rpm
|
||||
50
.github/workflows/eslint.yml
vendored
@@ -1,50 +0,0 @@
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
# ESLint is a tool for identifying and reporting on patterns
|
||||
# found in ECMAScript/JavaScript code.
|
||||
# More details at https://github.com/eslint/eslint
|
||||
# and https://eslint.org
|
||||
|
||||
name: ESLint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ "main" ]
|
||||
schedule:
|
||||
- cron: '16 11 * * 0'
|
||||
|
||||
jobs:
|
||||
eslint:
|
||||
name: Run eslint scanning
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
security-events: write
|
||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install ESLint
|
||||
run: |
|
||||
npm install eslint@8.10.0
|
||||
npm install @microsoft/eslint-formatter-sarif@2.1.7
|
||||
|
||||
- name: Run ESLint
|
||||
run: npx eslint .
|
||||
--config .eslintrc.js
|
||||
--ext .js,.jsx,.ts,.tsx
|
||||
--format @microsoft/eslint-formatter-sarif
|
||||
--output-file eslint-results.sarif
|
||||
continue-on-error: true
|
||||
|
||||
- name: Upload analysis results to GitHub
|
||||
uses: github/codeql-action/upload-sarif@v2
|
||||
with:
|
||||
sarif_file: eslint-results.sarif
|
||||
wait-for-processing: true
|
||||
@@ -1,3 +0,0 @@
|
||||
yarn.lock
|
||||
node_modules/
|
||||
README.md
|
||||
BIN
.yarn/cache/@cliqz-adblocker-content-npm-1.26.6-14464c4427-a24dded5d5.zip
vendored
Normal file
BIN
.yarn/cache/@cliqz-adblocker-electron-npm-1.26.6-0d9e80d931-a1312d92e9.zip
vendored
Normal file
BIN
.yarn/cache/@cliqz-adblocker-electron-preload-npm-1.26.6-1c59bb8e18-4fadea3544.zip
vendored
Normal file
BIN
.yarn/cache/@cliqz-adblocker-extended-selectors-npm-1.26.6-93a49554d0-b5f2cb61cf.zip
vendored
Normal file
BIN
.yarn/cache/@cliqz-adblocker-npm-1.26.6-55189e27c2-95a4732f1d.zip
vendored
Normal file
BIN
.yarn/cache/@eslint-community-eslint-utils-npm-4.3.0-4ed2f1d6c5-f487760a69.zip
vendored
Normal file
BIN
.yarn/cache/@eslint-community-regexpp-npm-4.4.1-44c7391499-db97d8d08e.zip
vendored
Normal file
BIN
.yarn/cache/@eslint-js-npm-8.42.0-820f8f50f7-750558843a.zip
vendored
Normal file
BIN
.yarn/cache/@humanwhocodes-config-array-npm-0.11.10-7b63df9e7f-1b1302e240.zip
vendored
Normal file
BIN
.yarn/cache/@remusao-guess-url-type-npm-1.2.1-31ad9dc138-37a5142c97.zip
vendored
Normal file
BIN
.yarn/cache/@remusao-small-npm-1.2.1-313b1c5a80-e9c6a6d117.zip
vendored
Normal file
BIN
.yarn/cache/@remusao-smaz-compress-npm-1.9.1-8fa01d9c00-e01875f4bb.zip
vendored
Normal file
BIN
.yarn/cache/@remusao-smaz-decompress-npm-1.9.1-d871d6acb1-6abc127dd3.zip
vendored
Normal file
BIN
.yarn/cache/@remusao-smaz-npm-1.9.1-4eb80bed3a-0a7607dacc.zip
vendored
Normal file
BIN
.yarn/cache/@remusao-trie-npm-1.4.1-d803036c35-0df106a649.zip
vendored
Normal file
BIN
.yarn/cache/@types-chrome-npm-0.0.228-92b415dee9-7878706b04.zip
vendored
Normal file
BIN
.yarn/cache/@types-filesystem-npm-0.0.32-f9e6035fd6-4b9079d200.zip
vendored
Normal file
BIN
.yarn/cache/@types-filewriter-npm-0.0.29-08151cd903-0c58aa875c.zip
vendored
Normal file
BIN
.yarn/cache/@types-firefox-webext-browser-npm-111.0.1-7006d76748-1730c2e303.zip
vendored
Normal file
BIN
.yarn/cache/@types-har-format-npm-1.2.11-fe724cabda-f36add1ac2.zip
vendored
Normal file
BIN
.yarn/cache/@types-node-npm-18.16.16-8a41330dc3-0efad726dd.zip
vendored
Normal file
BIN
.yarn/cache/@xhayper-discord-rpc-npm-1.0.17-a35e6bd739-6b7f4d2590.zip
vendored
Normal file
BIN
.yarn/cache/axios-npm-1.4.0-4d7ce8ca3e-7fb6a4313b.zip
vendored
Normal file
BIN
.yarn/cache/cross-fetch-npm-3.1.6-cdb982d446-704b3519ab.zip
vendored
Normal file
BIN
.yarn/cache/discord-api-types-npm-0.37.43-26a217da1d-716bafb6b2.zip
vendored
Normal file
BIN
.yarn/cache/electron-npm-25.1.0-440bced844-411af45997.zip
vendored
Normal file
BIN
.yarn/cache/eslint-npm-8.42.0-593c3ddde5-07105397b5.zip
vendored
Normal file
BIN
.yarn/cache/eslint-scope-npm-7.2.0-88784f5a38-64591a2d8b.zip
vendored
Normal file
BIN
.yarn/cache/eslint-visitor-keys-npm-3.4.1-a5d0a58208-f05121d868.zip
vendored
Normal file
BIN
.yarn/cache/espree-npm-9.5.2-5fc9506cda-6506289d6e.zip
vendored
Normal file
BIN
.yarn/cache/esquery-npm-1.5.0-d8f8a06879-aefb0d2596.zip
vendored
Normal file
BIN
.yarn/cache/graphemer-npm-1.4.0-0627732d35-bab8f0be9b.zip
vendored
Normal file
BIN
.yarn/cache/node-fetch-npm-2.6.11-160e4174c3-249d0666a9.zip
vendored
Normal file
BIN
.yarn/cache/tldts-core-npm-6.0.5-98ebdb282e-8f63ff15f0.zip
vendored
Normal file
BIN
.yarn/cache/tldts-experimental-npm-6.0.5-7e711a1465-4351a38459.zip
vendored
Normal file
BIN
.yarn/cache/ws-npm-7.5.7-6cc440864a-5c1f669a16.zip
vendored
BIN
.yarn/cache/ws-npm-8.13.0-26ffa3016a-53e991bbf9.zip
vendored
Normal file
873
.yarn/releases/yarn-3.4.1.cjs
vendored
874
.yarn/releases/yarn-3.6.0.cjs
vendored
Executable file
@@ -4,4 +4,4 @@ plugins:
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
|
||||
spec: "@yarnpkg/plugin-interactive-tools"
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.4.1.cjs
|
||||
yarnPath: .yarn/releases/yarn-3.6.0.cjs
|
||||
|
||||
17
README.md
@@ -1,4 +1,4 @@
|
||||
<p align="center"><img src="https://github.com/agam778/MS-365-Electron/blob/main/Intro_Image.png?raw=true" alt="Intro Image"></p>
|
||||
<p align="center"><img src="https://github.com/agam778/MS-365-Electron/blob/main/assets/banner.png?raw=true" alt="Intro Image"></p>
|
||||
<p align="center">Thanks a lot to <a href="https://t.me/NextWorksGFX">@NextWorksGFX</a> for this amazing banner!</p>
|
||||
<p align="center">Unofficial Microsoft 365 Web Desktop Wrapper made with Electron</p>
|
||||
|
||||
@@ -72,7 +72,6 @@ Supported Platforms
|
||||
|
||||
# List of Features
|
||||
|
||||
- Discord Rich Presence
|
||||
- Ability to use useragent strings of Windows, macOS or Linux
|
||||
- Switch between normal and enterprise/education/developer account in the same app
|
||||
- Back, Forward, Reload, and Home buttons
|
||||
@@ -92,8 +91,8 @@ For Installing this app on Windows:
|
||||
|
||||
<details>
|
||||
<summary>Click to expand</summary>
|
||||
<img src="https://github.com/agam778/MS-365-Electron/blob/main/Preview/windows_1.png?raw=true" alt="Windows Preview - 1">
|
||||
<img src="https://github.com/agam778/MS-365-Electron/blob/main/Preview/windows_2.png?raw=true" alt="Windows Preview - 2">
|
||||
<img src="https://github.com/agam778/MS-365-Electron/blob/main/assets/screenshots/windows_1.png?raw=true" alt="Windows Preview - 1">
|
||||
<img src="https://github.com/agam778/MS-365-Electron/blob/main/assets/screenshots/windows_2.png?raw=true" alt="Windows Preview - 2">
|
||||
</details>
|
||||
|
||||
# macOS
|
||||
@@ -162,18 +161,10 @@ For Installing in Red Hat/Fedora based distribution :-
|
||||
|
||||
## 📸 Ubuntu Preview
|
||||
|
||||
[Click Here](https://github.com/agam778/MS-365-Electron/blob/main/Preview/Ubuntu%20Preview.png?raw=true)
|
||||
[Click Here](https://github.com/agam778/MS-365-Electron/blob/main/assets/screenshots/ubuntu.png?raw=true)
|
||||
|
||||
# 💻 Developing Locally
|
||||
To build the app locally:<br>
|
||||
Run this script to automatically install `nodejs`, `yarn` and all the dependencies, and automatically start/build the app (it will show options) (Note: for Linux and macOS Only!):
|
||||
```bash
|
||||
git clone https://github.com/agam778/MS-365-Electron.git
|
||||
cd MS-365-Electron
|
||||
bash build.sh
|
||||
```
|
||||
<br>
|
||||
Or:<br>
|
||||
Run the following commands to clone the repository and install the dependencies
|
||||
|
||||
```bash
|
||||
|
||||
552
app/menu.js
Normal file
@@ -0,0 +1,552 @@
|
||||
const store = require("./store");
|
||||
const useragents = require("./useragents.json");
|
||||
const { app, dialog, BrowserWindow } = require("electron");
|
||||
const axios = require("axios");
|
||||
const { clearActivity, setActivity } = require("./rpc");
|
||||
const { shell } = require("electron");
|
||||
const { autoUpdater } = require("electron-updater");
|
||||
const { ElectronBlocker } = require("@cliqz/adblocker-electron");
|
||||
const fetch = require("cross-fetch");
|
||||
|
||||
function getValueOrDefault(key, defaultValue) {
|
||||
const value = store.get(key);
|
||||
if (value === undefined) {
|
||||
store.set(key, defaultValue);
|
||||
return defaultValue;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
async function checkForUpdates() {
|
||||
try {
|
||||
const res = await axios.get(
|
||||
"https://api.github.com/repos/agam778/MS-365-Electron/releases/latest"
|
||||
);
|
||||
const data = res.data;
|
||||
const currentVersion = "v" + app.getVersion();
|
||||
const latestVersion = data.tag_name;
|
||||
|
||||
if (currentVersion !== latestVersion) {
|
||||
if (process.platform === "win32" || process.platform === "darwin") {
|
||||
autoUpdater.checkForUpdatesAndNotify().then((result) => {
|
||||
if (result === null) {
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "No Update Available",
|
||||
message: `Current version: ${currentVersion}\nLatest version: ${latestVersion}\n\nYou are already using the latest version.`,
|
||||
buttons: ["OK"],
|
||||
});
|
||||
}
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
const updatedialog = dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "Update Available",
|
||||
message: `Current version: ${currentVersion}\nLatest version: ${latestVersion}\n\nPlease update to the latest version.`,
|
||||
buttons: ["Download", "Close"],
|
||||
});
|
||||
if (updatedialog === 0) {
|
||||
shell.openExternal(
|
||||
"https://github.com/agam778/MS-365-Electron/releases/latest"
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "No Update Available",
|
||||
message: `Your App's version: ${currentVersion}\nLatest version: ${latestVersion}\n\nYou are already using the latest version.`,
|
||||
buttons: ["OK"],
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error checking for updates:", error);
|
||||
}
|
||||
}
|
||||
|
||||
async function openExternalLink(url) {
|
||||
const { shell } = require("electron");
|
||||
await shell.openExternal(url);
|
||||
}
|
||||
|
||||
async function openLogsFolder() {
|
||||
const { shell } = require("electron");
|
||||
if (process.platform === "win32") {
|
||||
await shell.openPath(
|
||||
"C:\\Users\\" +
|
||||
process.env.USERNAME +
|
||||
"\\AppData\\Roaming\\ms-365-electron\\logs\\"
|
||||
);
|
||||
} else if (process.platform === "darwin") {
|
||||
await shell.openPath(
|
||||
"/Users/" + process.env.USER + "/Library/Logs/ms-365-electron/"
|
||||
);
|
||||
} else if (process.platform === "linux") {
|
||||
await shell.openPath(
|
||||
"/home/" + process.env.USER + "/.config/ms-365-electron/logs/"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function setUserAgent(useragent) {
|
||||
store.set("useragentstring", useragent);
|
||||
const updatedialog = dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "User-Agent string changed",
|
||||
message: `You have switched to the ${useragent} User-Agent string.\n\nPlease restart the app for the changes to take effect.`,
|
||||
buttons: ["Later", "Restart"],
|
||||
});
|
||||
if (updatedialog === 1) {
|
||||
app.relaunch();
|
||||
app.exit();
|
||||
}
|
||||
}
|
||||
|
||||
getValueOrDefault("enterprise-or-normal", "https://microsoft365.com/?auth=1");
|
||||
getValueOrDefault("autohide-menubar", "false");
|
||||
getValueOrDefault("useragentstring", useragents.Windows);
|
||||
getValueOrDefault("discordrpcstatus", "false");
|
||||
getValueOrDefault("blockads", "false");
|
||||
getValueOrDefault("blockadsandtrackers", "false");
|
||||
|
||||
const menulayout = [
|
||||
...(process.platform === "darwin"
|
||||
? [
|
||||
{
|
||||
label: app.name,
|
||||
submenu: [
|
||||
{ label: "About MS-365-Electron", role: "about" },
|
||||
{
|
||||
label: "Learn More",
|
||||
click: async () => {
|
||||
await openExternalLink(
|
||||
"https://github.com/agam778/MS-365-Electron"
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Check for Updates...",
|
||||
id: "check-for-updates",
|
||||
click: async () => {
|
||||
await checkForUpdates();
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Open Logs Folder",
|
||||
click: async () => {
|
||||
await openLogsFolder();
|
||||
},
|
||||
},
|
||||
{ type: "separator" },
|
||||
{ role: "services" },
|
||||
{ type: "separator" },
|
||||
{ label: "Hide MS-365-Electron", role: "hide" },
|
||||
{ role: "hideOthers" },
|
||||
{ role: "unhide" },
|
||||
{ type: "separator" },
|
||||
{ label: "Quit MS-365-Electron", role: "quit" },
|
||||
],
|
||||
},
|
||||
]
|
||||
: []),
|
||||
{
|
||||
label: process.platform === "darwin" ? "Preferences" : "Application",
|
||||
submenu: [
|
||||
...(!process.platform === "darwin"
|
||||
? [
|
||||
{
|
||||
label: "About MS-365-Electron",
|
||||
click: () => {
|
||||
// placeholder
|
||||
},
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...(!process.platform === "darwin"
|
||||
? [
|
||||
{
|
||||
label: "Learn More",
|
||||
click: async () => {
|
||||
await openExternalLink(
|
||||
"https://github.com/agam778/MS-365-Electron"
|
||||
);
|
||||
},
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...(!process.platform === "darwin"
|
||||
? [
|
||||
{
|
||||
label: "Check for Updates...",
|
||||
id: "check-for-updates",
|
||||
click: async () => {
|
||||
await checkForUpdates();
|
||||
},
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...(!process.platform === "darwin"
|
||||
? [
|
||||
{
|
||||
label: "Open Logs Folder",
|
||||
click: async () => {
|
||||
await openLogsFolder();
|
||||
},
|
||||
},
|
||||
]
|
||||
: []),
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Open Normal version of MS 365",
|
||||
type: "radio",
|
||||
click() {
|
||||
store.set("enterprise-or-normal", "https://microsoft365.com/?auth=1");
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "Normal version of MS 365",
|
||||
message:
|
||||
"The normal version of MS 365 will be opened.\n\nPlease restart the app to apply the changes.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
},
|
||||
checked:
|
||||
store.get("enterprise-or-normal") ===
|
||||
"https://microsoft365.com/?auth=1",
|
||||
},
|
||||
{
|
||||
label: "Open Enterprise version of MS 365",
|
||||
type: "radio",
|
||||
click() {
|
||||
store.set("enterprise-or-normal", "https://microsoft365.com/?auth=2");
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "Enterprise version of MS 365",
|
||||
message:
|
||||
"The enterprise version of MS 365 will be opened.\n\nPlease restart the app to apply the changes.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
},
|
||||
checked:
|
||||
store.get("enterprise-or-normal") ===
|
||||
"https://microsoft365.com/?auth=2",
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Open Websites in New Windows (Recommended)",
|
||||
type: "radio",
|
||||
click: () => {
|
||||
store.set("websites-in-new-window", "true");
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "Websites in New Windows",
|
||||
message:
|
||||
"Websites which are targeted to open in new tabs will now open in new windows.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
},
|
||||
checked: store.get("websites-in-new-window")
|
||||
? store.get("websites-in-new-window") === "true"
|
||||
: true,
|
||||
},
|
||||
{
|
||||
label: "Open Websites in the Same Window",
|
||||
type: "radio",
|
||||
click: () => {
|
||||
store.set("websites-in-new-window", "false");
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "Websites in New Windows",
|
||||
message:
|
||||
"Websites which are targeted to open in new tabs will now open in the same window.\n\nNote: This will be buggy in some cases if you are using Enterprise version of MS 365.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
},
|
||||
checked: store.get("websites-in-new-window")
|
||||
? store.get("websites-in-new-window") === "false"
|
||||
: false,
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Enable Discord RPC",
|
||||
type: "checkbox",
|
||||
click: () => {
|
||||
if (store.get("discordrpcstatus") === "true") {
|
||||
store.set("discordrpcstatus", "false");
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "Discord RPC",
|
||||
message: "Discord RPC has been disabled.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
clearActivity();
|
||||
return;
|
||||
} else if (
|
||||
store.get("discordrpcstatus") === "false" ||
|
||||
store.get("discordrpcstatus") === undefined
|
||||
) {
|
||||
store.set("discordrpcstatus", "true");
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "Discord RPC",
|
||||
message: "Discord RPC has been enabled.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
setActivity(
|
||||
`On ${BrowserWindow.getFocusedWindow().webContents.getTitle()}`
|
||||
);
|
||||
return;
|
||||
}
|
||||
},
|
||||
checked: store.get("discordrpcstatus") === "true",
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Block Ads",
|
||||
type: "checkbox",
|
||||
click: () => {
|
||||
if (store.get("blockads") === "true") {
|
||||
store.set("blockads", "false");
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "Block Ads",
|
||||
message: "Ads will no longer be blocked.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
if (!store.get("blockadsandtrackers") === "true") {
|
||||
ElectronBlocker.fromPrebuiltAdsOnly(fetch).then((blocker) =>
|
||||
blocker.disableBlockingInSession(
|
||||
BrowserWindow.getFocusedWindow().webContents.session
|
||||
)
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (
|
||||
store.get("blockads") === "false" ||
|
||||
store.get("blockads") === undefined
|
||||
) {
|
||||
store.set("blockads", "true");
|
||||
ElectronBlocker.fromPrebuiltAdsOnly(fetch).then((blocker) =>
|
||||
blocker.enableBlockingInSession(
|
||||
BrowserWindow.getFocusedWindow().webContents.session
|
||||
)
|
||||
);
|
||||
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "Block Ads",
|
||||
message: "Ads will now be blocked.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
return;
|
||||
}
|
||||
},
|
||||
checked: store.get("blockads") === "true",
|
||||
},
|
||||
{
|
||||
label: "Block Ads and Trackers",
|
||||
type: "checkbox",
|
||||
click: () => {
|
||||
if (store.get("blockadsandtrackers") === "true") {
|
||||
store.set("blockadsandtrackers", "false");
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "Block Ads and Trackers",
|
||||
message: "Ads and trackers will no longer be blocked.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
if (!store.get("blockads") === "true") {
|
||||
ElectronBlocker.fromPrebuiltAdsAndTracking(fetch).then(
|
||||
(blocker) => {
|
||||
blocker.disableBlockingInSession(
|
||||
BrowserWindow.getFocusedWindow().webContents.session
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (
|
||||
store.get("blockadsandtrackers") === "false" ||
|
||||
store.get("blockadsandtrackers") === undefined
|
||||
) {
|
||||
store.set("blockadsandtrackers", "true");
|
||||
ElectronBlocker.fromPrebuiltAdsAndTracking(fetch).then(
|
||||
(blocker) => {
|
||||
blocker.enableBlockingInSession(
|
||||
BrowserWindow.getFocusedWindow().webContents.session
|
||||
);
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "Block Ads and Trackers",
|
||||
message: "Ads and trackers will now be blocked.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
}
|
||||
);
|
||||
return;
|
||||
}
|
||||
},
|
||||
checked: store.get("blockadsandtrackers") === "true",
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Windows User-Agent String",
|
||||
type: "radio",
|
||||
click: () => {
|
||||
setUserAgent(useragents.Windows);
|
||||
},
|
||||
checked: store.get("useragentstring") === useragents.Windows,
|
||||
},
|
||||
{
|
||||
label: "macOS User-Agent String",
|
||||
type: "radio",
|
||||
click: () => {
|
||||
setUserAgent(useragents.macOS);
|
||||
},
|
||||
checked: store.get("useragentstring") === useragents.macOS,
|
||||
},
|
||||
{
|
||||
label: "Linux User-Agent String",
|
||||
type: "radio",
|
||||
click: () => {
|
||||
store.set("useragentstring", useragents.Linux);
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "User agent switcher",
|
||||
message:
|
||||
"You have switched to Linux Useragent.\n\nPlease restart the app to apply the changes.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
},
|
||||
checked: store.get("useragentstring") === useragents.Linux,
|
||||
},
|
||||
{ type: "separator" },
|
||||
...(!process.platform === "darwin"
|
||||
? [
|
||||
{
|
||||
role: "quit",
|
||||
accelerator: "Ctrl+Q",
|
||||
},
|
||||
]
|
||||
: []),
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Navigation",
|
||||
submenu: [
|
||||
{
|
||||
label: "Back",
|
||||
click: () => {
|
||||
BrowserWindow.getFocusedWindow().webContents.goBack();
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Forward",
|
||||
click: () => {
|
||||
BrowserWindow.getFocusedWindow().webContents.goForward();
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Reload",
|
||||
click: () => {
|
||||
BrowserWindow.getFocusedWindow().webContents.reload();
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Home",
|
||||
click: () => {
|
||||
BrowserWindow.getFocusedWindow().loadURL(
|
||||
`${store.get("enterprise-or-normal")}`
|
||||
);
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Edit",
|
||||
submenu: [
|
||||
{ role: "undo" },
|
||||
{ role: "redo" },
|
||||
{ type: "separator" },
|
||||
{ role: "cut" },
|
||||
{ role: "copy" },
|
||||
{ role: "paste" },
|
||||
...(process.platform === "darwin"
|
||||
? [
|
||||
{ role: "pasteAndMatchStyle" },
|
||||
{ role: "delete" },
|
||||
{ role: "selectAll" },
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Speech",
|
||||
submenu: [{ role: "startSpeaking" }, { role: "stopSpeaking" }],
|
||||
},
|
||||
]
|
||||
: [{ role: "delete" }, { type: "separator" }, { role: "selectAll" }]),
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "View",
|
||||
submenu: [
|
||||
{ role: "reload" },
|
||||
{ role: "forceReload" },
|
||||
{ type: "separator" },
|
||||
{ role: "resetZoom" },
|
||||
{
|
||||
role: "zoomIn",
|
||||
accelerator: process.platform === "darwin" ? "Control+=" : "Control+=",
|
||||
},
|
||||
{ role: "zoomOut" },
|
||||
{ type: "separator" },
|
||||
{ role: "togglefullscreen" },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Window",
|
||||
submenu: [
|
||||
{ role: "minimize" },
|
||||
{ role: "zoom" },
|
||||
...(process.platform === "darwin"
|
||||
? [{ type: "separator" }, { role: "front" }, { type: "separator" }]
|
||||
: [{ role: "close" }]),
|
||||
...(!process.platform === "darwin"
|
||||
? [
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Show Menu Bar",
|
||||
type: "radio",
|
||||
click: () => {
|
||||
store.set("autohide-menubar", "false");
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "Menu Bar Settings",
|
||||
message:
|
||||
"Menu will be visible now. Please restart the app for changes to take effect.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
},
|
||||
checked: store.get("autohide-menubar") === "false",
|
||||
},
|
||||
{
|
||||
label: "Hide Menu Bar (ALT to show)",
|
||||
type: "radio",
|
||||
click: () => {
|
||||
store.set("autohide-menubar", "true");
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "Menu Bar Settings",
|
||||
message:
|
||||
"Menu bar will be automatically hidden now. Please restart the app for changes to take effect.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
},
|
||||
checked: store.get("autohide-menubar") === "true",
|
||||
},
|
||||
]
|
||||
: []),
|
||||
],
|
||||
},
|
||||
];
|
||||
module.exports = { menulayout };
|
||||
57
app/rpc.js
Normal file
@@ -0,0 +1,57 @@
|
||||
const { Client } = require("@xhayper/discord-rpc");
|
||||
const { dialog, BrowserWindow } = require("electron");
|
||||
|
||||
const client = new Client({
|
||||
clientId: "942637872530460742",
|
||||
});
|
||||
|
||||
async function clearActivity() {
|
||||
await client.user?.clearActivity().catch((err) => {
|
||||
dialog.showMessageBox(BrowserWindow.getFocusedWindow(), {
|
||||
type: "error",
|
||||
title: "Discord RPC Error",
|
||||
message: "Oops! An Error occured while clearing Discord RPC.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function setActivity(details) {
|
||||
if (!client.user) {
|
||||
await loginToRPC();
|
||||
}
|
||||
await client.user
|
||||
?.setActivity({
|
||||
details: details,
|
||||
startTimestamp: Date.now(),
|
||||
largeImageKey: "icon",
|
||||
largeImageText: "MS-365-Electron",
|
||||
})
|
||||
.catch((err) => {
|
||||
dialog.showMessageBox(BrowserWindow.getFocusedWindow(), {
|
||||
type: "error",
|
||||
title: "Discord RPC Error",
|
||||
message: "Oops! An Error occured while setting Discord RPC.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
|
||||
async function loginToRPC() {
|
||||
await client.login().catch((err) => {
|
||||
dialog.showMessageBox(BrowserWindow.getFocusedWindow(), {
|
||||
type: "error",
|
||||
title: "Discord RPC Error",
|
||||
message: "Oops! An Error occured while connecting to Discord RPC.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
clearActivity,
|
||||
setActivity,
|
||||
loginToRPC,
|
||||
};
|
||||
4
app/store.js
Normal file
@@ -0,0 +1,4 @@
|
||||
const Store = require("electron-store");
|
||||
const store = new Store();
|
||||
|
||||
module.exports = store;
|
||||
5
app/useragents.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"Windows": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36",
|
||||
"macOS": "Mozilla/5.0 (Macintosh; Intel Mac OS X 13_2_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36",
|
||||
"Linux": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
|
||||
}
|
||||
BIN
assets/about.png
Normal file
|
After Width: | Height: | Size: 214 KiB |
|
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 2.2 MiB |
BIN
assets/icons/apps/excel-mac.png
Normal file
|
After Width: | Height: | Size: 159 KiB |
BIN
assets/icons/apps/excel.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
assets/icons/apps/onedrive-mac.png
Normal file
|
After Width: | Height: | Size: 156 KiB |
BIN
assets/icons/apps/onedrive.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
assets/icons/apps/onenote-mac.png
Normal file
|
After Width: | Height: | Size: 156 KiB |
BIN
assets/icons/apps/onenote.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
assets/icons/apps/outlook-mac.png
Normal file
|
After Width: | Height: | Size: 172 KiB |
BIN
assets/icons/apps/outlook.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
assets/icons/apps/powerpoint-mac.png
Normal file
|
After Width: | Height: | Size: 158 KiB |
BIN
assets/icons/apps/powerpoint.png
Normal file
|
After Width: | Height: | Size: 45 KiB |
BIN
assets/icons/apps/teams-mac.png
Normal file
|
After Width: | Height: | Size: 161 KiB |
BIN
assets/icons/apps/teams.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
assets/icons/apps/word-mac.png
Normal file
|
After Width: | Height: | Size: 159 KiB |
BIN
assets/icons/apps/word.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 209 KiB After Width: | Height: | Size: 209 KiB |
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB |
224
build.sh
@@ -1,224 +0,0 @@
|
||||
#!/bin/bash
|
||||
# This script helps you to start/build the MS-Office-Electron app
|
||||
if ! [ -x "$(command -v node)" ]; then
|
||||
echo 'Error: nodejs is not installed.' >&2
|
||||
echo 'Installing nodejs now; this may take a while.'
|
||||
if [ "$(uname)" == "Linux" ]; then
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
if [ -f /etc/debian_version ]; then
|
||||
curl -fsSL https://deb.nodesource.com/setup_17.x | sudo -E bash -
|
||||
sudo apt-get install -y nodejs
|
||||
sudo apt-get install rpm -y # for rpm build.
|
||||
elif [ -f /etc/redhat-release ]; then
|
||||
sudo yum install nodejs
|
||||
elif [ -f /etc/arch-release ]; then
|
||||
sudo pacman -S nodejs
|
||||
elif [ -f /etc/gentoo-release ]; then
|
||||
sudo emerge nodejs
|
||||
elif [ -f /etc/SuSE-release ]; then
|
||||
sudo zypper install nodejs
|
||||
elif [ -f /etc/fedora-release ]; then
|
||||
sudo dnf install nodejs
|
||||
elif [ -f /etc/centos-release ]; then
|
||||
sudo yum install nodejs
|
||||
elif [ -f /etc/nixos ]; then
|
||||
sudo nix-env -iA nodejs
|
||||
fi
|
||||
else
|
||||
if [ -f /etc/debian_version ]; then
|
||||
curl -fsSL https://deb.nodesource.com/setup_17.x | bash -
|
||||
apt-get install -y nodejs
|
||||
elif [ -f /etc/redhat-release ]; then
|
||||
yum install nodejs
|
||||
elif [ -f /etc/arch-release ]; then
|
||||
pacman -S nodejs
|
||||
elif [ -f /etc/gentoo-release ]; then
|
||||
emerge nodejs
|
||||
elif [ -f /etc/SuSE-release ]; then
|
||||
zypper install nodejs
|
||||
elif [ -f /etc/fedora-release ]; then
|
||||
dnf install nodejs
|
||||
elif [ -f /etc/centos-release ]; then
|
||||
yum install nodejs
|
||||
elif [ -f /etc/nixos ]; then
|
||||
nix-env -iA nodejs
|
||||
fi
|
||||
fi
|
||||
elif [ "$(uname)" == "Darwin" ]; then
|
||||
brew install node
|
||||
elif [ "$(uname)" == "MINGW32_NT-10.0" ]; then
|
||||
echo 'Error: nodejs is not installed.' >&2
|
||||
echo 'Please install nodejs manually.'
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! [ -x "$(command -v yarn)" ]; then
|
||||
echo 'Error: yarn is not installed.' >&2
|
||||
echo 'Installing yarn now; this may take a while.'
|
||||
if [ "$(uname)" == "Linux" ]; then
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
if [ -f /etc/debian_version ]; then
|
||||
sudo apt-get install -y yarn
|
||||
elif [ -f /etc/redhat-release ]; then
|
||||
sudo yum install yarn
|
||||
elif [ -f /etc/arch-release ]; then
|
||||
sudo pacman -S yarn
|
||||
elif [ -f /etc/gentoo-release ]; then
|
||||
sudo emerge yarn
|
||||
elif [ -f /etc/SuSE-release ]; then
|
||||
sudo zypper install yarn
|
||||
elif [ -f /etc/fedora-release ]; then
|
||||
sudo dnf install yarn
|
||||
elif [ -f /etc/centos-release ]; then
|
||||
sudo yum install yarn
|
||||
elif [ -f /etc/nixos ]; then
|
||||
sudo nix-env -iA yarn
|
||||
fi
|
||||
else
|
||||
if [ -f /etc/debian_version ]; then
|
||||
apt-get install -y yarn
|
||||
elif [ -f /etc/redhat-release ]; then
|
||||
yum install yarn
|
||||
elif [ -f /etc/arch-release ]; then
|
||||
pacman -S yarn
|
||||
elif [ -f /etc/gentoo-release ]; then
|
||||
emerge yarn
|
||||
elif [ -f /etc/SuSE-release ]; then
|
||||
zypper install yarn
|
||||
elif [ -f /etc/fedora-release ]; then
|
||||
dnf install yarn
|
||||
elif [ -f /etc/centos-release ]; then
|
||||
yum install yarn
|
||||
elif [ -f /etc/nixos ]; then
|
||||
nix-env -iA yarn
|
||||
fi
|
||||
fi
|
||||
elif [ "$(uname)" == "Darwin" ]; then
|
||||
brew install yarn
|
||||
elif [ "$(uname)" == "MINGW32_NT-10.0" ]; then
|
||||
echo 'Error: yarn is not installed.' >&2
|
||||
echo 'Please install yarn manually.'
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d "./.git" ]; then
|
||||
echo "Detected a cloned repository, Continuing..."
|
||||
else
|
||||
echo "Repository not found, cloning now..."
|
||||
if ! [ -x "$(command -v git)" ]; then
|
||||
echo 'Error: git is not installed.' >&2
|
||||
echo 'Installing git now; this may take a while.'
|
||||
if [ "$(uname)" == "Linux" ]; then
|
||||
if [ "$(id -u)" == "0" ]; then
|
||||
if [ -f /etc/debian_version ]; then
|
||||
apt-get install git
|
||||
elif [ -f /etc/redhat-release ]; then
|
||||
yum install git
|
||||
elif [ -f /etc/arch-release ]; then
|
||||
pacman -S git
|
||||
elif [ -f /etc/gentoo-release ]; then
|
||||
emerge git
|
||||
elif [ -f /etc/SuSE-release ]; then
|
||||
zypper install git
|
||||
elif [ -f /etc/fedora-release ]; then
|
||||
dnf install git
|
||||
elif [ -f /etc/centos-release ]; then
|
||||
yum install git
|
||||
elif [ -f /etc/nixos ]; then
|
||||
nix-env -iA git
|
||||
fi
|
||||
else
|
||||
if [ -f /etc/debian_version ]; then
|
||||
sudo apt-get install git
|
||||
elif [ -f /etc/redhat-release ]; then
|
||||
sudo yum install git
|
||||
elif [ -f /etc/arch-release ]; then
|
||||
sudo pacman -S git
|
||||
elif [ -f /etc/gentoo-release ]; then
|
||||
sudo emerge git
|
||||
elif [ -f /etc/SuSE-release ]; then
|
||||
sudo zypper install git
|
||||
elif [ -f /etc/fedora-release ]; then
|
||||
sudo dnf install git
|
||||
elif [ -f /etc/centos-release ]; then
|
||||
sudo yum install git
|
||||
elif [ -f /etc/nixos ]; then
|
||||
sudo nix-env -iA git
|
||||
fi
|
||||
fi
|
||||
elif [ "$(uname)" == "Darwin" ]; then
|
||||
brew install git
|
||||
elif [ "$(uname)" == "MINGW32_NT-10.0" ]; then
|
||||
echo 'Error: git is not installed.' >&2
|
||||
echo 'Please install git manually.'
|
||||
fi
|
||||
fi
|
||||
git clone --depth=1 https://github.com/agam778/MS-Office-Electron; cd MS-Office-Electron || echo "Failed to change directory." && return 1
|
||||
echo 'Cloned the repository'
|
||||
fi
|
||||
|
||||
clear
|
||||
echo 'Installing Dependencies'
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
sudo yarn install
|
||||
else
|
||||
yarn install
|
||||
fi
|
||||
|
||||
clear
|
||||
echo 'What do you want to do?'
|
||||
echo '1. Run the app without building'
|
||||
echo '2. Build the app'
|
||||
echo '3. Build and install the app'
|
||||
echo '4. Exit'
|
||||
echo 'Enter your choice:'; read choice;
|
||||
if [ "$choice" -eq "1" ]; then
|
||||
echo 'Running the app...'
|
||||
yarn start
|
||||
elif [ "$choice" -eq "2" ]; then
|
||||
echo 'Building the app...'
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
if [ "$(uname -m)" == "arm64" ]; then
|
||||
sudo yarn dist --arm64
|
||||
elif [ "$(uname -m)" == "x86_64" ]; then
|
||||
sudo yarn dist --x64
|
||||
fi
|
||||
else
|
||||
if [ "$(uname -m)" == "arm64" ]; then
|
||||
yarn dist --arm64
|
||||
elif [ "$(uname -m)" == "x86_64" ]; then
|
||||
yarn dist --x64
|
||||
fi
|
||||
fi
|
||||
elif [ "$choice" -eq "3" ]; then
|
||||
echo 'Building and installing the app...'
|
||||
if ! [ -f /etc/debian_version ]; then
|
||||
echo 'Error: "Build and install the app" option is only supported on Debian-based systems for now.' >&2
|
||||
exit 0
|
||||
fi
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
if [ "$(uname -m)" == "arm64" ]; then
|
||||
sudo yarn dist --arm64
|
||||
sudo apt install -y -f ./release/MS-Office-Electron*.deb
|
||||
elif [ "$(uname -m)" == "x86_64" ]; then
|
||||
sudo yarn dist --x64
|
||||
sudo apt install -y -f ./release/MS-Office-Electron*.deb
|
||||
fi
|
||||
else
|
||||
if [ "$(uname -m)" == "arm64" ]; then
|
||||
yarn dist --arm64
|
||||
apt install -y -f ./release/MS-Office-Electron*.deb
|
||||
elif [ "$(uname -m)" == "x86_64" ]; then
|
||||
yarn dist --x64
|
||||
apt install -y -f ./release/MS-Office-Electron*.deb
|
||||
fi
|
||||
fi
|
||||
elif [ "$choice" -eq "4" ]; then
|
||||
echo 'Exiting...'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 'Finished successfully! 🎉 '
|
||||
exit 0
|
||||
@@ -1,7 +0,0 @@
|
||||
# MS-Office-Electron
|
||||
|
||||
A Microsoft Office Online Desktop Client made with Electron. Free of Cost.
|
||||
|
||||
# Website
|
||||
|
||||
Just a website for the MS-Office-Electron App, nothing much
|
||||
4398
docs/assets/css/fontawesome-all.min.css
vendored
|
Before Width: | Height: | Size: 17 KiB |
150
docs/assets/js/breakpoints.min.js
vendored
@@ -1,150 +0,0 @@
|
||||
/* breakpoints.js v1.0 | @ajlkn | MIT licensed */
|
||||
var breakpoints = (function () {
|
||||
"use strict";
|
||||
function e(e) {
|
||||
t.init(e);
|
||||
}
|
||||
var t = {
|
||||
list: null,
|
||||
media: {},
|
||||
events: [],
|
||||
init: function (e) {
|
||||
(t.list = e),
|
||||
window.addEventListener("resize", t.poll),
|
||||
window.addEventListener("orientationchange", t.poll),
|
||||
window.addEventListener("load", t.poll),
|
||||
window.addEventListener("fullscreenchange", t.poll);
|
||||
},
|
||||
active: function (e) {
|
||||
var n, a, s, i, r, d, c;
|
||||
if (!(e in t.media)) {
|
||||
if (
|
||||
(">=" == e.substr(0, 2)
|
||||
? ((a = "gte"), (n = e.substr(2)))
|
||||
: "<=" == e.substr(0, 2)
|
||||
? ((a = "lte"), (n = e.substr(2)))
|
||||
: ">" == e.substr(0, 1)
|
||||
? ((a = "gt"), (n = e.substr(1)))
|
||||
: "<" == e.substr(0, 1)
|
||||
? ((a = "lt"), (n = e.substr(1)))
|
||||
: "!" == e.substr(0, 1)
|
||||
? ((a = "not"), (n = e.substr(1)))
|
||||
: ((a = "eq"), (n = e)),
|
||||
n && n in t.list)
|
||||
)
|
||||
if (((i = t.list[n]), Array.isArray(i))) {
|
||||
if (((r = parseInt(i[0])), (d = parseInt(i[1])), isNaN(r))) {
|
||||
if (isNaN(d)) return;
|
||||
c = i[1].substr(String(d).length);
|
||||
} else c = i[0].substr(String(r).length);
|
||||
if (isNaN(r))
|
||||
switch (a) {
|
||||
case "gte":
|
||||
s = "screen";
|
||||
break;
|
||||
case "lte":
|
||||
s = "screen and (max-width: " + d + c + ")";
|
||||
break;
|
||||
case "gt":
|
||||
s = "screen and (min-width: " + (d + 1) + c + ")";
|
||||
break;
|
||||
case "lt":
|
||||
s = "screen and (max-width: -1px)";
|
||||
break;
|
||||
case "not":
|
||||
s = "screen and (min-width: " + (d + 1) + c + ")";
|
||||
break;
|
||||
default:
|
||||
s = "screen and (max-width: " + d + c + ")";
|
||||
}
|
||||
else if (isNaN(d))
|
||||
switch (a) {
|
||||
case "gte":
|
||||
s = "screen and (min-width: " + r + c + ")";
|
||||
break;
|
||||
case "lte":
|
||||
s = "screen";
|
||||
break;
|
||||
case "gt":
|
||||
s = "screen and (max-width: -1px)";
|
||||
break;
|
||||
case "lt":
|
||||
s = "screen and (max-width: " + (r - 1) + c + ")";
|
||||
break;
|
||||
case "not":
|
||||
s = "screen and (max-width: " + (r - 1) + c + ")";
|
||||
break;
|
||||
default:
|
||||
s = "screen and (min-width: " + r + c + ")";
|
||||
}
|
||||
else
|
||||
switch (a) {
|
||||
case "gte":
|
||||
s = "screen and (min-width: " + r + c + ")";
|
||||
break;
|
||||
case "lte":
|
||||
s = "screen and (max-width: " + d + c + ")";
|
||||
break;
|
||||
case "gt":
|
||||
s = "screen and (min-width: " + (d + 1) + c + ")";
|
||||
break;
|
||||
case "lt":
|
||||
s = "screen and (max-width: " + (r - 1) + c + ")";
|
||||
break;
|
||||
case "not":
|
||||
s =
|
||||
"screen and (max-width: " +
|
||||
(r - 1) +
|
||||
c +
|
||||
"), screen and (min-width: " +
|
||||
(d + 1) +
|
||||
c +
|
||||
")";
|
||||
break;
|
||||
default:
|
||||
s =
|
||||
"screen and (min-width: " +
|
||||
r +
|
||||
c +
|
||||
") and (max-width: " +
|
||||
d +
|
||||
c +
|
||||
")";
|
||||
}
|
||||
} else s = "(" == i.charAt(0) ? "screen and " + i : i;
|
||||
t.media[e] = !!s && s;
|
||||
}
|
||||
return t.media[e] !== !1 && window.matchMedia(t.media[e]).matches;
|
||||
},
|
||||
on: function (e, n) {
|
||||
t.events.push({ query: e, handler: n, state: !1 }), t.active(e) && n();
|
||||
},
|
||||
poll: function () {
|
||||
var e, n;
|
||||
for (e = 0; e < t.events.length; e++)
|
||||
(n = t.events[e]),
|
||||
t.active(n.query)
|
||||
? n.state || ((n.state = !0), n.handler())
|
||||
: n.state && (n.state = !1);
|
||||
},
|
||||
};
|
||||
return (
|
||||
(e._ = t),
|
||||
(e.on = function (e, n) {
|
||||
t.on(e, n);
|
||||
}),
|
||||
(e.active = function (e) {
|
||||
return t.active(e);
|
||||
}),
|
||||
e
|
||||
);
|
||||
})();
|
||||
!(function (e, t) {
|
||||
"function" == typeof define && define.amd
|
||||
? define([], t)
|
||||
: "object" == typeof exports
|
||||
? (module.exports = t())
|
||||
: (e.breakpoints = t());
|
||||
})(this, function () {
|
||||
return breakpoints;
|
||||
});
|
||||
118
docs/assets/js/browser.min.js
vendored
@@ -1,118 +0,0 @@
|
||||
/* browser.js v1.0 | @ajlkn | MIT licensed */
|
||||
var browser = (function () {
|
||||
"use strict";
|
||||
var e = {
|
||||
name: null,
|
||||
version: null,
|
||||
os: null,
|
||||
osVersion: null,
|
||||
touch: null,
|
||||
mobile: null,
|
||||
_canUse: null,
|
||||
canUse: function (n) {
|
||||
e._canUse || (e._canUse = document.createElement("div"));
|
||||
var o = e._canUse.style,
|
||||
r = n.charAt(0).toUpperCase() + n.slice(1);
|
||||
return (
|
||||
n in o ||
|
||||
"Moz" + r in o ||
|
||||
"Webkit" + r in o ||
|
||||
"O" + r in o ||
|
||||
"ms" + r in o
|
||||
);
|
||||
},
|
||||
init: function () {
|
||||
var n,
|
||||
o,
|
||||
r,
|
||||
i,
|
||||
t = navigator.userAgent;
|
||||
for (
|
||||
n = "other",
|
||||
o = 0,
|
||||
r = [
|
||||
["firefox", /Firefox\/([0-9\.]+)/],
|
||||
["bb", /BlackBerry.+Version\/([0-9\.]+)/],
|
||||
["bb", /BB[0-9]+.+Version\/([0-9\.]+)/],
|
||||
["opera", /OPR\/([0-9\.]+)/],
|
||||
["opera", /Opera\/([0-9\.]+)/],
|
||||
["edge", /Edge\/([0-9\.]+)/],
|
||||
["safari", /Version\/([0-9\.]+).+Safari/],
|
||||
["chrome", /Chrome\/([0-9\.]+)/],
|
||||
["ie", /MSIE ([0-9]+)/],
|
||||
["ie", /Trident\/.+rv:([0-9]+)/],
|
||||
],
|
||||
i = 0;
|
||||
i < r.length;
|
||||
i++
|
||||
)
|
||||
if (t.match(r[i][1])) {
|
||||
(n = r[i][0]), (o = parseFloat(RegExp.$1));
|
||||
break;
|
||||
}
|
||||
for (
|
||||
e.name = n,
|
||||
e.version = o,
|
||||
n = "other",
|
||||
o = 0,
|
||||
r = [
|
||||
[
|
||||
"ios",
|
||||
/([0-9_]+) like Mac OS X/,
|
||||
function (e) {
|
||||
return e.replace("_", ".").replace("_", "");
|
||||
},
|
||||
],
|
||||
[
|
||||
"ios",
|
||||
/CPU like Mac OS X/,
|
||||
function (e) {
|
||||
return 0;
|
||||
},
|
||||
],
|
||||
["wp", /Windows Phone ([0-9\.]+)/, null],
|
||||
["android", /Android ([0-9\.]+)/, null],
|
||||
[
|
||||
"mac",
|
||||
/Macintosh.+Mac OS X ([0-9_]+)/,
|
||||
function (e) {
|
||||
return e.replace("_", ".").replace("_", "");
|
||||
},
|
||||
],
|
||||
["windows", /Windows NT ([0-9\.]+)/, null],
|
||||
["bb", /BlackBerry.+Version\/([0-9\.]+)/, null],
|
||||
["bb", /BB[0-9]+.+Version\/([0-9\.]+)/, null],
|
||||
["linux", /Linux/, null],
|
||||
["bsd", /BSD/, null],
|
||||
["unix", /X11/, null],
|
||||
],
|
||||
i = 0;
|
||||
i < r.length;
|
||||
i++
|
||||
)
|
||||
if (t.match(r[i][1])) {
|
||||
(n = r[i][0]),
|
||||
(o = parseFloat(r[i][2] ? r[i][2](RegExp.$1) : RegExp.$1));
|
||||
break;
|
||||
}
|
||||
(e.os = n),
|
||||
(e.osVersion = o),
|
||||
(e.touch =
|
||||
"wp" == e.os
|
||||
? navigator.msMaxTouchPoints > 0
|
||||
: !!("ontouchstart" in window)),
|
||||
(e.mobile =
|
||||
"wp" == e.os || "android" == e.os || "ios" == e.os || "bb" == e.os);
|
||||
},
|
||||
};
|
||||
return e.init(), e;
|
||||
})();
|
||||
!(function (e, n) {
|
||||
"function" == typeof define && define.amd
|
||||
? define([], n)
|
||||
: "object" == typeof exports
|
||||
? (module.exports = n())
|
||||
: (e.browser = n());
|
||||
})(this, function () {
|
||||
return browser;
|
||||
});
|
||||