commit
153c8a6d02
|
@ -55,6 +55,11 @@ export class CoreWindow {
|
||||||
* @return Promise resolved if confirmed, rejected if rejected.
|
* @return Promise resolved if confirmed, rejected if rejected.
|
||||||
*/
|
*/
|
||||||
static async confirmOpenBrowserIfNeeded(url: string): Promise<void> {
|
static async confirmOpenBrowserIfNeeded(url: string): Promise<void> {
|
||||||
|
if (!CoreUrlUtils.isHttpURL(url)) {
|
||||||
|
// Only ask confirm for http(s), other cases usually launch external apps.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Check if the user decided not to see the warning.
|
// Check if the user decided not to see the warning.
|
||||||
const dontShowWarning = await CoreConfig.get(CoreConstants.SETTINGS_DONT_SHOW_EXTERNAL_LINK_WARN, 0);
|
const dontShowWarning = await CoreConfig.get(CoreConstants.SETTINGS_DONT_SHOW_EXTERNAL_LINK_WARN, 0);
|
||||||
if (dontShowWarning) {
|
if (dontShowWarning) {
|
||||||
|
|
Loading…
Reference in New Issue