mirror of
https://github.com/agam778/MS-365-Electron.git
synced 2026-02-17 09:02:10 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99f1012163 | ||
|
|
43bd630b18 | ||
|
|
e2e3290457 | ||
|
|
88aec93c61 | ||
|
|
e8ebcdaa2d | ||
|
|
868a61fc48 | ||
|
|
80cd7d5ddf | ||
|
|
74bc10bce9 | ||
|
|
54ef6180a2 |
6
.github/dependabot.yml
vendored
Normal file
6
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
/node_modules/
|
||||
/.idea/
|
||||
/release/
|
||||
.DS_Store
|
||||
@@ -66,7 +66,7 @@ Supported Platforms
|
||||
5. All Distributions supporting AppImage (AppImage File)
|
||||
|
||||
Arch Linux builds are now on AUR!<br>
|
||||
Mac OS supported now with builds for both M1 And Intel Chips . See the instructions how to install below<br>
|
||||
Mac OS is supported now! See the instructions how to install below<br>
|
||||
|
||||
# Windows
|
||||
|
||||
@@ -89,7 +89,7 @@ For Installing this app on Windows :-
|
||||
For Installing this app on Mac :-
|
||||
|
||||
1. Just go to the [Releases](https://github.com/agam778/MS-Office-Electron/releases) page
|
||||
2. Scroll down and click the `.dmg` file. The build with no architecture written is for Intel Macs (Will fix it soon) and the build with arm64 written in it is for M1 Macs. Download the build according to your Mac.
|
||||
2. Scroll down and click the `.dmg` file. The build is only for Intel Macs.
|
||||
3. After it downloads, click on the file and mount it on your system. Now drag my app to the Applications Folder (There will be a shortcut in the opened window too) and your app will be installed. Open from Launchpad and enjoy.
|
||||
|
||||
# Linux
|
||||
@@ -172,4 +172,4 @@ To build the app, run `yarn dist`
|
||||
|
||||
# 📃 MIT License
|
||||
|
||||
#### *Disclaimer: Not affiliated with Microsoft. Office, the name, website, images/icons are the intellectual properties of Microsoft.*
|
||||
#### *Disclaimer: Not affiliated with Microsoft. Office, the name, website, images/icons are the intellectual properties of Microsoft.*
|
||||
|
||||
105
main.js
105
main.js
@@ -14,6 +14,13 @@ const RPC = require("discord-rpc");
|
||||
const clientId = "942637872530460742";
|
||||
const rpc = new RPC.Client({ transport: "ipc" });
|
||||
|
||||
const windowsuseragent =
|
||||
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.60 Safari/537.36";
|
||||
const macuseragent =
|
||||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.60 Safari/537.36";
|
||||
const linuxuseragent =
|
||||
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.60 Safari/537.36";
|
||||
|
||||
const log = require("electron-log");
|
||||
log.transports.file.level = "verbose";
|
||||
console.log = log.log;
|
||||
@@ -187,6 +194,39 @@ const menulayout = [
|
||||
},
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Open Normal version of MS Office",
|
||||
type: "radio",
|
||||
click() {
|
||||
store.set("enterprise-or-normal", "https://office.com/?auth=1");
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "Normal version of MS Office",
|
||||
message:
|
||||
"The normal version of MS Office will be opened.\n\nPlease restart the app to apply the changes.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
},
|
||||
checked:
|
||||
store.get("enterprise-or-normal") === "https://office.com/?auth=1",
|
||||
},
|
||||
{
|
||||
label: "Open Enterprise version of MS Office",
|
||||
type: "radio",
|
||||
click() {
|
||||
store.set("enterprise-or-normal", "https://office.com/?auth=2");
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "Enterprise version of MS Office",
|
||||
message:
|
||||
"The enterprise version of MS Office will be opened.\n\nPlease restart the app to apply the changes.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
},
|
||||
checked:
|
||||
store.get("enterprise-or-normal") === "https://office.com/?auth=2",
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Open Websites in New Windows (Recommended)",
|
||||
type: "radio",
|
||||
@@ -213,7 +253,7 @@ const menulayout = [
|
||||
type: "info",
|
||||
title: "Websites in New Windows",
|
||||
message:
|
||||
"Websites which are targeted to open in new tabs will now open in the same window.",
|
||||
"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 Office.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
},
|
||||
@@ -259,6 +299,53 @@ const menulayout = [
|
||||
: false,
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Windows Useragent",
|
||||
type: "radio",
|
||||
click: () => {
|
||||
store.set("useragentstring", windowsuseragent);
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "User agent switcher",
|
||||
message:
|
||||
"You have switched to Windows Useragent.\n\nPlease restart the app to apply the changes.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
},
|
||||
checked:
|
||||
store.get("useragentstring") === windowsuseragent ? true : false,
|
||||
},
|
||||
{
|
||||
label: "Mac os Useragent",
|
||||
type: "radio",
|
||||
click: () => {
|
||||
store.set("useragentstring", macuseragent);
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "User agent switcher",
|
||||
message:
|
||||
"You have switched to Mac OS Useragent.\n\nPlease restart the app to apply the changes.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
},
|
||||
checked: store.get("useragentstring") === macuseragent ? true : false,
|
||||
},
|
||||
{
|
||||
label: "Linux Useragent",
|
||||
type: "radio",
|
||||
click: () => {
|
||||
store.set("useragentstring", linuxuseragent);
|
||||
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") === linuxuseragent ? true : false,
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
role: "quit",
|
||||
accelerator: process.platform === "darwin" ? "Ctrl+Q" : "Ctrl+Q",
|
||||
@@ -290,7 +377,7 @@ const menulayout = [
|
||||
label: "Home",
|
||||
click: () => {
|
||||
BrowserWindow.getFocusedWindow().loadURL(
|
||||
"https://www.office.com/?auth=1"
|
||||
`${store.get("enterprise-or-normal")}`
|
||||
);
|
||||
},
|
||||
},
|
||||
@@ -398,8 +485,6 @@ function discordrpc(title) {
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
} else {
|
||||
// don't do anything
|
||||
}
|
||||
}
|
||||
|
||||
@@ -426,7 +511,7 @@ function createWindow() {
|
||||
show: false,
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
devTools: false,
|
||||
devTools: true,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -446,10 +531,12 @@ function createWindow() {
|
||||
});
|
||||
|
||||
splash.loadURL(`https://agam778.github.io/MS-Office-Electron/loading`);
|
||||
win.loadURL("https://www.office.com/?auth=1", {
|
||||
userAgent:
|
||||
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36",
|
||||
});
|
||||
win.loadURL(
|
||||
`${store.get("enterprise-or-normal") || "https://office.com/?auth=1"}`,
|
||||
{
|
||||
userAgent: store.get("useragentstring") || windowsuseragent,
|
||||
}
|
||||
);
|
||||
|
||||
win.webContents.on("did-finish-load", () => {
|
||||
splash.destroy();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ms-office-electron",
|
||||
"version": "0.5.2",
|
||||
"version": "0.6.0",
|
||||
"description": "An Unofficial Microsoft Office Online Desktop Client. Free of Cost.",
|
||||
"main": "main.js",
|
||||
"repository": {
|
||||
@@ -72,12 +72,12 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"electron": "^17.0.0",
|
||||
"electron": "^18.0.1",
|
||||
"electron-builder": "^22.14.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"about-window": "^1.15.2",
|
||||
"axios": "^0.25.0",
|
||||
"axios": "^0.26.1",
|
||||
"discord-rpc": "^4.0.1",
|
||||
"electron-context-menu": "^3.1.1",
|
||||
"electron-dl": "^3.3.0",
|
||||
|
||||
30
yarn.lock
30
yarn.lock
@@ -152,10 +152,10 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.21.tgz#864b987c0c68d07b4345845c3e63b75edd143644"
|
||||
integrity sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==
|
||||
|
||||
"@types/node@^14.6.2":
|
||||
version "14.18.12"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.12.tgz#0d4557fd3b94497d793efd4e7d92df2f83b4ef24"
|
||||
integrity sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A==
|
||||
"@types/node@^16.11.26":
|
||||
version "16.11.26"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.26.tgz#63d204d136c9916fb4dcd1b50f9740fe86884e47"
|
||||
integrity sha512-GZ7bu5A6+4DtG7q9GsoHXy3ALcgeIHP4NnL0Vv2wu0uUB/yQex26v0tf6/na1mm0+bS9Uw+0DFex7aaKr2qawQ==
|
||||
|
||||
"@types/plist@^3.0.1":
|
||||
version "3.0.2"
|
||||
@@ -353,12 +353,12 @@ atomically@^1.7.0:
|
||||
resolved "https://registry.yarnpkg.com/atomically/-/atomically-1.7.0.tgz#c07a0458432ea6dbc9a3506fffa424b48bccaafe"
|
||||
integrity sha512-Xcz9l0z7y9yQ9rdDaxlmaI4uJHf/T8g9hOEzJcsEqX2SjCj4J20uK7+ldkDHMbpJDK76wF7xEIgxc/vSlsfw5w==
|
||||
|
||||
axios@^0.25.0:
|
||||
version "0.25.0"
|
||||
resolved "https://registry.yarnpkg.com/axios/-/axios-0.25.0.tgz#349cfbb31331a9b4453190791760a8d35b093e0a"
|
||||
integrity sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==
|
||||
axios@^0.26.1:
|
||||
version "0.26.1"
|
||||
resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.1.tgz#1ede41c51fcf51bbbd6fd43669caaa4f0495aaa9"
|
||||
integrity sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==
|
||||
dependencies:
|
||||
follow-redirects "^1.14.7"
|
||||
follow-redirects "^1.14.8"
|
||||
|
||||
balanced-match@^1.0.0:
|
||||
version "1.0.2"
|
||||
@@ -962,13 +962,13 @@ electron-updater@^4.6.1:
|
||||
lodash.isequal "^4.5.0"
|
||||
semver "^7.3.5"
|
||||
|
||||
electron@^17.0.0:
|
||||
version "17.1.2"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-17.1.2.tgz#b4e4a0df883d9a9854cf865efa2bb00b12d55b1d"
|
||||
integrity sha512-hqKQaUIRWX5Y2eAD8FZINWD/e5TKdpkbBYbkcZmJS4Bd1PKQsaDVc9h5xoA8zZQkPymE9rss+swjRpAFurOPGQ==
|
||||
electron@^18.0.1:
|
||||
version "18.0.1"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-18.0.1.tgz#70653ecee008bea8a4240da78d0f5a426bb24d50"
|
||||
integrity sha512-8y3nxmK+v/tiuaR8yd4K83ApHxgomMIPAEl3J+2Jfv/D5G6M3KnvxNlNiNoTXI8uOegfmoqiDm5/2xlWFLzfLQ==
|
||||
dependencies:
|
||||
"@electron/get" "^1.13.0"
|
||||
"@types/node" "^14.6.2"
|
||||
"@types/node" "^16.11.26"
|
||||
extract-zip "^1.0.3"
|
||||
|
||||
emoji-regex@^8.0.0:
|
||||
@@ -1079,7 +1079,7 @@ find-up@^3.0.0:
|
||||
dependencies:
|
||||
locate-path "^3.0.0"
|
||||
|
||||
follow-redirects@^1.14.7:
|
||||
follow-redirects@^1.14.8:
|
||||
version "1.14.9"
|
||||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7"
|
||||
integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==
|
||||
|
||||
Reference in New Issue
Block a user