aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js/context_a.js
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-17 12:38:42 -0700
committerGitHub <noreply@github.com>2017-07-17 12:38:42 -0700
commite4679b1663fa78a99c6c8225e454595c6c6f4e38 (patch)
treea777ee782207c89d6e9243399471b9ad936736d0 /app/src/main/assets/js/context_a.js
parent7bf93ea74b00ab7e8ceedac2aac6ad08fdf099ab (diff)
downloadfrost-e4679b1663fa78a99c6c8225e454595c6c6f4e38.tar.gz
frost-e4679b1663fa78a99c6c8225e454595c6c6f4e38.tar.bz2
frost-e4679b1663fa78a99c6c8225e454595c6c6f4e38.zip
Fix notifications and long press for albums (#69)v1.3.2
* Allow for album images to be viewed * Update listing info * Web refractoring * Test message notifications * Fix notifications and context press
Diffstat (limited to 'app/src/main/assets/js/context_a.js')
-rw-r--r--app/src/main/assets/js/context_a.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/src/main/assets/js/context_a.js b/app/src/main/assets/js/context_a.js
index c7601764..689c6f0d 100644
--- a/app/src/main/assets/js/context_a.js
+++ b/app/src/main/assets/js/context_a.js
@@ -25,8 +25,9 @@ if (!window.hasOwnProperty('frost_context_a')) {
if (!url) return;
var text = element.parentNode.innerText;
- //check if image item exists
- var image = element.parentNode.querySelector('[style*="background-image: url("]');
+ //check if image item exists, first in children and then in parent
+ 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);