From b3a9cf43a5a2da830fdc401e461a831cbd5c2764 Mon Sep 17 00:00:00 2001 From: vantezzen Date: Tue, 24 Sep 2019 09:31:55 +0200 Subject: Add ignore list for darkmode --- src/webview/darkmode/ignore.js | 3 +++ src/webview/recipe.js | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 src/webview/darkmode/ignore.js diff --git a/src/webview/darkmode/ignore.js b/src/webview/darkmode/ignore.js new file mode 100644 index 000000000..110df364f --- /dev/null +++ b/src/webview/darkmode/ignore.js @@ -0,0 +1,3 @@ +export default [ + 'discordapp.com', +]; diff --git a/src/webview/recipe.js b/src/webview/recipe.js index fca00fde2..0eae279c6 100644 --- a/src/webview/recipe.js +++ b/src/webview/recipe.js @@ -9,6 +9,8 @@ import { disable as disableDarkMode, } from 'darkreader'; +import ignoreList from './darkmode/ignore'; + import RecipeWebview from './lib/RecipeWebview'; import spellchecker, { switchDict, disable as disableSpellchecker, getSpellcheckerLocaleByFuzzyIdentifier } from './spellchecker'; @@ -123,7 +125,7 @@ class RecipeController { if (darkModeExists) { injectDarkModeStyle(this.settings.service.recipe.path); - } else { + } else if (!ignoreList.includes(window.location.host)) { // Use darkreader instead enableDarkMode(); } -- cgit v1.2.3-54-g00ecf From 52d2899bfd40a8383fe1f3592ef2f5b43e0bde8d Mon Sep 17 00:00:00 2001 From: Amine Mouafik ç݆ĉ˜‚ĉ˜Ž Date: Tue, 24 Sep 2019 14:39:31 +0700 Subject: #72 Fix dictionaries build step Would not work if the path contains a space --- gulpfile.babel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 06e995d07..c0400bdac 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -166,7 +166,7 @@ export function dictionaries(done) { let packages = ''; Object.keys(SPELLCHECKER_LOCALES).forEach((key) => { packages = `${packages} hunspell-dict-${key}`; }); - _shell(`npm install --prefix ${path.join(__dirname, 'temp')} ${packages}`, () => { + _shell(`npm install --prefix "${path.join(__dirname, 'temp')}" ${packages}`, () => { moveSync( path.join(__dirname, 'temp', 'node_modules'), path.join(__dirname, 'build', paths.dictionaries), -- cgit v1.2.3-54-g00ecf From 438b9fe4393ef8518809c2ac36f492fbe3db0b5e Mon Sep 17 00:00:00 2001 From: vantezzen Date: Tue, 24 Sep 2019 10:01:22 +0200 Subject: Implement Skype link fix --- src/webview/recipe.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/webview/recipe.js b/src/webview/recipe.js index 0eae279c6..b30199f03 100644 --- a/src/webview/recipe.js +++ b/src/webview/recipe.js @@ -196,6 +196,32 @@ new RecipeController(); const originalWindowOpen = window.open; window.open = (url, frameName, features) => { + if (!url && !frameName && !features) { + // The service hasn't yet supplied a URL (as used in Skype). + // Return a new dummy window object and wait for the service to change the properties + const newWindow = { + location: { + href: '', + }, + }; + + const checkInterval = setInterval(() => { + // Has the service changed the URL yet? + if (newWindow.location.href !== '') { + // Open the new URL + window.open(newWindow.location.href); + clearInterval(checkInterval); + } + }, 0); + + setTimeout(() => { + // Stop checking for location changes after 1 second + clearInterval(checkInterval); + }, 1000); + + return newWindow; + } + // We need to differentiate if the link should be opened in a popup or in the systems default browser if (!frameName && !features) { return ipcRenderer.sendToHost('new-window', url); -- cgit v1.2.3-54-g00ecf From 5fff18e86dcb960c47a8ab40d22093dbe0551871 Mon Sep 17 00:00:00 2001 From: Amine Mouafik Date: Tue, 24 Sep 2019 15:38:15 +0700 Subject: 5.3.4-beta.2 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index b7cc09b98..85fc349b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ferdi", - "version": "5.3.4-beta.1", + "version": "5.3.4-beta.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 98f3e0ec4..6a4562fe9 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "ferdi", "productName": "Ferdi", "appId": "com.kytwb.ferdi", - "version": "5.3.4-beta.1", + "version": "5.3.4-beta.2", "description": "Messaging app for WhatsApp, Slack, Telegram, HipChat, Hangouts and many many more.", "copyright": "kytwb", "main": "index.js", -- cgit v1.2.3-54-g00ecf