Skip to content

Commit 6bca333

Browse files
committed
robo8x [chore] 2/16/2019, 7:57:29 AM
1 parent af2723c commit 6bca333

File tree

10 files changed

+35
-12
lines changed

10 files changed

+35
-12
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
@license p3x-onenote v2019.2.15-2
2+
@license p3x-onenote v2019.2.16-0
33

44
📚 P3X Onenote Linux
55

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313

14-
# 📚 P3X Onenote Linux v2019.2.15-2
14+
# 📚 P3X Onenote Linux v2019.2.16-1
1515

1616

1717
🙏 This is an open-source project. Star this repository, if you like it, or even donate to maintain the servers and the development. Thank you so much!
@@ -130,7 +130,7 @@ If you have enough RAM or buffy workstation and you can install Linux VirtualBox
130130

131131
For my workstation, with a 4.8Ghz CPU, 4 cores, 32 GB-ram, I use VirtualBox on Windows with Office Onenote (I use 6 GB RAM, 4 cores), but unfortunately my Laptop is old and has only 16GB RAM. Given, I develop a lot (NodeJs), I need the RAM, so for my Laptop, I use ```p3x-onenote``` and it's enough. Once the pages are loaded. It is fast, since it's own process without a browser and is in the tray, you don't have to re-load everything again. So it is very usable and after all pages are loaded, quick.
132132

133-
**You can try, you lose nothing.**
133+
**You can try, you lose nothing. Personally, by now, I even use this program on my buffy workstation**
134134

135135
# Issues
136136

@@ -174,7 +174,7 @@ If you try to build the app with AppImage, you have to change from `electron` `d
174174

175175
---
176176

177-
[**P3X-ONENOTE**](https://pages.corifeus.com/onenote) Build v2019.2.15-2
177+
[**P3X-ONENOTE**](https://pages.corifeus.com/onenote) Build v2019.2.16-1
178178

179179
[![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)
180180

artifacts/npm.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Though, I am using it, but some distros are different and I only use Linux Mint
2727

2828
---
2929

30-
[**P3X-ONENOTE**](https://pages.corifeus.com/onenote) Build v2019.2.15-2
30+
[**P3X-ONENOTE**](https://pages.corifeus.com/onenote) Build v2019.2.16-1
3131

3232
[![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)
3333

changelog.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
## Change log
99

10+
### v2019.02.16
11+
* BUGFIX: On the sidebar on notebooks it was opening a new window, it is quite hacky, but is supposed to be working.
12+
1013
### v2019.02.04
1114
* BUGFIX: Donation button was Hungarian, now is supposed to be automatically by browser locale.
1215

@@ -26,7 +29,7 @@
2629

2730
---
2831

29-
[**P3X-ONENOTE**](https://pages.corifeus.com/onenote) Build v2019.2.15-2
32+
[**P3X-ONENOTE**](https://pages.corifeus.com/onenote) Build v2019.2.16-1
3033

3134
[![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)
3235

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "p3x-onenote",
3-
"version": "2019.2.15-2",
3+
"version": "2019.2.16-1",
44
"description": "📚 P3X Onenote Linux",
55
"main": "src/electron/app.js",
66
"corifeus": {
@@ -85,4 +85,4 @@
8585
"type": "opencollective",
8686
"url": "https://opencollective.com/p3x-onenote"
8787
}
88-
}
88+
}

src/electron/window/onenote/action/multi-actions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const multiActions = (data) => {
3333
break;
3434

3535
case 'home':
36-
webview.src = 'https://www.onenote.com/notebooks'
36+
webview.src = global.p3x.onenote.url.notebooks
3737
break;
3838

3939
case 'corporate':

src/electron/window/onenote/angular.js

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ global.p3x.onenote.ng.run((p3xOnenotePrompt, p3xOnenoteToast, $rootScope) => {
1414
global.p3x.onenote.prompt = p3xOnenotePrompt;
1515
global.p3x.onenote.toast = p3xOnenoteToast;
1616
global.p3x.onenote.root = $rootScope
17+
18+
p3x.onenote.toast.action(p3x.onenote.lang.slow)
19+
1720
$rootScope.p3x = {
1821
onenote: {
1922
lang: global.p3x.onenote.lang,

src/electron/window/onenote/event/handler.js

+15-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ const handler = (options) => {
1111
});
1212
*/
1313
const allowedUrlRegex = /^((https?:\/\/((onedrive\.live\.com\/((redir\?resid\=)|((redir|edit).aspx\?)))|((www\.)?onenote\.com))|(about\:blank)))/i
14+
const allowedUrlRegex2 = /^https?:\/\/d\.docs\.live\.net\/([a-z0-9]{16})\//i
15+
1416
//const disalledUrl = /^((https?:\/\/))/i
1517

1618
let windowInterval
@@ -19,7 +21,7 @@ const handler = (options) => {
1921
windowInterval = setInterval(() => {
2022
//console.log(webview.src, global.p3x.onenote.root.p3x.onenote.location)
2123

22-
if (!allowedUrlRegex.test(webview.src) && (webview.src.startsWith('https://onedrive.live.com') || webview.src.startsWith('http://onedrive.live.com'))) {
24+
if (!allowedUrlRegex.test(webview.src)) {
2325
p3x.onenote.ui.overlay.show({
2426
message: p3x.onenote.lang.label.disallowedContent
2527
})
@@ -84,13 +86,23 @@ const handler = (options) => {
8486
webview.addEventListener('new-window', function(event) {
8587
/*
8688
ipc.send('p3x-debug', {
87-
'new-window': event,
89+
'new-window': event.url,
8890
allowed: allowedUrlRegex.test(event.url)
8991
})
9092
*/
9193
event.preventDefault()
9294
//console.log(event.url)
93-
if (allowedUrlRegex.test(event.url) ) {
95+
if (allowedUrlRegex2.test(event.url)) {
96+
// https://onedrive.live.com/redir?resid=3B992A1F2BEDFFA7%21955&page=Edit
97+
const urlParts = event.url.match(allowedUrlRegex2)
98+
/*
99+
ipc.send('p3x-debug', {
100+
urlParts: urlParts
101+
})
102+
*/
103+
p3x.onenote.toast.action(p3x.onenote.lang.redirecting)
104+
webview.src = `https://onedrive.live.com/redir?resid=${urlParts[1]}%21955&page=Edit`;
105+
} else if (allowedUrlRegex.test(event.url)) {
94106
webview.src = event.url;
95107
} else {
96108
shell.openExternal(event.url);

src/electron/window/onenote/load.js

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ fs.readFile(__dirname + '/hack.css', 'utf-8', function(err, data) {
2323

2424
global.p3x = {
2525
onenote: {
26+
url: {
27+
notebooks: 'https://www.onenote.com/notebooks',
28+
},
2629
ui: {
2730

2831
},

src/translation/english/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ const translation = {
7676
checkUpdates: 'Check updates'
7777
}
7878
},
79+
redirecting: 'Hang on, redirecting to a new notebooks, it takes some time...',
80+
slow: 'Hang on, loading a notebook takes some time...',
7981
updater: {
8082
'checking-for-update': 'Checking for update ...',
8183
'update-available': 'Downloading latest release ...',

0 commit comments

Comments
 (0)