diff --git a/options.js b/options.js index 7815fb0..6cd77af 100644 --- a/options.js +++ b/options.js @@ -196,6 +196,7 @@ function buildpage() optionsection.appendChild(header); continue; } + let container = document.createElement("div"); let configger = undefined; if(option.kind == "checkbox") { @@ -261,12 +262,24 @@ function buildpage() let labelText = document.createTextNode(option.label); if(option.kind == "checkbox") + { label.appendChild(configger); + label.appendChild(labelText); + container.appendChild(label); + } else - optionsection.appendChild(configger); + { + label.appendChild(labelText); + let cont1 = document.createElement("div"); + let cont2 = document.createElement("div"); + cont1.appendChild(configger); + cont2.appendChild(label); + container.appendChild(cont1); + container.appendChild(cont2); + } - label.appendChild(labelText); - optionsection.appendChild(label); + container.style.marginBottom = "8px"; + optionsection.appendChild(container); } } diff --git a/texthook.js b/texthook.js index d21aae9..fe57438 100644 --- a/texthook.js +++ b/texthook.js @@ -145,8 +145,8 @@ function display_div (middle, x, y, time) { if(newx + mywidth > pretend_doc_width-buffer) { - newx += (newx + mywidth - pretend_doc_width); - newx += buffer; + newx -= (newx + mywidth - pretend_doc_width); + newx -= buffer; if(newx < 0) newx = 0; }