diff --git a/iframe.html b/iframe.html index 2b31edcc9..b1744a81e 100644 --- a/iframe.html +++ b/iframe.html @@ -23,6 +23,7 @@ var scriptEl = document.createElement('script') scriptEl.setAttribute('type', 'text/javascript') scriptEl.setAttribute('src', 'dist/bundle.js') scriptEl.setAttribute('couleur', '#' + couleur) +scriptEl.setAttribute('iframe', true) document.body.appendChild(scriptEl) diff --git a/package.json b/package.json index 7559a961b..e4090685e 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ "reduce-reducers": "^0.1.2", "redux": "^3.7.2", "redux-form": "6.8.0", - "redux-saga": "^0.15.3", "reselect": "^3.0.1", "whatwg-fetch": "^2.0.3", "yaml-loader": "^0.5.0" @@ -95,13 +94,21 @@ }, "scripts": { "start": "node source/server.js", - "compile": "NODE_ENV='production' webpack --config source/webpack.config.js", - "surge": "npm run compile && surge --domain scientific-wish.surge.sh -p ./ && rm -rf dist/", - "test": "mocha-webpack --webpack-config source/webpack.test.config.js --require source-map-support/register --require test/helpers/browser.js \"test/**/*.test.js\"", - "test-watch": "mocha-webpack --webpack-config source/webpack.test.config.js --require source-map-support/register --require test/helpers/browser.js \"test/**/*.test.js\" --watch", - "test-meca": "mocha-webpack --webpack-config source/webpack.test.config.js --require source-map-support/register --require test/helpers/browser.js test/mecanisms.test.js --watch", - "test-rules": "mocha-webpack --webpack-config source/webpack.test.config.js --require source-map-support/register --require test/helpers/browser.js test/real-rules.test.js --watch", - "heroku-postbuild": "npm install --dev && webpack --config source/webpack.config.js --progress", - "test-inversions": "mocha-webpack --webpack-config source/webpack.test.config.js --require source-map-support/register --require test/helpers/browser.js \"test/inversion.test.js\" --watch" + "compile": + "NODE_ENV='production' webpack --config source/webpack.config.js", + "surge": + "npm run compile && surge --domain scientific-wish.surge.sh -p ./ && rm -rf dist/", + "test": + "mocha-webpack --webpack-config source/webpack.test.config.js --require source-map-support/register --require test/helpers/browser.js \"test/**/*.test.js\"", + "test-watch": + "mocha-webpack --webpack-config source/webpack.test.config.js --require source-map-support/register --require test/helpers/browser.js \"test/**/*.test.js\" --watch", + "test-meca": + "mocha-webpack --webpack-config source/webpack.test.config.js --require source-map-support/register --require test/helpers/browser.js test/mecanisms.test.js --watch", + "test-rules": + "mocha-webpack --webpack-config source/webpack.test.config.js --require source-map-support/register --require test/helpers/browser.js test/real-rules.test.js --watch", + "heroku-postbuild": + "npm install --dev && webpack --config source/webpack.config.js --progress", + "test-inversions": + "mocha-webpack --webpack-config source/webpack.test.config.js --require source-map-support/register --require test/helpers/browser.js \"test/inversion.test.js\" --watch" } } diff --git a/source/components/pages/Header.js b/source/components/pages/Header.js index d25f44d57..38107d50b 100644 --- a/source/components/pages/Header.js +++ b/source/components/pages/Header.js @@ -1,6 +1,7 @@ import React, { Component } from 'react' import 'Components/pages/Header.css' import { Link } from 'react-router-dom' +import { getJsScriptAttribute } from '../../utils' export default class Header extends Component { state = { @@ -15,6 +16,8 @@ export default class Header extends Component { ) if (!displayHeader) return null + if (getJsScriptAttribute('iframe')()) return null + return (