diff options
author | Allan Wang <me@allanwang.ca> | 2017-08-31 00:56:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-31 00:56:22 -0400 |
commit | fa00faa72c9764c72c6075e52e13df5c3561693b (patch) | |
tree | 9fc29179852098b1fb57f0ee3b2929f1c9581d64 /app/src/main/assets/js | |
parent | 8cc37e754cfe96470caf613728bdb6e07ac513cd (diff) | |
download | frost-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')
-rw-r--r-- | app/src/main/assets/js/context_a.js | 4 | ||||
-rw-r--r-- | app/src/main/assets/js/context_a.min.js | 4 |
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() } |