1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-06-15 23:01:44 +03:00

Ran eslint fix on existing codebase

Had to do some manual fixing of the app.js file due to misplaced
comments
This commit is contained in:
Dan Brown
2023-04-18 22:20:02 +01:00
parent 752ee664c2
commit e711290d8b
106 changed files with 905 additions and 869 deletions

View File

@ -1,7 +1,6 @@
import * as DOM from "../services/dom";
import {Component} from "./component";
import {copyTextToClipboard} from "../services/clipboard";
import * as DOM from '../services/dom';
import {Component} from './component';
import {copyTextToClipboard} from '../services/clipboard';
export class Pointer extends Component {
@ -113,7 +112,7 @@ export class Pointer extends Component {
updateForTarget(element) {
let inputText = this.pointerModeLink ? window.baseUrl(`/link/${this.pageId}#${this.pointerSectionId}`) : `{{@${this.pageId}#${this.pointerSectionId}}}`;
if (this.pointerModeLink && !inputText.startsWith('http')) {
inputText = window.location.protocol + "//" + window.location.host + inputText;
inputText = `${window.location.protocol}//${window.location.host}${inputText}`;
}
this.input.value = inputText;
@ -121,7 +120,7 @@ export class Pointer extends Component {
// Update anchor if present
const editAnchor = this.container.querySelector('#pointer-edit');
if (editAnchor && element) {
const editHref = editAnchor.dataset.editHref;
const {editHref} = editAnchor.dataset;
const elementId = element.id;
// get the first 50 characters.
@ -129,4 +128,5 @@ export class Pointer extends Component {
editAnchor.href = `${editHref}?content-id=${elementId}&content-text=${encodeURIComponent(queryContent)}`;
}
}
}
}