Merge pull request #571 from ueokande/prevent-content-security-policy
Fix Content-Security-Policy issues
This commit is contained in:
commit
b67129de6a
6 changed files with 31 additions and 26 deletions
|
@ -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';
|
||||
|
||||
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';
|
||||
|
||||
const initialize = (doc) => {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import './console-frame.scss';
|
||||
import { createStore, applyMiddleware } from 'redux';
|
||||
import promise from 'redux-promise';
|
||||
import reducers from 'content/reducers';
|
||||
import TopContentComponent from './components/top-content';
|
||||
import FrameContentComponent from './components/frame-content';
|
||||
import consoleFrameStyle from './site-style';
|
||||
|
||||
const store = createStore(
|
||||
reducers,
|
||||
|
@ -15,3 +15,7 @@ if (window.self === window.top) {
|
|||
} else {
|
||||
new FrameContentComponent(window, store); // eslint-disable-line no-new
|
||||
}
|
||||
|
||||
let style = window.document.createElement('style');
|
||||
style.textContent = consoleFrameStyle.default;
|
||||
window.document.head.appendChild(style);
|
||||
|
|
26
src/content/site-style.js
Normal file
26
src/content/site-style.js
Normal file
|
@ -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;
|
||||
}
|
||||
`;
|
Reference in a new issue