From c78a402b37452bd8acd420d493c416c208ece9bc Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Tue, 11 Nov 2014 15:34:32 +0300 Subject: [PATCH] Improved external embed support --- app/js/directives.js | 81 +++++++++++++++++++++++++++++++ app/js/lib/ng_utils.js | 13 +---- app/js/services.js | 52 +++++++++----------- app/partials/desktop/message.html | 1 + 4 files changed, 107 insertions(+), 40 deletions(-) diff --git a/app/js/directives.js b/app/js/directives.js index feeedd35..4a37a9fb 100644 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -166,6 +166,87 @@ angular.module('myApp.directives', ['myApp.filters']) } } }) + .directive('myExternalEmbed', function () { + + var twitterAttached = false; + var twitterPendingWidgets = []; + var embedTag = Config.Modes.chrome_packed ? 'webview' : 'iframe'; + + function attachTwitterScript () { + twitterAttached = true; + + $('