diff options
author | 2020-05-05 11:26:51 +0530 | |
---|---|---|
committer | 2020-05-05 05:56:51 +0000 | |
commit | cd42e1423e3ae3b16763b355b2f06754a57d04a3 (patch) | |
tree | e4f5527759c13c41fcc4f73e9145b1f7789b90d3 /src | |
parent | Add password hashing to lock password (#694) (diff) | |
download | ferdium-app-cd42e1423e3ae3b16763b355b2f06754a57d04a3.tar.gz ferdium-app-cd42e1423e3ae3b16763b355b2f06754a57d04a3.tar.zst ferdium-app-cd42e1423e3ae3b16763b355b2f06754a57d04a3.zip |
Fix TodosWebview user agent (#713)
Diffstat (limited to 'src')
-rw-r--r-- | src/features/todos/components/TodosWebview.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/features/todos/components/TodosWebview.js b/src/features/todos/components/TodosWebview.js index 663f1e48d..412013dcb 100644 --- a/src/features/todos/components/TodosWebview.js +++ b/src/features/todos/components/TodosWebview.js | |||
@@ -12,6 +12,8 @@ import SettingsStore from '../../../stores/SettingsStore'; | |||
12 | import Appear from '../../../components/ui/effects/Appear'; | 12 | import Appear from '../../../components/ui/effects/Appear'; |
13 | import UpgradeButton from '../../../components/ui/UpgradeButton'; | 13 | import UpgradeButton from '../../../components/ui/UpgradeButton'; |
14 | 14 | ||
15 | import userAgent from '../../../helpers/userAgent-helpers'; | ||
16 | |||
15 | // NOTE: https://stackoverflow.com/questions/5717093/check-if-a-javascript-string-is-a-url | 17 | // NOTE: https://stackoverflow.com/questions/5717093/check-if-a-javascript-string-is-a-url |
16 | function validURL(str) { | 18 | function validURL(str) { |
17 | let url; | 19 | let url; |
@@ -128,6 +130,11 @@ class TodosWebview extends Component { | |||
128 | this.node.addEventListener('mousemove', this.resizePanel.bind(this)); | 130 | this.node.addEventListener('mousemove', this.resizePanel.bind(this)); |
129 | this.node.addEventListener('mouseup', this.stopResize.bind(this)); | 131 | this.node.addEventListener('mouseup', this.stopResize.bind(this)); |
130 | this.node.addEventListener('mouseleave', this.stopResize.bind(this)); | 132 | this.node.addEventListener('mouseleave', this.stopResize.bind(this)); |
133 | |||
134 | const webViewInstance = this; | ||
135 | this.webview.addEventListener('dom-ready', () => { | ||
136 | webViewInstance.webview.setUserAgent(userAgent(true)); | ||
137 | }) | ||
131 | } | 138 | } |
132 | 139 | ||
133 | startResize = (event) => { | 140 | startResize = (event) => { |