outpost-asset_host 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d1f535609de521469e11aecb8a285454f2030fd
|
4
|
+
data.tar.gz: 6f8dc01efc6410374ff458804ace068295224dce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6608c0c56506c27c01feeaf9bbf7c49f11a4bd1c13fdab69eaf0ec075749f92f01c58e93cc9eb970ed3cea9b92cd18bb1c5cbafc7e0599f4807bcbda53f73157
|
7
|
+
data.tar.gz: 4d8512418aacf5a8ee7e70d646ea355c7d8b502ebdcf723c445cb8664de97f481e8808414f1f52964f6947101fc245e724ea483f042da23000e6c1ed7ef66fed
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## 1.1.1
|
2
|
+
### Fixes
|
3
|
+
* Added a check to make sure messages are coming from AssetHost. This fixes conflicts with anything else sending messages to the window (such as the Evernote Web Clipper Chrome extension).
|
4
|
+
|
5
|
+
|
1
6
|
## 1.1.0
|
2
7
|
### Changes
|
3
8
|
* Removed old Secretary hooks.
|
@@ -23,7 +23,9 @@ class outpost.AssetManager
|
|
23
23
|
# Register listener for AssetHost message
|
24
24
|
window.addEventListener "message", (event) =>
|
25
25
|
# If the data is an object (i.e. not "LOADED"), do things
|
26
|
-
|
26
|
+
# Also make sure the origin is from AssetHost, otherwise
|
27
|
+
# other messages could trigger this callback.
|
28
|
+
if event.origin == assethost.SERVER and _.isObject(event.data)
|
27
29
|
@assets.reset(event.data)
|
28
30
|
@assets.sort()
|
29
31
|
@assetsView.render()
|
@@ -81,7 +83,9 @@ class outpost.AssetManager
|
|
81
83
|
|
82
84
|
# attach a listener to wait for the LOADED message
|
83
85
|
window.addEventListener "message", (evt) =>
|
84
|
-
if evt.
|
86
|
+
if evt.origin == assethost.SERVER and
|
87
|
+
evt.data == "LOADED" and
|
88
|
+
@chooserIsAvailable()
|
85
89
|
console.log @collection.toJSON()
|
86
90
|
# dispatch our event with the asset data
|
87
91
|
window.assethostChooser.postMessage @collection.toJSON(), assethost.SERVER
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: outpost-asset_host
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Ricker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|