aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/assets/js')
-rw-r--r--app/src/main/assets/js/context_a.js4
-rw-r--r--app/src/main/assets/js/context_a.min.js4
2 files changed, 4 insertions, 4 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();
diff --git a/app/src/main/assets/js/context_a.min.js b/app/src/main/assets/js/context_a.min.js
index 89e7c2f6..e3127cdc 100644
--- a/app/src/main/assets/js/context_a.min.js
+++ b/app/src/main/assets/js/context_a.min.js
@@ -12,8 +12,8 @@ var o=t.getAttribute("href")
;var n=t.parentNode.innerText,r=t.querySelector('[style*="background-image: url("]')
;if(r||(r=t.parentNode.querySelector('[style*="background-image: url("]')),
r){
-var a=window.getComputedStyle(r,null).backgroundImage.slice(5,-2)
-;return console.log("Context image",a),
+var a=window.getComputedStyle(r,null).backgroundImage.trim().slice(4,-1)
+;return console.log("Context image: "+a),
"undefined"!=typeof Frost&&Frost.loadImage(a,n),
e.stopPropagation(),void e.preventDefault()
}