Skip to content

Commit e18aa42

Browse files
committed
minor layout improvements
1 parent 175498c commit e18aa42

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 3,
33
"name": "DS Chrome Udvidelse",
4-
"version": "0.22",
4+
"version": "0.23",
55
"description": "En Chrome/Edge udvidelse for DS",
66
"permissions": ["activeTab", "scripting", "storage", "tabs"],
77
"background": {

src/SitecoreLayoutImprovements.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,23 @@
8686
const txts = document.querySelectorAll('.scEditorFieldMarkerInputCell textarea');
8787
if (txts.length === 0) return;
8888

89+
const style = document.createElement('style');
90+
style.innerHTML = `
91+
.monospace-font {font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;}
92+
`;
93+
document.querySelector('body').appendChild(style);
94+
8995
txts.forEach((txt) => {
96+
txt.classList.add('monospace-font');
97+
txt.setAttribute('spellcheck', false);
98+
9099
txt.addEventListener('focus', function () {
91-
this.setAttribute('spellcheck', false);
92100
this.style.height = '800px';
93-
this.style.fontSize = '14px';
94-
this.style.fontFamily = 'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace';
101+
this.style.fontSize = '13px';
102+
this.style.lineHeight = '1.45';
95103
});
96104

97105
txt.addEventListener('blur', function () {
98-
this.setAttribute('spellcheck', true);
99106
this.style = `height: ${defaultTextAreaHeight}`; // From enlargeTreelist() function below.
100107
});
101108
});

0 commit comments

Comments
 (0)