artwork 0.5.0 → 0.6.0

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: 1fa345b69eabe9139eeb79740dfcc21354bb94f2
4
- data.tar.gz: cee710b63c1df40d91771243bb0a27ff84716d83
3
+ metadata.gz: dfd5d1e44d2b3d06484c65c06ab931a5b3c558c0
4
+ data.tar.gz: 690c50079f5892d5b3ddf03e32012a2c323a57f0
5
5
  SHA512:
6
- metadata.gz: fdd18e2531a11607452a2c6b18d854f20d24b71a98ac3c394fb33935c469030e59e8a8032e85b2138485d9f457163968257f45ab8564b16ba4a6c390aebfd81d
7
- data.tar.gz: 898a848c85d23bfa161df490879082c98f899965ca3c33c5ac0c0d388c0a0dcc9b7b1d91bcb5e8d0e6a706926adf00bc1ac80bb8bd3ff3775b0996eb16023976
6
+ metadata.gz: 32c86f1333cbb65eaf52b249d075d05ea2c148d0bdc109181d9d91a67c8027dd4166508a29b055d245734c1d5297c437f0797ff2cbf9d0a3686eb07d27c03fa6
7
+ data.tar.gz: 37fb27baf3d006dda55d1aae016669523ecf1721636619a1244697da2a148b4898e2e16411f0fe8685c20cbca1c3b90786c259f936afbcf6e8905f8d65ba556a
data/README.md CHANGED
@@ -69,6 +69,18 @@ so you could prevent this if you add (*ABOVE* the top script):
69
69
  <style> .artwork-reload-splash body { display: none; } </style>
70
70
  <%= activate_resolution_independence %>
71
71
 
72
+ ### Usage in frames
73
+
74
+ The client-side code which checks for the current browser's resolutions will be
75
+ disabled by default when the site is not the topmost frame, ie. when loaded from
76
+ an iframe.
77
+
78
+ You can override this behaviour by setting a truthy value to a global variable:
79
+
80
+ window.useArtworkInFrames = true
81
+
82
+ This has to happen before the `<%= activate_resolution_independence %>` call.
83
+
72
84
  ## Configuration
73
85
 
74
86
  Set the following variables in an app initializer:
@@ -1,3 +1,3 @@
1
1
  module Artwork
2
- VERSION = '0.5.0'
2
+ VERSION = '0.6.0'
3
3
  end
@@ -1,4 +1,6 @@
1
1
  (function (window, documentElement) {
2
+ if (window.top != window && !window.useArtworkInFrames) return;
3
+
2
4
  var cookieValidity = 365,
3
5
  cookieDomain = location.host.toString().split('.').slice(-2).join('.'),
4
6
  isRetina = (window.devicePixelRatio || 1.0) >= 1.5;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: artwork
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dimitar Dimitrov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-12 00:00:00.000000000 Z
11
+ date: 2014-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler