Change #yomichan-float to .yomichan-float
Since there can be more than one popup, using a class makes more sense than an ID.
This commit is contained in:
parent
42d67249c9
commit
b34ff7ebe9
@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" class="yomichan-search">
|
<html lang="en" data-yomichan-page="search">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
font-family: "Helvetica Neue", Helvetica, Arial ,sans-serif;
|
font-family: "Helvetica Neue", Helvetica, Arial ,sans-serif;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
iframe#yomichan-float {
|
iframe.yomichan-float {
|
||||||
resize: none;
|
resize: none;
|
||||||
}
|
}
|
||||||
.vertical-align-outer {
|
.vertical-align-outer {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
iframe#yomichan-float {
|
iframe.yomichan-float {
|
||||||
all: initial;
|
all: initial;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border: 1px solid #999;
|
border: 1px solid #999;
|
||||||
@ -29,14 +29,14 @@ iframe#yomichan-float {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
iframe#yomichan-float[data-yomichan-theme=dark],
|
iframe.yomichan-float[data-yomichan-theme=dark],
|
||||||
iframe#yomichan-float[data-yomichan-theme=auto][data-yomichan-site-color=dark] {
|
iframe.yomichan-float[data-yomichan-theme=auto][data-yomichan-site-color=dark] {
|
||||||
background-color: #1e1e1e;
|
background-color: #1e1e1e;
|
||||||
border: 1px solid #666;
|
border: 1px solid #666;
|
||||||
box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
|
box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
iframe#yomichan-float.yomichan-float-full-width {
|
iframe.yomichan-float.yomichan-float-full-width {
|
||||||
border-left: none;
|
border-left: none;
|
||||||
border-right: none;
|
border-right: none;
|
||||||
left: 0 !important;
|
left: 0 !important;
|
||||||
@ -46,13 +46,13 @@ iframe#yomichan-float.yomichan-float-full-width {
|
|||||||
resize: none;
|
resize: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
iframe#yomichan-float.yomichan-float-full-width:not(.yomichan-float-above) {
|
iframe.yomichan-float.yomichan-float-full-width:not(.yomichan-float-above) {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
top: auto !important;
|
top: auto !important;
|
||||||
bottom: 0 !important;
|
bottom: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
iframe#yomichan-float.yomichan-float-full-width.yomichan-float-above {
|
iframe.yomichan-float.yomichan-float-full-width.yomichan-float-above {
|
||||||
border-top: none;
|
border-top: none;
|
||||||
top: 0 !important;
|
top: 0 !important;
|
||||||
bottom: auto !important;
|
bottom: auto !important;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" class="yomichan-float">
|
<html lang="en" data-yomichan-page="float">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||||
|
@ -27,7 +27,7 @@ class Popup {
|
|||||||
this.child = null;
|
this.child = null;
|
||||||
this.childrenSupported = true;
|
this.childrenSupported = true;
|
||||||
this.container = document.createElement('iframe');
|
this.container = document.createElement('iframe');
|
||||||
this.container.id = 'yomichan-float';
|
this.container.className = 'yomichan-float';
|
||||||
this.container.addEventListener('mousedown', e => e.stopPropagation());
|
this.container.addEventListener('mousedown', e => e.stopPropagation());
|
||||||
this.container.addEventListener('scroll', e => e.stopPropagation());
|
this.container.addEventListener('scroll', e => e.stopPropagation());
|
||||||
this.container.setAttribute('src', chrome.extension.getURL('/fg/float.html'));
|
this.container.setAttribute('src', chrome.extension.getURL('/fg/float.html'));
|
||||||
|
@ -30,8 +30,8 @@
|
|||||||
* General
|
* General
|
||||||
*/
|
*/
|
||||||
|
|
||||||
html.yomichan-float:not([data-yomichan-theme]),
|
html:root[data-yomichan-page=float]:not([data-yomichan-theme]),
|
||||||
html.yomichan-float:not([data-yomichan-theme]) body {
|
html:root[data-yomichan-page=float]:not([data-yomichan-theme]) body {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,8 +82,8 @@ ol, ul {
|
|||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
html:root.yomichan-float .entry,
|
html:root[data-yomichan-page=float] .entry,
|
||||||
html:root.yomichan-float .note {
|
html:root[data-yomichan-page=float] .note {
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user