aboutsummaryrefslogtreecommitdiffstats
path: root/maine_coon.js
diff options
context:
space:
mode:
authoranekos2010-03-09 17:26:39 +0000
committeranekos2010-03-09 17:26:39 +0000
commitb8d09d4f32f2cdb8c1d65c3a88333178df1b0ff3 (patch)
treec41d633b81e70386439cc8b73ad66f5e56054170 /maine_coon.js
parent61c97d4940148ab3590d016dcd1802a8177a238b (diff)
downloadvimperator-plugins-b8d09d4f32f2cdb8c1d65c3a88333178df1b0ff3.tar.bz2
スタイルに自動的に !important; をつける様に
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@36979 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'maine_coon.js')
-rw-r--r--maine_coon.js26
1 files changed, 16 insertions, 10 deletions
diff --git a/maine_coon.js b/maine_coon.js
index 1467023..f852ee0 100644
--- a/maine_coon.js
+++ b/maine_coon.js
@@ -38,7 +38,7 @@ let PLUGIN_INFO =
<name lang="ja">メインクーン</name>
<description>Make the screen larger</description>
<description lang="ja">なるべくでかい画面で使えるように</description>
- <version>2.4.0</version>
+ <version>2.4.1</version>
<author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author>
<minVersion>2.3</minVersion>
<maxVersion>2.3</maxVersion>
@@ -263,6 +263,9 @@ let elemStyle =
function nothing (value)
(value === undefined);
+ function important (style)
+ style.replace(/;/g, ' !important;');
+
let echo = (function () {
let time = 40;
let remove;
@@ -272,15 +275,18 @@ let elemStyle =
remove();
let doc = window.content.document;
let style =
- highlight.get('StatusLine').value +
- U.toStyleText({
- position: 'fixed',
- zIndex: 1000,
- left: 0,
- bottom: 0,
- opacity: 1
- }) +
- elemStyle;
+ important(
+ highlight.get('StatusLine').value +
+ U.toStyleText({
+ position: 'fixed',
+ zIndex: 1000,
+ left: 0,
+ bottom: 0,
+ opacity: 1
+ }) +
+ elemStyle
+ );
+ liberator.log(style);
let elem = U.xmlToDom(<div id="liberator_maine_coon" style={style}>{message}</div>, doc);
doc.body.appendChild(elem);
let count = time;