From e862382d384ab5184ff535c1543bedc611fa5791 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Fri, 16 Nov 2018 17:32:59 -0800 Subject: [PATCH] restore _system target for opening links --- src/pages/about/about.html | 6 +++--- src/pages/about/about.ts | 2 +- src/pages/stream/post-menu.ts | 2 +- src/pages/stream/stream.ts | 2 +- src/pipes/parser/parser.ts | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pages/about/about.html b/src/pages/about/about.html index c8df99f..1e769c2 100644 --- a/src/pages/about/about.html +++ b/src/pages/about/about.html @@ -24,16 +24,16 @@

Goober {{ version }}

- A mobile client for pnut.io. + A mobile client for pnut.io.
-

made by Morgan McMillian (@thrrgilag).

+

made by Morgan McMillian (@thrrgilag).

Goober is free and open source software licensed under the Apache License 2.0.

-

+

http://www.apache.org/licenses/LICENSE-2.0

 

diff --git a/src/pages/about/about.ts b/src/pages/about/about.ts index c49ca45..f220dde 100644 --- a/src/pages/about/about.ts +++ b/src/pages/about/about.ts @@ -24,7 +24,7 @@ export class AboutPage { } browse(url) { - window.open(url, '_blank'); + window.open(url, '_system'); } } diff --git a/src/pages/stream/post-menu.ts b/src/pages/stream/post-menu.ts index a0326d0..c48bb5f 100644 --- a/src/pages/stream/post-menu.ts +++ b/src/pages/stream/post-menu.ts @@ -27,7 +27,7 @@ export class PostMenu { } browse() { - window.open('https://posts.pnut.io/' + this.navParams.data.post.id, '_blank'); + window.open('https://posts.pnut.io/' + this.navParams.data.post.id, '_system'); this.close(); } diff --git a/src/pages/stream/stream.ts b/src/pages/stream/stream.ts index 065b291..960a620 100644 --- a/src/pages/stream/stream.ts +++ b/src/pages/stream/stream.ts @@ -309,7 +309,7 @@ export class StreamPage { } showImage(url) { - window.open(url, '_blank'); + window.open(url, '_system'); } showProfile(user) { diff --git a/src/pipes/parser/parser.ts b/src/pipes/parser/parser.ts index 7cf0324..b4c68e5 100644 --- a/src/pipes/parser/parser.ts +++ b/src/pipes/parser/parser.ts @@ -17,7 +17,7 @@ export class ParserPipe implements PipeTransform { transform(value: string, ...args): SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl { let hregex = /href="([\S]+)"/g; // value = value.replace(hregex, "class=\"ex-link\" href="); - value = value.replace(hregex, "onClick=\"window.open('$1', '_blank', 'location=yes')\""); + value = value.replace(hregex, "onClick=\"window.open('$1', '_system', 'location=yes')\""); return this._sanitizer.bypassSecurityTrustHtml(value); } }