feat: make this Systemec ready.
2
.github/FUNDING.yml
vendored
@@ -1,2 +0,0 @@
|
||||
github: agam778
|
||||
ko_fi: agam778
|
||||
16
.github/dependabot.yml
vendored
@@ -1,16 +0,0 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/.github"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
36
.github/workflows/build.yml
vendored
@@ -1,36 +0,0 @@
|
||||
name: Build/release
|
||||
|
||||
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
|
||||
- name: Install Node.js, NPM and Yarn
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: latest
|
||||
|
||||
- name: Build and release with electron-builder
|
||||
run: |
|
||||
export GH_TOKEN=${{ secrets.GITHUB_TOKEN }}
|
||||
yarn
|
||||
if [ "$RUNNER_OS" == "Linux" ]; then
|
||||
yarn dist -c.snap.publish=github
|
||||
elif [ "$RUNNER_OS" == "Windows" ]; then
|
||||
yarn dist
|
||||
elif [ "$RUNNER_OS" == "macOS" ]; then
|
||||
yarn dist -m --x64 --arm64
|
||||
else
|
||||
echo "$RUNNER_OS not supported"
|
||||
exit 1
|
||||
fi
|
||||
shell: bash
|
||||
49
.github/workflows/ci.yml
vendored
@@ -1,49 +0,0 @@
|
||||
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
|
||||
- name: Install Node.js, NPM and Yarn
|
||||
uses: actions/setup-node@v4
|
||||
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@v4
|
||||
with:
|
||||
name: ${{ matrix.os }}-dist
|
||||
path: |
|
||||
release/*.exe
|
||||
release/*.dmg
|
||||
release/*.deb
|
||||
release/*.snap
|
||||
release/*.tar.gz
|
||||
release/*.AppImage
|
||||
release/*.rpm
|
||||
13
.github/workflows/stale.yml
vendored
@@ -1,13 +0,0 @@
|
||||
name: 'Close stale issues and PRs'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 1 * * *'
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
stale-issue-message: 'Message to comment on stale issues. If none provided, will not mark issues stale'
|
||||
stale-pr-message: 'Message to comment on stale PRs. If none provided, will not mark PRs stale'
|
||||
1
.gitignore
vendored
@@ -12,3 +12,4 @@ package-lock.json
|
||||
!.yarn/releases
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
*.lock
|
||||
10
.vscode/settings.json
vendored
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
|
||||
"editor.formatOnType": false,
|
||||
"editor.formatOnPaste": true,
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnSaveMode": "file",
|
||||
"files.autoSave": "onFocusChange",
|
||||
"prettier.printWidth": 100,
|
||||
"vs-code-prettier-eslint.prettierLast": false
|
||||
}
|
||||
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021-2023 Agampreet Singh
|
||||
Copyright (c) 2025 Daan Selen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
<p align="center"><img src="https://DaanSelen/MS-365-Electron/blob/main/assets/banner.png?raw=true" alt="Credits: "></p>
|
||||
<p align="center">Thanks 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>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://youtube.com/AgamsTechTricks">
|
||||
<img align="center" src="https://img.shields.io/badge/Made%20With%20♥-by%20Agam-orange?style=style=flat">
|
||||
|
||||
@@ -1,45 +1,13 @@
|
||||
import { dialog, BrowserWindow, ShareMenu, clipboard } from "electron";
|
||||
import { dialog, BrowserWindow, ShareMenu } from "electron";
|
||||
import { getValue, setValue } from "./store.js";
|
||||
import { ElectronBlocker } from "@ghostery/adblocker-electron";
|
||||
import { clearActivity, setActivity } from "./rpc.js";
|
||||
import prompt from "electron-prompt";
|
||||
|
||||
import { getScreenWidth, getScreenHeight } from "./dimensions.js";
|
||||
import { checkForUpdates, openExternalLink, openLogsFolder, setUserAgent } from "./utils.js";
|
||||
import { setUserAgent } from "./utils.js";
|
||||
import useragents from "../useragents.json" with { type: "json" };
|
||||
|
||||
const commonPreferencesSubmenu = [
|
||||
{
|
||||
label: "Open MS 365 with Personal Account",
|
||||
type: "radio",
|
||||
click() {
|
||||
setValue("enterprise-or-normal", "?auth=1");
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "MS 365 with Personal Account",
|
||||
message:
|
||||
"MS 365 will now open with your Personal Account.\n\nPlease restart the app to apply the changes.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
},
|
||||
checked: getValue("enterprise-or-normal") === "?auth=1",
|
||||
},
|
||||
{
|
||||
label: "Open MS 365 with Work/School Account",
|
||||
type: "radio",
|
||||
click() {
|
||||
setValue("enterprise-or-normal", "?auth=2");
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "MS 365 with Work/School Account",
|
||||
message:
|
||||
"MS 365 will now open with your Work/School account.\n\nPlease restart the app to apply the changes.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
},
|
||||
checked: getValue("enterprise-or-normal") === "?auth=2",
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Open Websites in New Windows",
|
||||
type: "radio",
|
||||
@@ -295,37 +263,6 @@ const commonPreferencesSubmenu = [
|
||||
],
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Enable Discord RPC",
|
||||
type: "checkbox",
|
||||
click: () => {
|
||||
if (getValue("discordrpcstatus") === "true") {
|
||||
setValue("discordrpcstatus", "false");
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "Discord RPC",
|
||||
message: "Discord RPC has been disabled.",
|
||||
buttons: ["OK"],
|
||||
});
|
||||
clearActivity();
|
||||
return;
|
||||
} else if (
|
||||
getValue("discordrpcstatus") === "false" ||
|
||||
getValue("discordrpcstatus") === undefined
|
||||
) {
|
||||
setValue("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: getValue("discordrpcstatus") === "true",
|
||||
},
|
||||
{
|
||||
label: "Enable Auto Updates",
|
||||
type: "checkbox",
|
||||
@@ -425,20 +362,6 @@ const commonPreferencesSubmenu = [
|
||||
},
|
||||
checked: getValue("blockadsandtrackers") === "true",
|
||||
},
|
||||
{
|
||||
label: "Open External Links in Default Browser",
|
||||
type: "checkbox",
|
||||
click: () => {
|
||||
setValue("externalLinks", getValue("externalLinks") === "true" ? "false" : "true");
|
||||
dialog.showMessageBoxSync({
|
||||
type: "info",
|
||||
title: "External Links in Default Browser",
|
||||
message: `External links will now open in ${getValue("externalLinks") === "true" ? "your default browser" : "MS-365-Electron"}`,
|
||||
buttons: ["OK"],
|
||||
});
|
||||
},
|
||||
checked: getValue("externalLinks") === "true",
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Windows User-Agent String",
|
||||
@@ -488,25 +411,6 @@ const menulayout = [
|
||||
submenu: [
|
||||
...(process.platform === "darwin"
|
||||
? [
|
||||
{
|
||||
label: "About MS-365-Electron",
|
||||
click: async () => {
|
||||
await openExternalLink("https://github.com/DaanSelen/MS-365-Electron");
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Check for Updates",
|
||||
click: async () => {
|
||||
await checkForUpdates();
|
||||
},
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Open Logs Folder",
|
||||
click: async () => {
|
||||
await openLogsFolder();
|
||||
},
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Preferences",
|
||||
@@ -521,25 +425,6 @@ const menulayout = [
|
||||
{ label: "Quit MS-365-Electron", role: "quit" },
|
||||
]
|
||||
: [
|
||||
{
|
||||
label: "About MS-365-Electron",
|
||||
click: async () => {
|
||||
await openExternalLink("https://github.com/DaanSelen/MS-365-Electron");
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Check for Updates...",
|
||||
click: async () => {
|
||||
await checkForUpdates();
|
||||
},
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Open Logs Folder",
|
||||
click: async () => {
|
||||
await openLogsFolder();
|
||||
},
|
||||
},
|
||||
{ type: "separator" },
|
||||
...commonPreferencesSubmenu,
|
||||
]),
|
||||
@@ -548,39 +433,6 @@ const menulayout = [
|
||||
{
|
||||
label: "File",
|
||||
submenu: [
|
||||
{
|
||||
label: "New Window (Personal)",
|
||||
accelerator: "CmdOrCtrl+N",
|
||||
click: () => {
|
||||
let newWindow = new BrowserWindow({
|
||||
width: Math.round(getScreenWidth() * (getValue("windowWidth") - 0.07)),
|
||||
height: Math.round(getScreenHeight() * (getValue("windowHeight") - 0.07)),
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
devTools: true,
|
||||
partition: "persist:personal",
|
||||
},
|
||||
});
|
||||
newWindow.loadURL(`https://microsoft365.com/${getValue("custompage")}/?auth=1`);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "New Window (Work/School)",
|
||||
accelerator: "CmdOrCtrl+Shift+N",
|
||||
click: () => {
|
||||
let newWindow = new BrowserWindow({
|
||||
width: Math.round(getScreenWidth() * (getValue("windowWidth") - 0.07)),
|
||||
height: Math.round(getScreenHeight() * (getValue("windowHeight") - 0.07)),
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
devTools: true,
|
||||
partition: "persist:work",
|
||||
},
|
||||
});
|
||||
newWindow.loadURL(`https://microsoft365.com/${getValue("custompage")}/?auth=2`);
|
||||
},
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Close Window",
|
||||
accelerator: "CmdOrCtrl+W",
|
||||
@@ -602,14 +454,6 @@ const menulayout = [
|
||||
},
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Copy URL to Clipboard",
|
||||
accelerator: "CmdOrCtrl+Shift+C",
|
||||
click: () => {
|
||||
const url = BrowserWindow.getFocusedWindow().webContents.getURL();
|
||||
clipboard.writeText(url);
|
||||
},
|
||||
},
|
||||
...(process.platform === "darwin"
|
||||
? [
|
||||
{
|
||||
@@ -822,158 +666,6 @@ const menulayout = [
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Outlook",
|
||||
click: () => {
|
||||
if (getValue("enterprise-or-normal") === "?auth=2") {
|
||||
if (getValue("websites-in-new-window") === "true") {
|
||||
let outlookwindow = new BrowserWindow({
|
||||
width: Math.round(getScreenWidth() * (getValue("windowWidth") - 0.07)),
|
||||
height: Math.round(getScreenHeight() * (getValue("windowHeight") - 0.07)),
|
||||
webPreferences: {
|
||||
nodeIntegration: false,
|
||||
contextIsolation: true,
|
||||
partition: "persist:work",
|
||||
},
|
||||
});
|
||||
outlookwindow.loadURL("https://outlook.office.com/mail/");
|
||||
} else {
|
||||
BrowserWindow.getFocusedWindow().loadURL("https://outlook.office.com/mail/");
|
||||
}
|
||||
} else if (getValue("enterprise-or-normal") === "?auth=1") {
|
||||
if (getValue("websites-in-new-window") === "true") {
|
||||
let outlookwindow = new BrowserWindow({
|
||||
width: Math.round(getScreenWidth() * (getValue("windowWidth") - 0.07)),
|
||||
height: Math.round(getScreenHeight() * (getValue("windowHeight") - 0.07)),
|
||||
webPreferences: {
|
||||
nodeIntegration: false,
|
||||
contextIsolation: true,
|
||||
partition: "persist:personal",
|
||||
},
|
||||
});
|
||||
outlookwindow.loadURL("https://office.live.com/start/Outlook.aspx");
|
||||
} else {
|
||||
BrowserWindow.getFocusedWindow().loadURL(
|
||||
"https://office.live.com/start/Outlook.aspx"
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "OneDrive",
|
||||
click: () => {
|
||||
if (getValue("enterprise-or-normal") === "?auth=2") {
|
||||
if (getValue("websites-in-new-window") === "true") {
|
||||
let onedrivewindow = new BrowserWindow({
|
||||
width: Math.round(getScreenWidth() * (getValue("windowWidth") - 0.07)),
|
||||
height: Math.round(getScreenHeight() * (getValue("windowHeight") - 0.07)),
|
||||
webPreferences: {
|
||||
nodeIntegration: false,
|
||||
contextIsolation: true,
|
||||
partition: "persist:work",
|
||||
},
|
||||
});
|
||||
onedrivewindow.loadURL("https://microsoft365.com/launch/onedrive?auth=2");
|
||||
} else {
|
||||
BrowserWindow.getFocusedWindow().loadURL(
|
||||
"https://microsoft365.com/launch/onedrive?auth=2"
|
||||
);
|
||||
}
|
||||
} else if (getValue("enterprise-or-normal") === "?auth=1") {
|
||||
if (getValue("websites-in-new-window") === "true") {
|
||||
let onedrivewindow = new BrowserWindow({
|
||||
width: Math.round(getScreenWidth() * (getValue("windowWidth") - 0.07)),
|
||||
height: Math.round(getScreenHeight() * (getValue("windowHeight") - 0.07)),
|
||||
webPreferences: {
|
||||
nodeIntegration: false,
|
||||
contextIsolation: true,
|
||||
partition: "persist:personal",
|
||||
},
|
||||
});
|
||||
onedrivewindow.loadURL("https://microsoft365.com/launch/onedrive?auth=1");
|
||||
} else {
|
||||
BrowserWindow.getFocusedWindow().loadURL(
|
||||
"https://microsoft365.com/launch/onedrive?auth=1"
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "OneNote",
|
||||
click: () => {
|
||||
if (getValue("enterprise-or-normal") === "?auth=2") {
|
||||
if (getValue("websites-in-new-window") === "true") {
|
||||
let onenotewindow = new BrowserWindow({
|
||||
width: Math.round(getScreenWidth() * (getValue("windowWidth") - 0.07)),
|
||||
height: Math.round(getScreenHeight() * (getValue("windowHeight") - 0.07)),
|
||||
webPreferences: {
|
||||
nodeIntegration: false,
|
||||
contextIsolation: true,
|
||||
partition: "persist:work",
|
||||
},
|
||||
});
|
||||
onenotewindow.loadURL("https://www.microsoft365.com/launch/onenote?auth=2");
|
||||
} else {
|
||||
BrowserWindow.getFocusedWindow().loadURL(
|
||||
"https://www.microsoft365.com/launch/onenote?auth=2"
|
||||
);
|
||||
}
|
||||
} else if (getValue("enterprise-or-normal") === "?auth=1") {
|
||||
if (getValue("websites-in-new-window") === "true") {
|
||||
let onenotewindow = new BrowserWindow({
|
||||
width: Math.round(getScreenWidth() * (getValue("windowWidth") - 0.07)),
|
||||
height: Math.round(getScreenHeight() * (getValue("windowHeight") - 0.07)),
|
||||
webPreferences: {
|
||||
nodeIntegration: false,
|
||||
contextIsolation: true,
|
||||
partition: "persist:personal",
|
||||
},
|
||||
});
|
||||
onenotewindow.loadURL("https://www.onenote.com/notebooks?auth=1");
|
||||
} else {
|
||||
BrowserWindow.getFocusedWindow().loadURL("https://www.onenote.com/notebooks?auth=1");
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "All Apps",
|
||||
click: () => {
|
||||
if (getValue("enterprise-or-normal") === "?auth=2") {
|
||||
if (getValue("websites-in-new-window") === "true") {
|
||||
let allappswindow = new BrowserWindow({
|
||||
width: Math.round(getScreenWidth() * (getValue("windowWidth") - 0.07)),
|
||||
height: Math.round(getScreenHeight() * (getValue("windowHeight") - 0.07)),
|
||||
webPreferences: {
|
||||
nodeIntegration: false,
|
||||
contextIsolation: true,
|
||||
partition: "persist:work",
|
||||
},
|
||||
});
|
||||
allappswindow.loadURL("https://www.microsoft365.com/apps?auth=2");
|
||||
} else {
|
||||
BrowserWindow.getFocusedWindow().loadURL("https://www.microsoft365.com/apps?auth=2");
|
||||
}
|
||||
} else if (getValue("enterprise-or-normal") === "?auth=1") {
|
||||
if (getValue("websites-in-new-window") === "true") {
|
||||
let allappswindow = new BrowserWindow({
|
||||
width: Math.round(getScreenWidth() * (getValue("windowWidth") - 0.07)),
|
||||
height: Math.round(getScreenHeight() * (getValue("windowHeight") - 0.07)),
|
||||
webPreferences: {
|
||||
nodeIntegration: false,
|
||||
contextIsolation: true,
|
||||
partition: "persist:personal",
|
||||
},
|
||||
});
|
||||
allappswindow.loadURL("https://www.microsoft365.com/apps?auth=1");
|
||||
} else {
|
||||
BrowserWindow.getFocusedWindow().loadURL("https://www.microsoft365.com/apps?auth=1");
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
import { dialog, BrowserWindow } from "electron";
|
||||
import { Client } from "@xhayper/discord-rpc";
|
||||
import { setValue } from "./store.js";
|
||||
|
||||
const client = new Client({
|
||||
clientId: "942637872530460742",
|
||||
});
|
||||
|
||||
export async function rpcError(status) {
|
||||
const rpcerror = dialog.showMessageBoxSync(BrowserWindow.getFocusedWindow(), {
|
||||
type: "error",
|
||||
title: "Discord RPC Error",
|
||||
message: `Oops! An Error occured while ${status} Discord RPC.`,
|
||||
buttons: ["Close", "Disable Discord RPC"],
|
||||
});
|
||||
|
||||
if (rpcerror === 1) {
|
||||
setValue("discordrpcstatus", "false");
|
||||
}
|
||||
}
|
||||
|
||||
export async function clearActivity() {
|
||||
await client.user?.clearActivity().catch((err) => {
|
||||
rpcError("clearing");
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
|
||||
export 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) => {
|
||||
rpcError("setting");
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
|
||||
export async function loginToRPC() {
|
||||
await client.login().catch((err) => {
|
||||
rpcError("logging into");
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
@@ -20,9 +20,9 @@ export function getValueOrDefault(key, defaultValue) {
|
||||
return value;
|
||||
}
|
||||
|
||||
getValueOrDefault("enterprise-or-normal", "?auth=1");
|
||||
getValueOrDefault("websites-in-new-window", "true");
|
||||
getValueOrDefault("autohide-menubar", "false");
|
||||
getValueOrDefault("enterprise-or-normal", "?auth=2");
|
||||
getValueOrDefault("websites-in-new-window", "false");
|
||||
getValueOrDefault("autohide-menubar", "true");
|
||||
getValueOrDefault("useragentstring", useragents.Windows);
|
||||
getValueOrDefault("discordrpcstatus", "false");
|
||||
getValueOrDefault("blockadsandtrackers", "false");
|
||||
@@ -32,7 +32,7 @@ getValueOrDefault("custompage", "home");
|
||||
getValueOrDefault("windowWidth", 0.71);
|
||||
getValueOrDefault("windowHeight", 0.74);
|
||||
getValueOrDefault("customWindowSize", false);
|
||||
getValueOrDefault("externalLinks", "true");
|
||||
getValueOrDefault("externalLinks", "false");
|
||||
|
||||
if (getValue("enterprise-or-normal") === "https://microsoft365.com/?auth=1") {
|
||||
setValue("enterprise-or-normal", "?auth=1");
|
||||
|
||||
46
app/main.js
@@ -1,12 +1,11 @@
|
||||
import { app, Menu, BrowserWindow, dialog, nativeImage, shell } from "electron";
|
||||
import { clearActivity, setActivity, loginToRPC } from "./config/rpc.js";
|
||||
import { ElectronBlocker } from "@ghostery/adblocker-electron";
|
||||
import { setValue, getValue } from "./config/store.js";
|
||||
import { getValue } from "./config/store.js";
|
||||
import { dirname, join } from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
|
||||
import { getScreenWidth, getScreenHeight } from "./config/dimensions.js";
|
||||
import Windows from "./useragents.json" with { type: "json" };
|
||||
import Windows from "./useragents.json" with { type: "json" }
|
||||
import checkInternetConnected from "check-internet-connected";
|
||||
import domains from "./domains.json" with { type: "json" };
|
||||
import contextMenu from "electron-context-menu";
|
||||
@@ -62,13 +61,15 @@ function createWindow() {
|
||||
win.webContents.on("did-finish-load", () => {
|
||||
splash.destroy();
|
||||
win.show();
|
||||
if (getValue("discordrpcstatus") === "true") {
|
||||
setActivity(`On "${win.webContents.getTitle()}"`);
|
||||
}
|
||||
if (getValue("blockadsandtrackers") === "true") {
|
||||
ElectronBlocker.fromPrebuiltAdsAndTracking(fetch).then((blocker) => {
|
||||
// Only enable if not already enabled
|
||||
try {
|
||||
blocker.enableBlockingInSession(win.webContents.session);
|
||||
});
|
||||
} catch (e) {
|
||||
console.warn("Adblocker already enabled for this session");
|
||||
}
|
||||
}).catch(console.error);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -128,14 +129,8 @@ app.on("web-contents-created", (event, contents) => {
|
||||
if (getValue("websites-in-new-window") === "false") {
|
||||
if (url.includes("page=Download")) return { action: "allow" };
|
||||
BrowserWindow.getFocusedWindow().loadURL(url).catch();
|
||||
if (getValue("discordrpcstatus") === "true") {
|
||||
setActivity(`On "${BrowserWindow.getFocusedWindow().webContents.getTitle()}"`);
|
||||
}
|
||||
return { action: "deny" };
|
||||
} else {
|
||||
if (getValue("discordrpcstatus") === "true") {
|
||||
setActivity(`On "${BrowserWindow.getFocusedWindow().webContents.getTitle()}"`);
|
||||
}
|
||||
return {
|
||||
action: "allow",
|
||||
overrideBrowserWindowOptions: {
|
||||
@@ -155,14 +150,8 @@ app.on("web-contents-created", (event, contents) => {
|
||||
if (getValue("websites-in-new-window") === "false") {
|
||||
if (url.includes("page=Download")) return { action: "allow" };
|
||||
BrowserWindow.getFocusedWindow().loadURL(url).catch();
|
||||
if (getValue("discordrpcstatus") === "true") {
|
||||
setActivity(`On "${BrowserWindow.getFocusedWindow().webContents.getTitle()}"`);
|
||||
}
|
||||
return { action: "deny" };
|
||||
} else {
|
||||
if (getValue("discordrpcstatus") === "true") {
|
||||
setActivity(`On "${BrowserWindow.getFocusedWindow().webContents.getTitle()}"`);
|
||||
}
|
||||
return {
|
||||
action: "allow",
|
||||
overrideBrowserWindowOptions: {
|
||||
@@ -346,15 +335,15 @@ app.on("browser-window-created", (event, window) => {
|
||||
} else {
|
||||
window.setAutoHideMenuBar(false);
|
||||
}
|
||||
window.webContents.on("did-finish-load", () => {
|
||||
if (getValue("discordrpcstatus") === "true") {
|
||||
setActivity(`On "${window.webContents.getTitle()}"`);
|
||||
}
|
||||
});
|
||||
if (getValue("blockadsandtrackers") === "true") {
|
||||
ElectronBlocker.fromPrebuiltAdsAndTracking(fetch).then((blocker) => {
|
||||
blocker.enableBlockingInSession(window.webContents.session);
|
||||
});
|
||||
// Only enable if not already enabled
|
||||
try {
|
||||
blocker.enableBlockingInSession(win.webContents.session);
|
||||
} catch (e) {
|
||||
console.warn("Adblocker already enabled for this session");
|
||||
}
|
||||
}).catch(console.error);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -365,7 +354,6 @@ app.on("window-all-closed", () => {
|
||||
if (process.platform === "darwin") {
|
||||
app.dock.setIcon(null);
|
||||
}
|
||||
clearActivity();
|
||||
});
|
||||
|
||||
app.on("activate", () => {
|
||||
@@ -392,8 +380,4 @@ app.on("ready", function () {
|
||||
if (getValue("autoupdater") === "true") {
|
||||
autoUpdater.checkForUpdatesAndNotify();
|
||||
}
|
||||
if (getValue("discordrpcstatus") === "true") {
|
||||
loginToRPC();
|
||||
setActivity(`Opening Microsoft 365...`);
|
||||
}
|
||||
});
|
||||
|
||||
2
build.sh
@@ -1 +1 @@
|
||||
NODE_OPTIONS=--no-deprecation npm run build
|
||||
NODE_OPTIONS=--no-deprecation yarn build
|
||||
|
||||
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 12 KiB |
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="/favicons/mstile-150x150.png"/>
|
||||
<TileColor>#603cba</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 13 KiB |
@@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||
width="1024.000000pt" height="1024.000000pt" viewBox="0 0 1024.000000 1024.000000"
|
||||
preserveAspectRatio="xMidYMid meet">
|
||||
<metadata>
|
||||
Created by potrace 1.14, written by Peter Selinger 2001-2017
|
||||
</metadata>
|
||||
<g transform="translate(0.000000,1024.000000) scale(0.100000,-0.100000)"
|
||||
fill="#000000" stroke="none">
|
||||
<path d="M4958 9915 c-2 -2 -32 -6 -67 -9 -35 -3 -73 -8 -85 -11 -11 -3 -32
|
||||
-7 -46 -9 -14 -3 -36 -8 -50 -11 -14 -3 -37 -7 -51 -10 -116 -21 -360 -121
|
||||
-534 -219 -22 -12 -85 -46 -140 -75 -55 -30 -113 -61 -130 -71 -16 -9 -70 -39
|
||||
-120 -65 -49 -27 -108 -58 -130 -70 -64 -36 -273 -148 -360 -195 -44 -23 -102
|
||||
-55 -130 -70 -27 -15 -77 -42 -110 -60 -33 -18 -114 -62 -180 -98 -66 -35
|
||||
-149 -81 -185 -100 -36 -19 -92 -49 -125 -67 -179 -97 -199 -108 -415 -225
|
||||
-63 -34 -153 -83 -200 -108 -47 -25 -120 -65 -164 -89 -43 -23 -80 -43 -81
|
||||
-43 -6 0 -141 -84 -189 -118 -292 -202 -527 -490 -673 -827 -27 -60 -91 -254
|
||||
-98 -295 -3 -17 -12 -62 -20 -101 -8 -39 -19 -101 -23 -138 -9 -87 -9 -3325 0
|
||||
-3416 53 -496 309 -965 701 -1283 133 -108 217 -158 752 -446 39 -21 122 -66
|
||||
185 -99 63 -33 129 -69 145 -78 17 -10 50 -28 75 -40 25 -13 74 -39 110 -59
|
||||
36 -21 101 -56 145 -80 213 -114 226 -121 368 -199 28 -15 88 -47 132 -71 44
|
||||
-24 127 -69 185 -100 58 -32 141 -77 185 -100 79 -42 274 -147 370 -200 211
|
||||
-115 300 -160 380 -193 105 -43 250 -89 318 -101 15 -2 35 -7 45 -10 22 -6 81
|
||||
-15 167 -25 76 -9 401 -6 450 3 17 4 68 13 115 22 255 46 371 96 904 384 l69
|
||||
38 76 -62 c221 -178 510 -317 773 -372 259 -54 480 -63 706 -30 130 20 123 18
|
||||
244 50 634 167 1143 667 1301 1276 43 167 51 234 52 430 0 261 -32 423 -132
|
||||
662 -37 89 -42 110 -33 128 32 60 106 293 123 390 7 37 17 91 24 125 10 50 12
|
||||
3363 2 3445 -19 152 -77 394 -114 475 -8 16 -24 55 -35 85 -54 139 -199 369
|
||||
-315 499 -166 186 -334 318 -565 444 -30 16 -102 56 -160 87 -101 55 -164 89
|
||||
-315 170 -38 21 -144 78 -235 127 -91 50 -194 106 -230 125 -36 19 -101 55
|
||||
-145 79 -152 82 -180 98 -250 134 -60 32 -309 167 -470 255 -27 15 -90 49
|
||||
-140 75 -49 26 -103 56 -120 65 -16 10 -66 37 -110 60 -44 24 -102 55 -130 70
|
||||
-240 132 -367 194 -485 237 -68 25 -265 77 -338 88 -23 4 -54 9 -70 12 -30 5
|
||||
-399 13 -404 8z m412 -3180 c52 -7 106 -16 120 -19 14 -3 36 -8 50 -11 163
|
||||
-31 303 -90 748 -313 l434 -217 -5 -605 c-2 -333 -6 -614 -9 -625 -3 -11 -9
|
||||
-40 -13 -65 -14 -84 -16 -95 -36 -173 -125 -492 -442 -913 -888 -1181 -52 -31
|
||||
-95 -56 -97 -56 -2 0 -68 -35 -146 -78 -79 -43 -188 -103 -243 -132 -55 -29
|
||||
-108 -58 -117 -64 -20 -12 -43 -2 -288 136 -62 34 -134 74 -280 153 -344 188
|
||||
-568 385 -760 671 -48 70 -148 257 -177 329 -42 105 -95 288 -107 369 -4 21
|
||||
-9 48 -11 60 -15 61 -17 136 -22 647 -5 542 -4 557 15 595 19 37 39 49 434
|
||||
246 420 211 550 265 719 303 193 42 490 56 679 30z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.8 KiB |
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"name": "MS-365-Electron",
|
||||
"short_name": "MS-365-Electron",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/favicons/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/favicons/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#ffffff",
|
||||
"display": "standalone"
|
||||
}
|
||||
181
docs/index.css
@@ -1,181 +0,0 @@
|
||||
body {
|
||||
margin: 0;
|
||||
line-height: normal;
|
||||
background: linear-gradient(-72.79deg, #fec9f9, #ffdbfd 0.01%, #ecfdff 64.06%);
|
||||
background-size: auto;
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "San Francisco";
|
||||
font-weight: 400;
|
||||
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-regular-webfont.woff");
|
||||
}
|
||||
|
||||
:root {
|
||||
--font-san-francisco: "San Francisco";
|
||||
--font-poppins: Poppins;
|
||||
--font-size-sm: 14px;
|
||||
--color-aliceblue-100: #f3f8ff;
|
||||
--br-5xs: 8px;
|
||||
--color-download: #00a7ff;
|
||||
--color-github: #333;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
max-width: 1200px;
|
||||
padding: 20px;
|
||||
font-family: var(--font-poppins);
|
||||
}
|
||||
|
||||
.ms-365-electron {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
width: 50%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.heading {
|
||||
font-size: 85px;
|
||||
line-height: 90px;
|
||||
color: #292e37;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.byagam778 {
|
||||
font-size: 38px;
|
||||
line-height: 50px;
|
||||
font-family: 'SF Pro Text',-apple-system,BlinkMacSystemFont,var(--font-san-francisco);
|
||||
color: #00acff;
|
||||
cursor: pointer;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.description {
|
||||
font-size: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.download,
|
||||
.github {
|
||||
cursor: pointer;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
border-radius: var(--br-5xs);
|
||||
width: 190px;
|
||||
height: 62px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.5ms ease;
|
||||
}
|
||||
|
||||
.download {
|
||||
background: linear-gradient(90.05deg, #45bfff 26.58%, var(--color-download));
|
||||
box-shadow: 0 24px 30px -16px rgba(45, 183, 255, 0.25);
|
||||
}
|
||||
|
||||
.github {
|
||||
background: linear-gradient(90.05deg, #424242 26.58%, var(--color-github));
|
||||
box-shadow: 0 24px 30px -16px rgba(66, 66, 66, 0.25);
|
||||
}
|
||||
|
||||
.download:hover {
|
||||
background: transparent;
|
||||
border: 3px solid var(--color-download);
|
||||
color: black;
|
||||
}
|
||||
|
||||
.github:hover {
|
||||
background: transparent;
|
||||
border: 3px solid var(--color-github);
|
||||
color: black;
|
||||
}
|
||||
|
||||
.download-now {
|
||||
font-size: var(--font-size-sm);
|
||||
line-height: 19px;
|
||||
font-weight: 600;
|
||||
color: var(--color-aliceblue-100);
|
||||
transition: color 0.5s ease;
|
||||
}
|
||||
|
||||
.download:hover .download-now,
|
||||
.github:hover .download-now {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.preview-icon {
|
||||
width: 50%;
|
||||
max-width: 708px;
|
||||
height: auto;
|
||||
object-fit: cover;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.container {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.preview-icon {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.ms-365-electron {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.heading {
|
||||
font-size: 30px;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.byagam778 {
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.description {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.download,
|
||||
.github {
|
||||
width: 160px;
|
||||
height: 54px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.download-now {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="initial-scale=1, width=device-width" />
|
||||
<title>MS-365-Electron</title>
|
||||
<link rel="stylesheet" href="./index.css" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="./favicons/apple-touch-icon.png" />
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="./favicons/favicon-32x32.png" />
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="./favicons/favicon-16x16.png" />
|
||||
<link rel="manifest" href="./favicons/site.webmanifest" />
|
||||
<link rel="mask-icon" href="./favicons/safari-pinned-tab.svg" color="#5bbad5" />
|
||||
<link rel="shortcut icon" href="./favicons/favicon.ico" />
|
||||
<meta name="apple-mobile-web-app-title" content="MS-365-Electron" />
|
||||
<meta name="application-name" content="MS-365-Electron" />
|
||||
<meta name="msapplication-TileColor" content="#603cba" />
|
||||
<meta name="msapplication-config" content="./favicons/browserconfig.xml" />
|
||||
<meta name="theme-color" content="#ffffff" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css2?family=Seaweed Script:wght@400&display=swap"
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="ms-365-electron">
|
||||
<div class="byagam778" id="byagam778">By @agam778</div>
|
||||
<div class="heading">MS-365-Electron</div>
|
||||
<div class="description">
|
||||
Unofficial Microsoft 365 Web Desktop Wrapper made with Electron
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button class="download" id="download">
|
||||
<div class="download-now">
|
||||
Download Now:
|
||||
<div id="release-tag"></div>
|
||||
</div>
|
||||
</button>
|
||||
<button class="github" id="gitHub">
|
||||
<div class="download-now">View on GitHub</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<img class="preview-icon" alt="" src="./public/preview.png" />
|
||||
</div>
|
||||
|
||||
<script src="./index.js"></script>
|
||||
<script>
|
||||
var download = document.getElementById("download");
|
||||
if (download) {
|
||||
download.addEventListener("click", function () {
|
||||
window.open("https://DaanSelen/MS-365-Electron/releases");
|
||||
});
|
||||
}
|
||||
|
||||
var gitHub = document.getElementById("gitHub");
|
||||
if (gitHub) {
|
||||
gitHub.addEventListener("click", function () {
|
||||
window.open("https://DaanSelen/MS-365-Electron/");
|
||||
});
|
||||
}
|
||||
|
||||
var byagam778 = document.getElementById("byagam778");
|
||||
if (byagam778) {
|
||||
byagam778.addEventListener("click", function () {
|
||||
window.open("https://github.com/agam778");
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,14 +0,0 @@
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
const releaseTagElement = document.getElementById("release-tag");
|
||||
|
||||
fetch("https://api.github.com/repos/DaanSelen/MS-365-Electron/releases/latest")
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
const latestTag = data.tag_name;
|
||||
releaseTagElement.textContent = `${latestTag}`;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Error:", error);
|
||||
releaseTagElement.textContent = "Failed to fetch release tag";
|
||||
});
|
||||
});
|
||||
@@ -1,32 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Loading MS-365-Electron</title>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"
|
||||
/>
|
||||
<link rel="stylesheet" href="./style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="particles-background" class="vertical-centered-box"></div>
|
||||
<div id="particles-foreground" class="vertical-centered-box"></div>
|
||||
|
||||
<div class="vertical-centered-box">
|
||||
<div class="content">
|
||||
<div class="loader-circle"></div>
|
||||
<div class="loader-line-mask">
|
||||
<div class="loader-line"></div>
|
||||
</div>
|
||||
<img
|
||||
width="50px"
|
||||
height="auto"
|
||||
viewBox="0 0 36 24"
|
||||
src="https://DaanSelen/MS-365-Electron/raw/main/assets/icon.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<script src="./script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,352 +0,0 @@
|
||||
/*!
|
||||
* Particleground
|
||||
*
|
||||
* @author Jonathan Nicol - @mrjnicol
|
||||
* @version 1.1.0
|
||||
* @description Creates a canvas based particle system background
|
||||
*
|
||||
* Inspired by http://requestlab.fr/ and http://disruptivebydesign.com/
|
||||
*/
|
||||
!(function (a, b) {
|
||||
"use strict";
|
||||
function c(a) {
|
||||
a = a || {};
|
||||
for (var b = 1; b < arguments.length; b++) {
|
||||
var c = arguments[b];
|
||||
if (c)
|
||||
for (var d in c)
|
||||
c.hasOwnProperty(d) && ("object" == typeof c[d] ? deepExtend(a[d], c[d]) : (a[d] = c[d]));
|
||||
}
|
||||
return a;
|
||||
}
|
||||
function d(d, g) {
|
||||
function h() {
|
||||
if (y) {
|
||||
(r = b.createElement("canvas")),
|
||||
(r.className = "pg-canvas"),
|
||||
(r.style.display = "block"),
|
||||
d.insertBefore(r, d.firstChild),
|
||||
(s = r.getContext("2d")),
|
||||
i();
|
||||
for (var c = Math.round((r.width * r.height) / g.density), e = 0; c > e; e++) {
|
||||
var f = new n();
|
||||
f.setStackPos(e), z.push(f);
|
||||
}
|
||||
a.addEventListener(
|
||||
"resize",
|
||||
function () {
|
||||
k();
|
||||
},
|
||||
!1
|
||||
),
|
||||
b.addEventListener(
|
||||
"mousemove",
|
||||
function (a) {
|
||||
(A = a.pageX), (B = a.pageY);
|
||||
},
|
||||
!1
|
||||
),
|
||||
D &&
|
||||
!C &&
|
||||
a.addEventListener(
|
||||
"deviceorientation",
|
||||
function () {
|
||||
(F = Math.min(Math.max(-event.beta, -30), 30)),
|
||||
(E = Math.min(Math.max(-event.gamma, -30), 30));
|
||||
},
|
||||
!0
|
||||
),
|
||||
j(),
|
||||
q("onInit");
|
||||
}
|
||||
}
|
||||
function i() {
|
||||
(r.width = d.offsetWidth),
|
||||
(r.height = d.offsetHeight),
|
||||
(s.fillStyle = g.dotColor),
|
||||
(s.strokeStyle = g.lineColor),
|
||||
(s.lineWidth = g.lineWidth);
|
||||
}
|
||||
function j() {
|
||||
if (y) {
|
||||
(u = a.innerWidth), (v = a.innerHeight), s.clearRect(0, 0, r.width, r.height);
|
||||
for (var b = 0; b < z.length; b++) z[b].updatePosition();
|
||||
for (var b = 0; b < z.length; b++) z[b].draw();
|
||||
G || (t = requestAnimationFrame(j));
|
||||
}
|
||||
}
|
||||
function k() {
|
||||
i();
|
||||
for (var a = d.offsetWidth, b = d.offsetHeight, c = z.length - 1; c >= 0; c--)
|
||||
(z[c].position.x > a || z[c].position.y > b) && z.splice(c, 1);
|
||||
var e = Math.round((r.width * r.height) / g.density);
|
||||
if (e > z.length)
|
||||
for (; e > z.length; ) {
|
||||
var f = new n();
|
||||
z.push(f);
|
||||
}
|
||||
else e < z.length && z.splice(e);
|
||||
for (c = z.length - 1; c >= 0; c--) z[c].setStackPos(c);
|
||||
}
|
||||
function l() {
|
||||
G = !0;
|
||||
}
|
||||
function m() {
|
||||
(G = !1), j();
|
||||
}
|
||||
function n() {
|
||||
switch (
|
||||
(this.stackPos,
|
||||
(this.active = !0),
|
||||
(this.layer = Math.ceil(3 * Math.random())),
|
||||
(this.parallaxOffsetX = 0),
|
||||
(this.parallaxOffsetY = 0),
|
||||
(this.position = {
|
||||
x: Math.ceil(Math.random() * r.width),
|
||||
y: Math.ceil(Math.random() * r.height),
|
||||
}),
|
||||
(this.speed = {}),
|
||||
g.directionX)
|
||||
) {
|
||||
case "left":
|
||||
this.speed.x = +(-g.maxSpeedX + Math.random() * g.maxSpeedX - g.minSpeedX).toFixed(2);
|
||||
break;
|
||||
case "right":
|
||||
this.speed.x = +(Math.random() * g.maxSpeedX + g.minSpeedX).toFixed(2);
|
||||
break;
|
||||
default:
|
||||
(this.speed.x = +(-g.maxSpeedX / 2 + Math.random() * g.maxSpeedX).toFixed(2)),
|
||||
(this.speed.x += this.speed.x > 0 ? g.minSpeedX : -g.minSpeedX);
|
||||
}
|
||||
switch (g.directionY) {
|
||||
case "up":
|
||||
this.speed.y = +(-g.maxSpeedY + Math.random() * g.maxSpeedY - g.minSpeedY).toFixed(2);
|
||||
break;
|
||||
case "down":
|
||||
this.speed.y = +(Math.random() * g.maxSpeedY + g.minSpeedY).toFixed(2);
|
||||
break;
|
||||
default:
|
||||
(this.speed.y = +(-g.maxSpeedY / 2 + Math.random() * g.maxSpeedY).toFixed(2)),
|
||||
(this.speed.x += this.speed.y > 0 ? g.minSpeedY : -g.minSpeedY);
|
||||
}
|
||||
}
|
||||
function o(a, b) {
|
||||
return b ? void (g[a] = b) : g[a];
|
||||
}
|
||||
function p() {
|
||||
console.log("destroy"),
|
||||
r.parentNode.removeChild(r),
|
||||
q("onDestroy"),
|
||||
f && f(d).removeData("plugin_" + e);
|
||||
}
|
||||
function q(a) {
|
||||
void 0 !== g[a] && g[a].call(d);
|
||||
}
|
||||
var r,
|
||||
s,
|
||||
t,
|
||||
u,
|
||||
v,
|
||||
w,
|
||||
x,
|
||||
y = !!b.createElement("canvas").getContext,
|
||||
z = [],
|
||||
A = 0,
|
||||
B = 0,
|
||||
C = !navigator.userAgent.match(
|
||||
/(iPhone|iPod|iPad|Android|BlackBerry|BB10|mobi|tablet|opera mini|nexus 7)/i
|
||||
),
|
||||
D = !!a.DeviceOrientationEvent,
|
||||
E = 0,
|
||||
F = 0,
|
||||
G = !1;
|
||||
return (
|
||||
(g = c({}, a[e].defaults, g)),
|
||||
(n.prototype.draw = function () {
|
||||
s.beginPath(),
|
||||
s.arc(
|
||||
this.position.x + this.parallaxOffsetX,
|
||||
this.position.y + this.parallaxOffsetY,
|
||||
g.particleRadius / 2,
|
||||
0,
|
||||
2 * Math.PI,
|
||||
!0
|
||||
),
|
||||
s.closePath(),
|
||||
s.fill(),
|
||||
s.beginPath();
|
||||
for (var a = z.length - 1; a > this.stackPos; a--) {
|
||||
var b = z[a],
|
||||
c = this.position.x - b.position.x,
|
||||
d = this.position.y - b.position.y,
|
||||
e = Math.sqrt(c * c + d * d).toFixed(2);
|
||||
e < g.proximity &&
|
||||
(s.moveTo(
|
||||
this.position.x + this.parallaxOffsetX,
|
||||
this.position.y + this.parallaxOffsetY
|
||||
),
|
||||
g.curvedLines
|
||||
? s.quadraticCurveTo(
|
||||
Math.max(b.position.x, b.position.x),
|
||||
Math.min(b.position.y, b.position.y),
|
||||
b.position.x + b.parallaxOffsetX,
|
||||
b.position.y + b.parallaxOffsetY
|
||||
)
|
||||
: s.lineTo(b.position.x + b.parallaxOffsetX, b.position.y + b.parallaxOffsetY));
|
||||
}
|
||||
s.stroke(), s.closePath();
|
||||
}),
|
||||
(n.prototype.updatePosition = function () {
|
||||
if (g.parallax) {
|
||||
if (D && !C) {
|
||||
var a = (u - 0) / 60;
|
||||
w = (E - -30) * a + 0;
|
||||
var b = (v - 0) / 60;
|
||||
x = (F - -30) * b + 0;
|
||||
} else (w = A), (x = B);
|
||||
(this.parallaxTargX = (w - u / 2) / (g.parallaxMultiplier * this.layer)),
|
||||
(this.parallaxOffsetX += (this.parallaxTargX - this.parallaxOffsetX) / 10),
|
||||
(this.parallaxTargY = (x - v / 2) / (g.parallaxMultiplier * this.layer)),
|
||||
(this.parallaxOffsetY += (this.parallaxTargY - this.parallaxOffsetY) / 10);
|
||||
}
|
||||
var c = d.offsetWidth,
|
||||
e = d.offsetHeight;
|
||||
switch (g.directionX) {
|
||||
case "left":
|
||||
this.position.x + this.speed.x + this.parallaxOffsetX < 0 &&
|
||||
(this.position.x = c - this.parallaxOffsetX);
|
||||
break;
|
||||
case "right":
|
||||
this.position.x + this.speed.x + this.parallaxOffsetX > c &&
|
||||
(this.position.x = 0 - this.parallaxOffsetX);
|
||||
break;
|
||||
default:
|
||||
(this.position.x + this.speed.x + this.parallaxOffsetX > c ||
|
||||
this.position.x + this.speed.x + this.parallaxOffsetX < 0) &&
|
||||
(this.speed.x = -this.speed.x);
|
||||
}
|
||||
switch (g.directionY) {
|
||||
case "up":
|
||||
this.position.y + this.speed.y + this.parallaxOffsetY < 0 &&
|
||||
(this.position.y = e - this.parallaxOffsetY);
|
||||
break;
|
||||
case "down":
|
||||
this.position.y + this.speed.y + this.parallaxOffsetY > e &&
|
||||
(this.position.y = 0 - this.parallaxOffsetY);
|
||||
break;
|
||||
default:
|
||||
(this.position.y + this.speed.y + this.parallaxOffsetY > e ||
|
||||
this.position.y + this.speed.y + this.parallaxOffsetY < 0) &&
|
||||
(this.speed.y = -this.speed.y);
|
||||
}
|
||||
(this.position.x += this.speed.x), (this.position.y += this.speed.y);
|
||||
}),
|
||||
(n.prototype.setStackPos = function (a) {
|
||||
this.stackPos = a;
|
||||
}),
|
||||
h(),
|
||||
{ option: o, destroy: p, start: m, pause: l }
|
||||
);
|
||||
}
|
||||
var e = "particleground",
|
||||
f = a.jQuery;
|
||||
(a[e] = function (a, b) {
|
||||
return new d(a, b);
|
||||
}),
|
||||
(a[e].defaults = {
|
||||
minSpeedX: 0.1,
|
||||
maxSpeedX: 0.7,
|
||||
minSpeedY: 0.1,
|
||||
maxSpeedY: 0.7,
|
||||
directionX: "center",
|
||||
directionY: "center",
|
||||
density: 1e4,
|
||||
dotColor: "#666666",
|
||||
lineColor: "#666666",
|
||||
particleRadius: 7,
|
||||
lineWidth: 1,
|
||||
curvedLines: !1,
|
||||
proximity: 100,
|
||||
parallax: !0,
|
||||
parallaxMultiplier: 5,
|
||||
onInit: function () {},
|
||||
onDestroy: function () {},
|
||||
}),
|
||||
f &&
|
||||
(f.fn[e] = function (a) {
|
||||
if ("string" == typeof arguments[0]) {
|
||||
var b,
|
||||
c = arguments[0],
|
||||
g = Array.prototype.slice.call(arguments, 1);
|
||||
return (
|
||||
this.each(function () {
|
||||
f.data(this, "plugin_" + e) &&
|
||||
"function" == typeof f.data(this, "plugin_" + e)[c] &&
|
||||
(b = f.data(this, "plugin_" + e)[c].apply(this, g));
|
||||
}),
|
||||
void 0 !== b ? b : this
|
||||
);
|
||||
}
|
||||
return "object" != typeof a && a
|
||||
? void 0
|
||||
: this.each(function () {
|
||||
f.data(this, "plugin_" + e) || f.data(this, "plugin_" + e, new d(this, a));
|
||||
});
|
||||
});
|
||||
})(window, document),
|
||||
/**
|
||||
* requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
|
||||
* @see: http://paulirish.com/2011/requestanimationframe-for-smart-animating/
|
||||
* @see: http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
|
||||
* @license: MIT license
|
||||
*/ (function () {
|
||||
for (
|
||||
var a = 0, b = ["ms", "moz", "webkit", "o"], c = 0;
|
||||
c < b.length && !window.requestAnimationFrame;
|
||||
++c
|
||||
)
|
||||
(window.requestAnimationFrame = window[b[c] + "RequestAnimationFrame"]),
|
||||
(window.cancelAnimationFrame =
|
||||
window[b[c] + "CancelAnimationFrame"] || window[b[c] + "CancelRequestAnimationFrame"]);
|
||||
window.requestAnimationFrame ||
|
||||
(window.requestAnimationFrame = function (b) {
|
||||
var c = new Date().getTime(),
|
||||
d = Math.max(0, 16 - (c - a)),
|
||||
e = window.setTimeout(function () {
|
||||
b(c + d);
|
||||
}, d);
|
||||
return (a = c + d), e;
|
||||
}),
|
||||
window.cancelAnimationFrame ||
|
||||
(window.cancelAnimationFrame = function (a) {
|
||||
clearTimeout(a);
|
||||
});
|
||||
})();
|
||||
|
||||
particleground(document.getElementById("particles-foreground"), {
|
||||
dotColor: "rgba(255, 255, 255, 1)",
|
||||
lineColor: "rgba(255, 255, 255, 0.05)",
|
||||
minSpeedX: 0.3,
|
||||
maxSpeedX: 0.6,
|
||||
minSpeedY: 0.3,
|
||||
maxSpeedY: 0.6,
|
||||
density: 50000, // One particle every n pixels
|
||||
curvedLines: false,
|
||||
proximity: 250, // How close two dots need to be before they join
|
||||
parallaxMultiplier: 10, // Lower the number is more extreme parallax
|
||||
particleRadius: 4, // Dot size
|
||||
});
|
||||
|
||||
particleground(document.getElementById("particles-background"), {
|
||||
dotColor: "rgba(255, 255, 255, 0.5)",
|
||||
lineColor: "rgba(255, 255, 255, 0.05)",
|
||||
minSpeedX: 0.075,
|
||||
maxSpeedX: 0.15,
|
||||
minSpeedY: 0.075,
|
||||
maxSpeedY: 0.15,
|
||||
density: 30000, // One particle every n pixels
|
||||
curvedLines: false,
|
||||
proximity: 20, // How close two dots need to be before they join
|
||||
parallaxMultiplier: 20, // Lower the number is more extreme parallax
|
||||
particleRadius: 2, // Dot size
|
||||
});
|
||||
@@ -1,102 +0,0 @@
|
||||
body {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
text-rendering: optimizeLegibility;
|
||||
font-family: "proxima-nova-soft", sans-serif;
|
||||
-webkit-user-select: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body .vertical-centered-box {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
body .vertical-centered-box:after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
vertical-align: middle;
|
||||
margin-right: -0.25em;
|
||||
}
|
||||
body .vertical-centered-box .content {
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
text-align: left;
|
||||
font-size: 0;
|
||||
}
|
||||
* {
|
||||
transition: all 0.3s;
|
||||
}
|
||||
body {
|
||||
background: #2c2d44;
|
||||
}
|
||||
.loader-circle {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
border-radius: 50%;
|
||||
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
|
||||
margin-left: -60px;
|
||||
margin-top: -60px;
|
||||
}
|
||||
.loader-line-mask {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
width: 60px;
|
||||
height: 120px;
|
||||
margin-left: -60px;
|
||||
margin-top: -60px;
|
||||
overflow: hidden;
|
||||
transform-origin: 60px 60px;
|
||||
-webkit-mask-image: -webkit-linear-gradient(top, #000000, rgba(0, 0, 0, 0));
|
||||
animation: rotate 1.2s infinite linear;
|
||||
}
|
||||
.loader-line-mask .loader-line {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
border-radius: 50%;
|
||||
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
#particles-background,
|
||||
#particles-foreground {
|
||||
left: -51%;
|
||||
top: -51%;
|
||||
width: 202%;
|
||||
height: 202%;
|
||||
transform: scale3d(0.5, 0.5, 1);
|
||||
}
|
||||
#particles-background {
|
||||
background: #2c2d44;
|
||||
background-image: -moz-linear-gradient(45deg, #3f3251 2%, #002025 100%);
|
||||
background-image: -webkit-linear-gradient(45deg, #3f3251 2%, #002025 100%);
|
||||
background-image: linear-gradient(45deg, #3f3251 2%, #002025 100%);
|
||||
}
|
||||
@keyframes rotate {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@keyframes fade {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.25;
|
||||
}
|
||||
}
|
||||
@keyframes fade-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 593 KiB |
38
package.json
@@ -1,28 +1,29 @@
|
||||
{
|
||||
"private": true,
|
||||
"resolutions": {
|
||||
"@electron/node-gyp": "https://github.com/electron/node-gyp.git"
|
||||
},
|
||||
"name": "ms-365-electron",
|
||||
"version": "2.1.1",
|
||||
"name": "ms365-electron",
|
||||
"version": "0.1.0",
|
||||
"type": "module",
|
||||
"description": "Unofficial Microsoft 365 Web Desktop Wrapper made with Electron",
|
||||
"description": "Systemec Microsoft 365 Web Desktop Wrapper made with Electron",
|
||||
"main": "./app/main.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DaanSelen/MS-365-Electron.git"
|
||||
"url": "https://github.com/DaanSelen/ms365-electron-sandbox"
|
||||
},
|
||||
"author": {
|
||||
"name": "Agampreet Singh",
|
||||
"email": "agam778@zohomail.in",
|
||||
"url": "https://agam778.is-a.dev/"
|
||||
"name": "Daan Selen",
|
||||
"email": "dselen@systemec.nl",
|
||||
"url": "https://systemec.nl"
|
||||
},
|
||||
"build": {
|
||||
"extraFiles": [
|
||||
"LICENSE"
|
||||
],
|
||||
"appId": "com.daanselen.ms-365-electron",
|
||||
"productName": "MS-365-Electron",
|
||||
"artifactName": "MS-365-Electron-v${version}-${os}-${arch}.${ext}",
|
||||
"appId": "com.daanselen.ms365-electron",
|
||||
"productName": "ms365-electron",
|
||||
"artifactName": "ms365-electron-v${version}-${os}-${arch}.${ext}",
|
||||
"mac": {
|
||||
"identity": "null",
|
||||
"category": "public.app-category.office",
|
||||
@@ -40,19 +41,15 @@
|
||||
],
|
||||
"icon": "./assets/icons/win/icon.ico"
|
||||
},
|
||||
"nsis": {
|
||||
"oneClick": false,
|
||||
"perMachine": false,
|
||||
"allowToChangeInstallationDirectory": false,
|
||||
"license": "LICENSE"
|
||||
},
|
||||
"linux": {
|
||||
"category": "Office",
|
||||
"icon": "./assets/icons/png",
|
||||
"executableName": "ms-365-electron",
|
||||
"executableName": "ms365-electron",
|
||||
"maintainer": "Daan Selen <dselen@nerthus.nl>",
|
||||
"target": [
|
||||
"deb"
|
||||
"deb",
|
||||
"rpm",
|
||||
"flatpak"
|
||||
]
|
||||
},
|
||||
"directories": {
|
||||
@@ -69,13 +66,10 @@
|
||||
"devDependencies": {
|
||||
"electron": "^38.1.2",
|
||||
"electron-builder": "^26.0.20",
|
||||
"eslint": "^9.36.0",
|
||||
"prettier": "^3.6.2",
|
||||
"prettier-eslint": "^16.4.2"
|
||||
"@malept/flatpak-bundler": "0.4.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ghostery/adblocker-electron": "^2.11.6",
|
||||
"@xhayper/discord-rpc": "^1.3.0",
|
||||
"axios": "^1.12.2",
|
||||
"check-internet-connected": "^2.0.6",
|
||||
"cross-fetch": "^4.1.0",
|
||||
|
||||