aboutsummaryrefslogtreecommitdiff
path: root/src/content
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-04-26 23:18:47 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2019-04-26 23:18:47 +0900
commit8f2b7861771cb452d19989eb331597e240a310b8 (patch)
tree570664fe261cdc4fffc1ce1cd3a6f67be00ad4f3 /src/content
parent9efd8f8abf91be84f72a8df6467443d5d545816c (diff)
Embed style by script
Diffstat (limited to 'src/content')
-rw-r--r--src/content/components/common/hint.css10
-rw-r--r--src/content/components/common/hint.js1
-rw-r--r--src/content/console-frame.scss13
-rw-r--r--src/content/console-frames.js1
-rw-r--r--src/content/index.js6
-rw-r--r--src/content/site-style.js26
6 files changed, 31 insertions, 26 deletions
diff --git a/src/content/components/common/hint.css b/src/content/components/common/hint.css
deleted file mode 100644
index 1f2ab20..0000000
--- a/src/content/components/common/hint.css
+++ /dev/null
@@ -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;
-}
diff --git a/src/content/components/common/hint.js b/src/content/components/common/hint.js
index 9ef9eba..1472587 100644
--- a/src/content/components/common/hint.js
+++ b/src/content/components/common/hint.js
@@ -1,4 +1,3 @@
-import './hint.css';
import * as dom from 'shared/utils/dom';
const hintPosition = (element) => {
diff --git a/src/content/console-frame.scss b/src/content/console-frame.scss
deleted file mode 100644
index dece648..0000000
--- a/src/content/console-frame.scss
+++ /dev/null
@@ -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;
-}
diff --git a/src/content/console-frames.js b/src/content/console-frames.js
index 401765c..ecb5a87 100644
--- a/src/content/console-frames.js
+++ b/src/content/console-frames.js
@@ -1,4 +1,3 @@
-import './console-frame.scss';
import messages from 'shared/messages';
const initialize = (doc) => {
diff --git a/src/content/index.js b/src/content/index.js
index 3b0b49b..9edb712 100644
--- a/src/content/index.js
+++ b/src/content/index.js
@@ -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);
diff --git a/src/content/site-style.js b/src/content/site-style.js
new file mode 100644
index 0000000..e7a82a5
--- /dev/null
+++ b/src/content/site-style.js
@@ -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;
+}
+`;