text
This commit is contained in:
parent
798aefc0ea
commit
049c0ed77b
@ -45,15 +45,7 @@ export class PageSubmission implements OnInit {
|
||||
}
|
||||
|
||||
onTitleFocus(event): void {
|
||||
fetch(this.form.get("url").value)
|
||||
.then((response) => response.text())
|
||||
.then((html) => {
|
||||
const doc = new DOMParser().parseFromString(html, "text/html");
|
||||
const title = doc.querySelectorAll('title')[ 0 ];
|
||||
return title.innerText;
|
||||
}).then((title) => {
|
||||
this.form.get("title").setValue(title);
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
create(): void {
|
||||
|
Loading…
Reference in New Issue
Block a user