Change comment styling
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>pull/21833/head
parent
77248725ed
commit
ec73f2ec49
|
@ -111,8 +111,8 @@ export default class TextualBody extends React.Component {
|
||||||
const codes = ReactDOM.findDOMNode(this).getElementsByTagName("code");
|
const codes = ReactDOM.findDOMNode(this).getElementsByTagName("code");
|
||||||
if (codes.length > 0) {
|
if (codes.length > 0) {
|
||||||
for (let i = 0; i < codes.length; i++) {
|
for (let i = 0; i < codes.length; i++) {
|
||||||
/* Do this asynchronously: parsing code takes time and we don't
|
// Do this asynchronously: parsing code takes time and we don't
|
||||||
* need to block the DOM update on it. */
|
// need to block the DOM update on it.
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (this._unmounted) return;
|
if (this._unmounted) return;
|
||||||
for (let i = 0; i < pres.length; i++) {
|
for (let i = 0; i < pres.length; i++) {
|
||||||
|
@ -125,8 +125,8 @@ export default class TextualBody extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
_addCodeExpansionButton(div, pre) {
|
_addCodeExpansionButton(div, pre) {
|
||||||
/* Calculate how many percent does the pre element take up.
|
// Calculate how many percent does the pre element take up.
|
||||||
* If it's less than 30% we don't add the expansion button. */
|
// If it's less than 30% we don't add the expansion button.
|
||||||
const percentageOfViewport = pre.offsetHeight / window.innerHeight * 100;
|
const percentageOfViewport = pre.offsetHeight / window.innerHeight * 100;
|
||||||
if (percentageOfViewport < 30) return;
|
if (percentageOfViewport < 30) return;
|
||||||
|
|
||||||
|
@ -160,8 +160,8 @@ export default class TextualBody extends React.Component {
|
||||||
const button = document.createElement("span");
|
const button = document.createElement("span");
|
||||||
button.className = "mx_EventTile_button mx_EventTile_copyButton ";
|
button.className = "mx_EventTile_button mx_EventTile_copyButton ";
|
||||||
|
|
||||||
/* Check if expansion button exists. If so
|
// Check if expansion button exists. If so
|
||||||
* we put the copy button to the bottom */
|
// we put the copy button to the bottom
|
||||||
const expansionButtonExists = div.getElementsByClassName("mx_EventTile_button");
|
const expansionButtonExists = div.getElementsByClassName("mx_EventTile_button");
|
||||||
if (expansionButtonExists.length > 0) button.className += "mx_EventTile_buttonBottom";
|
if (expansionButtonExists.length > 0) button.className += "mx_EventTile_buttonBottom";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue