aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js/context_a.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/assets/js/context_a.js')
-rw-r--r--app/src/main/assets/js/context_a.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/assets/js/context_a.js b/app/src/main/assets/js/context_a.js
index 6ffa517b..260d5506 100644
--- a/app/src/main/assets/js/context_a.js
+++ b/app/src/main/assets/js/context_a.js
@@ -29,8 +29,8 @@ if (!window.hasOwnProperty('frost_context_a')) {
var image = element.querySelector('[style*="background-image: url("]');
if (!image) image = element.parentNode.querySelector('[style*="background-image: url("]');
if (image) {
- var imageUrl = window.getComputedStyle(image, null).backgroundImage.slice(5, -2);
- console.log('Context image', imageUrl);
+ var imageUrl = window.getComputedStyle(image, null).backgroundImage.trim().slice(4, -1);
+ console.log('Context image: ' + imageUrl);
if (typeof Frost !== 'undefined') Frost.loadImage(imageUrl, text);
e.stopPropagation();
e.preventDefault();