aboutsummaryrefslogtreecommitdiffstats
path: root/src/webview/lib
Commit message (Collapse)AuthorAge
* Rudimentary DBus toggle-to-talk support (#1507)Libravatar Kristóf Marussy2024-01-03
| | | | | | Adds a ToggleToTalk method to the DBus interface to unmute/mute the microphone in the active service if the recipe supports it. We will need to add support for this feature in recipes.
* chore: improve lint setupLibravatar MCMXC2023-07-25
| | | | | | | | | | | | | | | - update eslint config - merged eslint rules for JS and TS to avoid duplicates - extended stricter lint ruleset from typescript-eslint - corrected wrong setup for certain eslint rulesets - opt in to reportUnusedDisableDirectives config option - fix or disable a lot of lint issues throughout codebase - remove trailingComma: all from prettier config which is default in prettier v3 - add volta configuration to package.json to autoload correct node and pnpm versions - upgrade all eslint and prettier related dependencies to latest - remove config options from settings.json which are default anyways - remove config options from settings.json which are outdated/unknown - set up prettier as default formatter in settings.json
* Upgrade npm modulesLibravatar Vijay A2023-05-24
|
* Minor refactoringLibravatar Vijay A2022-12-26
|
* refactor: migrate recipe.js to typescriptLibravatar Balaji Vijayakumar2022-11-02
|
* Change isImage function to link instead of URL (#470)Libravatar André Oliveira2022-07-12
| | | | | | | * Change isImage function * Fix comments * Fix last comments and lint
* Fix images with query strings (#318)Libravatar André Oliveira2022-06-21
|
* Expose a new utility method 'Ferdium.isImage' for use by recipesLibravatar André Oliveira2022-05-31
|
* Extract utility functions for JSON parsingLibravatar Vijay A2022-05-15
|
* Preload safe debug shim (#29)Libravatar Kristóf Marussy2022-04-22
| | | | | | | | | | | | | | | | In https://github.com/ferdium/ferdium-app/pull/23 we removed usages of the debug package due to an electron bug. This patch aims to restore some debug functionality by introducing a shim. The shim detect whether if it is being introduced in a preload script where the electron but would be triggered, and falls back to a simple replacement for debug. However, in the main and renderer processes, where a preload script is not being used, we still get full debug functionality. In this way, a module can be used both in a preload script and outside of it, while still preserving debug functionality whenever possible. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* Turn off usage of 'debug' npm package using with electron-16 (fixes #17)Libravatar Vijay Aravamudhan2022-04-22
|
* Matched casing for almost all replacementsLibravatar Aditya Mangalampalli2022-04-16
|
* chore: convert various files to TS (#2246)Libravatar Markus Hatvan2021-11-18
| | | | | | * convert various files to TS * removed outdated docs/example-feature folder * turn off unicorn/no-empty-file * update eslint config
* Add active dialog title feature (#2114)Libravatar Iaroslav2021-10-23
| | | | https://github.com/getferdi/ferdi/issues/1280 WhatsApp-like services can set active dialog title to the app title eg. Ferdi - WhatsApp - Contact Name
* refactor: remove references 'Ferdi.ipcRenderer' in recipes - create an ↵Libravatar Vijay A2021-09-27
| | | | abstraction layer instead for better maintainance
* refactor: remove references 'Ferdi.ipcRenderer' in recipes - create an ↵Libravatar Vijay A2021-09-27
| | | | abstraction layer instead for better maintainance
* refactor: remove references to 'electron/remote' - part deux (#1987)Libravatar Vijay Aravamudhan2021-09-26
|
* security: do not expose electron API to services 2Libravatar Kristóf Marussy2021-09-21
| | | | After refactoring some recipes in getferdi#1964, we no longer need to expose some APIs to recipes.
* security: do not expose electron API to services (#1964)Libravatar Kristóf Marussy2021-09-19
| | | | | | | | | | | | | | | | | | | | | * security: do not expose electron API to services Service code running the the main world should not have access to any electron API. This still allows recipes from webview.js accessing these APIs through the @electron/remote module and/or the Ferdi object, but webview-unsafe.js and the untrusted code coming from the service will not have any access. Currently, no recipe accesses these APIs in its webview-unsafe.js, so the change should not break any recipes. * Expose electron API through the Ferdi object Instead of the unsafe window.ferdi in the main world, we should expose functionality to recipes through the RecipeWebview class. * Update CHANGELOG.md
* feat: add eslint-plugin-unicorn (#1936)Libravatar Markus Hatvan2021-09-14
|
* refactor: defensive programming to avoid javascript error for unread badgesLibravatar Vijay A2021-09-14
|
* refactor: expose safeParseInt so that all recipes can use the same for ↵Libravatar Vijay A2021-08-31
| | | | consistent error handling
* refactor: path-references refactoring and using 'import' instead of ↵Libravatar Vijay Raghavan Aravamudhan2021-08-08
| | | | | | 'require' (#1752) * refactor references to 'userData' and 'appData' directories to move hardcoding into single location * convert to es6 for lower memory usage as per https://codesource.io/the-difference-between-import-and-require-in-javascript/
* chore: migrate from tslint to @typescript-eslint (#1706)Libravatar Markus Hatvan2021-07-30
| | | | | | | | | | - update .eslintrc to work for .js and .ts - update devDependencies - lint properly both root /src and nested /packages - update webhint recommended setting for tsconfig.json to shrink output - Manage all eslint rules from the repo root - escape single quotes in scripts to please windows build Co-authored-by: Vijay A <avijayr@protonmail.com>
* Recipe context isolation (#1456)Libravatar Kristóf Marussy2021-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Enable service contextIsolation * Enable contextIsolation on the service webviews * Expose a new API window.ferdi in the service main world to allow calling back into the service isolated world * Expose a new IPC message inject-js-unsafe from the service isolated world to execute Javascript in the service main world (i.e., run code without context isolation). While the name contains the "unsafe" suffix to show the lack of context isolation, this should mostly be safe, as no nodejs APIs are available in the injected code. * Refactor the Notifications shim into a part in the isolated world that handles displaying and modifying notifications, and a shim in the main world for the Notifications class. The two communicate via the window.ferdi endpoint and a Promise object can be used to detect notification clicks. * Refactor the screen sharing shim into a part in the isolated world that enumerated shareable screens and windows and a shim in the main world that displays the media selector and completes the media selection promise. * Expose the injectJSUnsafe API to recipes to inject javascript code into the main world without context isolation. * Expose setBadge to the main world The window.ferdi.setBadge API can be used to update the service badge from injected unsafe Javascript * Safer script injection into the service main world Make sure that we don't try to serialize stray objects back from the main world to the isolated world by always surrounding the script to be executed by an anonymous function. * Always read recipe assets as utf8 * Remove window.log from recipes We didn't use it anywhere and its behavior was confusing in production mode. * Inject multiple unsafe scripts at the same time * Find in page without remote module Remove the @electron/remote dependency from the find in page (Ctrl+F) functionality. The remote webContents is replaced with Electron IPC. Synchronous IPC messages are handled in the main Electron process, because the renderer process cannot reply to IPC messages synchronously. * Update to latest contextIsolation recipes * Fixing issue with missing 'fs' functions. Co-authored-by: Vijay A <avijayr@protonmail.com>
* Converted 2 js files to es6 [skip ci]Libravatar Vijay A2021-07-09
|
* Upgrade various dependencies to latest part 2 (#1557)Libravatar Markus Hatvan2021-07-03
| | | | | | | | * Upgrade various dependencies to latest, remove unnecessary electron-hunspell - upgrade eslint and friends to latest - remove deprecated 'node-sass' in favor of 'sass' - disable new rules from 'eslint-config-airbnb' that are conflicting with current code style - add workspace config for 'vscode' that silences 'experimentalDecorator' warning and forces 'prettier' to single quote * Run yarn lint to autofix with new ruleset and worked down lint issues to zero
* Upgraded some modules (#1520)Libravatar Vijay Raghavan Aravamudhan2021-06-12
|
* Clean up RecipeWebview.setBadge (#1461)Libravatar Kristóf Marussy2021-05-28
| | | | | Extracted from 240c3a72363e7388779c9ed3c6467ec63bb64d94 according to https://github.com/getferdi/ferdi/pull/1456#discussion_r641182688 and https://github.com/getferdi/ferdi/pull/1456#discussion_r641183662
* Read CSS assets in recipes as utf8 (#1459)Libravatar Kristóf Marussy2021-05-28
| | | | Extracted from 357b23b69c119e3d10926613ca31588d5c7285fc according to https://github.com/getferdi/ferdi/pull/1456#discussion_r641185050
* Changed occurrences of 'Franz' to 'Ferdi' (probably missed earlier while ↵Libravatar Vijay A2021-05-17
| | | | catchup from Franz source). [skip ci]
* Merge Franz 5.5.0 beta.1 and 2 (#549)Libravatar Bennett2020-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Automatic i18n update (i18n.meetfranz.com) * Fix zoom not working * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Add environment variable FRANZ_APPDATA_DIR * Add environment variable for config FRANZ_APPDATA_DIR * fix stuff that shouldn't need fixing in the first place * notarize app * bump version to 5.4.1 * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * update to electron 7.1.7 * bump version to 5.5.0 * Automatic i18n update (i18n.meetfranz.com) * Bump electron to 7.1.10 * plan changes * filter plan variants * add missing string * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Replace/remove deprecated electron function calls Electron replaced several function calls with object properties. Franz still uses some of these deprecated functions, so this commit will replace these with their new property counterpart. This commit is only transferring the changes made in getferdi/ferdi#371 and getferdi/ferdi#384 into the upstream repository. * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Update to electron 8.0.1 * feat(Service): Add service hibernation to save system resources * Fix linting issues * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Bump version to electron 8.1.1 * update strings * update electron-notarize * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Add audio & video permission request for cataline * Automatic i18n update (i18n.meetfranz.com) * bump version to beta 1 * Automatic i18n update (i18n.meetfranz.com) * enable external links * Fix main content href * Automatic i18n update (i18n.meetfranz.com) * fix(Service): Fix issue with user agent override in service workers * Automatic i18n update (i18n.meetfranz.com) * fix macOS string replacement * Automatic i18n update (i18n.meetfranz.com) * fix(Experimental): Fix Google signin * fix(Service): Add integrity checks to prevent services recipes getting lost * Remove service reload on app-resume * update strings * bump version to beta 2 * Automatic i18n update (i18n.meetfranz.com) * bump electron-builder and electron-updater deps * test video permissions * fix `extendInfo` keys * fix typo * fix permission request * update camera/microphone entitlements * Automatic i18n update (i18n.meetfranz.com) * Test screen capture permissions * unpack `mac-screen-capture-permissions` * don't require localstorage temp key for permissions request * move macOS permission request to main process * Fix checking for permissions * fix(macOS): Ask the user to move Franz to the `/Applications` Folder * only try to recover recipe when user is online * update service request link * Update changelog * Reset `service.lostRecipeReloadAttempt` once service is alive again * Update translations * Fix crash on macOS * Fix merge errors * Fix lint * Disable ConnectionLostBanner * #551 Add information about Ferdi to the user agent * Fix requested changes * Remove tsbuildinfo files * Add .tsbuildinfo files to gitignore * Fix "Cannot destructure property 'app' of '_electron.remote' as it is undefined" Co-authored-by: FranzBot <i18n@meetfranz.com> Co-authored-by: Makazzz <makazzzpro@live.ca> Co-authored-by: Stefan Malzner <stefan@adlk.io>
* Improve user scripts (#559)Libravatar Bennett2020-04-12
| | | | | | | | | | | * Add template to user.js creation * Add Userscript library * Add internalOpen function * Fix lint * Remove excess line break
* Add custom dark mode handler support (#445)Libravatar Bennett2020-03-09
| | | | | * Add custom dark mode handler support * Fix lint
* Use async methods of fs-extraLibravatar Amine Mouafik2020-03-06
|
* Fix uncaught error on injectCSS that does not existLibravatar Amine Mouafik2020-03-04
|
* Merge https://github.com/meetfranz/franz into franz-5.4.0-releaseLibravatar vantezzen2019-10-24
|\
| * remove flow tagLibravatar Stefan Malzner2019-10-18
| |
| * Add debugging logsLibravatar Stefan Malzner2019-10-17
| |
* | Fix lintLibravatar vantezzen2019-09-19
| |
* | Parse unread messages count as integer before sending to hostLibravatar vantezzen2019-09-19
|/ | | | This will correct errors that recipes may introduce, e.g. by sending a String instead of an integer (as seen on old versions of the ProtonMail recipe)
* Fix bug that allows negative badge notificationsLibravatar Razvan Spatariu2017-12-07
|
* Fix application of onNotifyLibravatar Danny Qiu2017-11-14
|
* Add onNotify event to let recipes update/change notifications before send them.Libravatar Gustavo Sampaio2017-10-27
| | | | Add additional checks in ServiceStore.
* initial commitLibravatar Stefan Malzner2017-10-13