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:
@ -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)}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user