Merge pull request #571 from ueokande/prevent-content-security-policy

Fix Content-Security-Policy issues
jh-changes
Shin'ya Ueoka 6 years ago committed by GitHub
commit b67129de6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      src/content/components/common/hint.css
  2. 1
      src/content/components/common/hint.js
  3. 13
      src/content/console-frame.scss
  4. 1
      src/content/console-frames.js
  5. 6
      src/content/index.js
  6. 26
      src/content/site-style.js

@ -1,10 +0,0 @@
.vimvixen-hint {
background-color: yellow;
border: 1px solid gold;
font-weight: bold;
position: absolute;
text-transform: uppercase;
z-index: 2147483647;
font-size: 12px;
color: black;
}

@ -1,4 +1,3 @@
import './hint.css';
import * as dom from 'shared/utils/dom'; import * as dom from 'shared/utils/dom';
const hintPosition = (element) => { const hintPosition = (element) => {

@ -1,13 +0,0 @@
.vimvixen-console-frame {
margin: 0;
padding: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
position: fixed;
z-index: 2147483647;
border: none;
background-color: unset;
pointer-events:none;
}

@ -1,4 +1,3 @@
import './console-frame.scss';
import messages from 'shared/messages'; import messages from 'shared/messages';
const initialize = (doc) => { const initialize = (doc) => {

@ -1,9 +1,9 @@
import './console-frame.scss';
import { createStore, applyMiddleware } from 'redux'; import { createStore, applyMiddleware } from 'redux';
import promise from 'redux-promise'; import promise from 'redux-promise';
import reducers from 'content/reducers'; import reducers from 'content/reducers';
import TopContentComponent from './components/top-content'; import TopContentComponent from './components/top-content';
import FrameContentComponent from './components/frame-content'; import FrameContentComponent from './components/frame-content';
import consoleFrameStyle from './site-style';
const store = createStore( const store = createStore(
reducers, reducers,
@ -15,3 +15,7 @@ if (window.self === window.top) {
} else { } else {
new FrameContentComponent(window, store); // eslint-disable-line no-new new FrameContentComponent(window, store); // eslint-disable-line no-new
} }
let style = window.document.createElement('style');
style.textContent = consoleFrameStyle.default;
window.document.head.appendChild(style);

@ -0,0 +1,26 @@
exports.default = `
.vimvixen-console-frame {
margin: 0;
padding: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
position: fixed;
z-index: 2147483647;
border: none;
background-color: unset;
pointer-events:none;
}
.vimvixen-hint {
background-color: yellow;
border: 1px solid gold;
font-weight: bold;
position: absolute;
text-transform: uppercase;
z-index: 2147483647;
font-size: 12px;
color: black;
}
`;