restore _system target for opening links

This commit is contained in:
Morgan McMillian 2018-11-16 17:32:59 -08:00
parent 257603ec95
commit e862382d38
5 changed files with 7 additions and 7 deletions

View file

@ -24,16 +24,16 @@
<ion-row center> <ion-row center>
<ion-col text-center> <ion-col text-center>
<h1>Goober {{ version }}</h1> <h1>Goober {{ version }}</h1>
A mobile client for <a href="https://pnut.io" target="_blank">pnut.io</a>. A mobile client for <a href="https://pnut.io" target="_system">pnut.io</a>.
</ion-col> </ion-col>
</ion-row> </ion-row>
<ion-row center> <ion-row center>
<ion-col text-center> <ion-col text-center>
<p>made by Morgan McMillian (<a href="https://pnut.io/@thrrgilag" target="_blank">@thrrgilag</a>).</p> <p>made by Morgan McMillian (<a href="https://pnut.io/@thrrgilag" target="_system">@thrrgilag</a>).</p>
<p>Goober is free and open source software licensed under the <p>Goober is free and open source software licensed under the
Apache License 2.0.</p> Apache License 2.0.</p>
<p><a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank"> <p><a href="http://www.apache.org/licenses/LICENSE-2.0" target="_system">
http://www.apache.org/licenses/LICENSE-2.0</a></p> http://www.apache.org/licenses/LICENSE-2.0</a></p>
<p>&nbsp;</p> <p>&nbsp;</p>
<p><button ion-button (click)="browse('https://gitlab.dreamfall.space/thrrgilag/Goober/wikis/home')">Project Site</button></p> <p><button ion-button (click)="browse('https://gitlab.dreamfall.space/thrrgilag/Goober/wikis/home')">Project Site</button></p>

View file

@ -24,7 +24,7 @@ export class AboutPage {
} }
browse(url) { browse(url) {
window.open(url, '_blank'); window.open(url, '_system');
} }
} }

View file

@ -27,7 +27,7 @@ export class PostMenu {
} }
browse() { 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(); this.close();
} }

View file

@ -309,7 +309,7 @@ export class StreamPage {
} }
showImage(url) { showImage(url) {
window.open(url, '_blank'); window.open(url, '_system');
} }
showProfile(user) { showProfile(user) {

View file

@ -17,7 +17,7 @@ export class ParserPipe implements PipeTransform {
transform(value: string, ...args): SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl { transform(value: string, ...args): SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl {
let hregex = /href="([\S]+)"/g; let hregex = /href="([\S]+)"/g;
// value = value.replace(hregex, "class=\"ex-link\" href="); // 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); return this._sanitizer.bypassSecurityTrustHtml(value);
} }
} }