mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
12 lines
343 B
JavaScript
12 lines
343 B
JavaScript
|
import { Controller } from '@hotwired/stimulus';
|
||
|
|
||
|
export default class extends Controller {
|
||
|
connect() {
|
||
|
//If we encounter an element with this, then change the title of our document according to data-title
|
||
|
this.changeTitle(this.element.dataset.title);
|
||
|
}
|
||
|
|
||
|
changeTitle(title) {
|
||
|
document.title = title;
|
||
|
}
|
||
|
}
|