diff options
Diffstat (limited to 'client/src/app')
-rw-r--r-- | client/src/app/core/routing/menu-guard.service.ts | 5 | ||||
-rw-r--r-- | client/src/app/helpers/utils/url.ts | 15 | ||||
-rw-r--r-- | client/src/app/shared/shared-forms/markdown-textarea.component.ts | 2 |
3 files changed, 2 insertions, 20 deletions
diff --git a/client/src/app/core/routing/menu-guard.service.ts b/client/src/app/core/routing/menu-guard.service.ts index 8c5bbfde9..58ad31cf4 100644 --- a/client/src/app/core/routing/menu-guard.service.ts +++ b/client/src/app/core/routing/menu-guard.service.ts | |||
@@ -4,11 +4,10 @@ import { MenuService } from '../menu' | |||
4 | import { ScreenService } from '../wrappers' | 4 | import { ScreenService } from '../wrappers' |
5 | 5 | ||
6 | abstract class MenuGuard implements CanActivate, CanDeactivate<any> { | 6 | abstract class MenuGuard implements CanActivate, CanDeactivate<any> { |
7 | display = true | ||
8 | canDeactivate = this.canActivate | 7 | canDeactivate = this.canActivate |
9 | 8 | ||
10 | constructor (protected menu: MenuService, protected screen: ScreenService, display: boolean) { | 9 | constructor (protected menu: MenuService, protected screen: ScreenService, protected display: boolean) { |
11 | this.display = display | 10 | |
12 | } | 11 | } |
13 | 12 | ||
14 | canActivate (): boolean { | 13 | canActivate (): boolean { |
diff --git a/client/src/app/helpers/utils/url.ts b/client/src/app/helpers/utils/url.ts index 82d9cc11b..b3cded8f4 100644 --- a/client/src/app/helpers/utils/url.ts +++ b/client/src/app/helpers/utils/url.ts | |||
@@ -1,19 +1,5 @@ | |||
1 | import { environment } from '../../../environments/environment' | 1 | import { environment } from '../../../environments/environment' |
2 | 2 | ||
3 | // Thanks: https://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript | ||
4 | function getParameterByName (name: string, url: string) { | ||
5 | if (!url) url = window.location.href | ||
6 | name = name.replace(/[[\]]/g, '\\$&') | ||
7 | |||
8 | const regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)') | ||
9 | const results = regex.exec(url) | ||
10 | |||
11 | if (!results) return null | ||
12 | if (!results[2]) return '' | ||
13 | |||
14 | return decodeURIComponent(results[2].replace(/\+/g, ' ')) | ||
15 | } | ||
16 | |||
17 | function getAbsoluteAPIUrl () { | 3 | function getAbsoluteAPIUrl () { |
18 | let absoluteAPIUrl = environment.hmr === true | 4 | let absoluteAPIUrl = environment.hmr === true |
19 | ? 'http://localhost:9000' | 5 | ? 'http://localhost:9000' |
@@ -64,7 +50,6 @@ function objectToFormData (obj: any, form?: FormData, namespace?: string) { | |||
64 | } | 50 | } |
65 | 51 | ||
66 | export { | 52 | export { |
67 | getParameterByName, | ||
68 | objectToFormData, | 53 | objectToFormData, |
69 | getAbsoluteAPIUrl, | 54 | getAbsoluteAPIUrl, |
70 | getAbsoluteEmbedUrl | 55 | getAbsoluteEmbedUrl |
diff --git a/client/src/app/shared/shared-forms/markdown-textarea.component.ts b/client/src/app/shared/shared-forms/markdown-textarea.component.ts index 8f51d47df..80ca6690f 100644 --- a/client/src/app/shared/shared-forms/markdown-textarea.component.ts +++ b/client/src/app/shared/shared-forms/markdown-textarea.component.ts | |||
@@ -132,8 +132,6 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit { | |||
132 | const result = await this.customMarkdownRenderer(text) | 132 | const result = await this.customMarkdownRenderer(text) |
133 | 133 | ||
134 | if (result instanceof HTMLElement) { | 134 | if (result instanceof HTMLElement) { |
135 | html = '' | ||
136 | |||
137 | const wrapperElement = this.previewElement.nativeElement as HTMLElement | 135 | const wrapperElement = this.previewElement.nativeElement as HTMLElement |
138 | wrapperElement.innerHTML = '' | 136 | wrapperElement.innerHTML = '' |
139 | wrapperElement.appendChild(result) | 137 | wrapperElement.appendChild(result) |