Embed style by script
This commit is contained in:
		
							parent
							
								
									9efd8f8abf
								
							
						
					
					
						commit
						8f2b786177
					
				
					 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';
 | 
					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);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										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