aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js/context_a.js
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-08-31 00:56:22 -0400
committerGitHub <noreply@github.com>2017-08-31 00:56:22 -0400
commitfa00faa72c9764c72c6075e52e13df5c3561693b (patch)
tree9fc29179852098b1fb57f0ee3b2929f1c9581d64 /app/src/main/assets/js/context_a.js
parent8cc37e754cfe96470caf613728bdb6e07ac513cd (diff)
downloadfrost-fa00faa72c9764c72c6075e52e13df5c3561693b.tar.gz
frost-fa00faa72c9764c72c6075e52e13df5c3561693b.tar.bz2
frost-fa00faa72c9764c72c6075e52e13df5c3561693b.zip
Reduce scontent trimming (#245)
* Reduce scontent trimming * Update changelog
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();