diff --git a/directives/plugin.html b/directives/plugin.html
index c0669bb..b3b5651 100644
--- a/directives/plugin.html
+++ b/directives/plugin.html
@@ -4,7 +4,7 @@
Hide {{ plugin.name }}
-
+
diff --git a/js/glowingbear.js b/js/glowingbear.js
index 8e3ff25..3a2ab93 100644
--- a/js/glowingbear.js
+++ b/js/glowingbear.js
@@ -813,8 +813,10 @@ weechat.directive('plugin', function() {
// Scroll embed content into view
var scroll = function() {
- var embed = document.querySelector("." + $scope.plugin.$$hashKey);
- embed.scrollIntoViewIfNeeded();
+ var embed = document.querySelector(".embed_" + $scope.plugin.$$hashKey);
+ if (embed) {
+ embed.scrollIntoViewIfNeeded();
+ }
};
setTimeout(scroll, 100);
};