Improve compatibility and usability
This commit is contained in:
parent
35c8407a9e
commit
5b87e9f8c1
13
index.html
13
index.html
|
@ -203,7 +203,7 @@
|
|||
<a href="https://git.fwdekker.com/FWDekker/interlanguage-checker/src/branch/master/LICENSE">MIT License</a>.
|
||||
Source code available on <a href="https://git.fwdekker.com/FWDekker/interlanguage-checker/">git</a>.
|
||||
|
||||
<div style="float: right;">v1.2.1</div>
|
||||
<div style="float: right;">v1.2.2</div>
|
||||
</section>
|
||||
</footer>
|
||||
</main>
|
||||
|
@ -316,7 +316,7 @@
|
|||
if (conflicts.length !== 0)
|
||||
console.warn("iw map merge conflict(s)", conflicts);
|
||||
|
||||
return new InterwikiMap({...this.map, ...other.map});
|
||||
return new InterwikiMap(Object.assign({}, this.map, other.map));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -542,6 +542,7 @@
|
|||
const label = document.createElement("a");
|
||||
label.href = url;
|
||||
label.target = "_blank";
|
||||
label.title = linkStr;
|
||||
label.innerText =
|
||||
Object.keys(this._mappings).filter(it => link.lang === InterlangLink.fromString(it).lang).length > 1
|
||||
? linkStr
|
||||
|
@ -555,6 +556,7 @@
|
|||
const editIconLink = document.createElement("a");
|
||||
editIconLink.href = url + "?action=edit";
|
||||
editIconLink.target = "_blank";
|
||||
editIconLink.title = "Edit";
|
||||
new FontIcon("pencil").appendTo(editIconLink);
|
||||
span.appendChild(editIconLink);
|
||||
|
||||
|
@ -562,6 +564,7 @@
|
|||
|
||||
const copyIconLink = document.createElement("a");
|
||||
copyIconLink.href = "#";
|
||||
copyIconLink.title = "Copy";
|
||||
const copyIcon = new FontIcon("clipboard").appendTo(copyIconLink);
|
||||
copyIconLink.addEventListener("click", () => {
|
||||
navigator.clipboard.writeText(`[[${linkStr}]]`);
|
||||
|
@ -745,7 +748,7 @@
|
|||
this._callback(...messages);
|
||||
|
||||
this._textSpan.innerText = messages.join(" ");
|
||||
this._mainDiv.style.display = "block";
|
||||
this._mainDiv.style.display = "initial";
|
||||
|
||||
return this;
|
||||
}
|
||||
|
@ -777,8 +780,8 @@
|
|||
* @returns {MessageHandler} this `MessageHandler`
|
||||
*/
|
||||
toggleLoadingIcon(state) {
|
||||
this._loadingIcon.style.display = state ? "inline-block" : "none";
|
||||
this._spacing.style.display = state ? "inline" : "none";
|
||||
this._loadingIcon.style.display = state ? undefined : "none";
|
||||
this._spacing.style.display = state ? undefined : "none";
|
||||
|
||||
return this;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue