Loading app/assets/javascripts/helpers/protocol_handler.js 0 → 100644 +22 −0 Original line number Diff line number Diff line // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later Diaspora.ProtocolHandler = { register: function() { if (typeof (window.navigator.registerProtocolHandler) !== "function") { return false; } var protocol = location.protocol; var slashes = protocol.concat("//"); var host = slashes.concat(window.location.hostname); if (location.port) { host = host.concat(":" + location.port); } window.navigator.registerProtocolHandler("web+diaspora", host.concat("/link?q=%s"), document.title); return true; } }; Diaspora.ProtocolHandler.register(); app/assets/javascripts/main.js +1 −1 Original line number Diff line number Diff line Loading @@ -45,5 +45,5 @@ //= require api/authorization_page //= require bootstrap-markdown/bootstrap-markdown //= require helpers/markdown_editor //= require helpers/protocol_handler //= require jquery.are-you-sure //= require protocol-handler app/assets/javascripts/protocol-handler.jsdeleted 100644 → 0 +0 −17 Original line number Diff line number Diff line // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later function registerDiasporaLinksProtocol() { var protocol = location.protocol; var slashes = protocol.concat("//"); var host = slashes.concat(window.location.hostname); if (location.port) { host = host.concat(":" + location.port); } window.navigator.registerProtocolHandler("web+diaspora", host.concat("/link?q=%s"), document.title); } if (typeof (window.navigator.registerProtocolHandler) === "function") { registerDiasporaLinksProtocol(); } Loading
app/assets/javascripts/helpers/protocol_handler.js 0 → 100644 +22 −0 Original line number Diff line number Diff line // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later Diaspora.ProtocolHandler = { register: function() { if (typeof (window.navigator.registerProtocolHandler) !== "function") { return false; } var protocol = location.protocol; var slashes = protocol.concat("//"); var host = slashes.concat(window.location.hostname); if (location.port) { host = host.concat(":" + location.port); } window.navigator.registerProtocolHandler("web+diaspora", host.concat("/link?q=%s"), document.title); return true; } }; Diaspora.ProtocolHandler.register();
app/assets/javascripts/main.js +1 −1 Original line number Diff line number Diff line Loading @@ -45,5 +45,5 @@ //= require api/authorization_page //= require bootstrap-markdown/bootstrap-markdown //= require helpers/markdown_editor //= require helpers/protocol_handler //= require jquery.are-you-sure //= require protocol-handler
app/assets/javascripts/protocol-handler.jsdeleted 100644 → 0 +0 −17 Original line number Diff line number Diff line // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later function registerDiasporaLinksProtocol() { var protocol = location.protocol; var slashes = protocol.concat("//"); var host = slashes.concat(window.location.hostname); if (location.port) { host = host.concat(":" + location.port); } window.navigator.registerProtocolHandler("web+diaspora", host.concat("/link?q=%s"), document.title); } if (typeof (window.navigator.registerProtocolHandler) === "function") { registerDiasporaLinksProtocol(); }