[polari/wip/fmuellner/xdg-app: 20/22] utils: Always linkify http/https schemas



commit 4a89c4ec38c822a6da4369e82cd4105ee309d063
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Feb 20 17:05:40 2016 +0100

    utils: Always linkify http/https schemas
    
    When running sandboxed, we might not have access to schema handlers
    or the list of installed applications to determine which schemas are
    supported. We won't be able to actually open links in that case, but
    we assume that we can open URLs without schema (as http://), so it
    makes sense to also always linkify http:// URLs with schema. At least
    users can copy the URL and paste it into their browser ...

 src/utils.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/utils.js b/src/utils.js
index 2c63918..5689706 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -93,7 +93,7 @@ function debug(str) {
 function getURISchemes() {
     let apps = Gio.AppInfo.get_all();
     let prefix = 'x-scheme-handler/';
-    let schemes = [];
+    let schemes = ['http','https'];
 
     apps.forEach(function(app) {
         let types = app.get_supported_types();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]