-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<h1>Register Protocol Handler</h1> | ||
|
||
<p class="handler-actions"> | ||
<button class="signup-button" mat-flat-button color="primary" (click)="registerHandler('web+ariton', 'ariton')">Enable Ariton Link Protocol</button> | ||
</p> | ||
|
||
<mat-card class="card-info"> | ||
<p class="handler-actions">If you click the X on the request or block it, the request will | ||
never be displayed again until you manually unblock. | ||
</p> | ||
<p class="handler-actions selectable">chrome://settings/content/handlers</p> | ||
<p class="handler-actions"> | ||
Copy the link manually and open it in your browser. | ||
<br> | ||
<!-- TODO: Make this link work cross-browsers. --> | ||
</p> | ||
</mat-card> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.card-info { | ||
padding: 1em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { HandlerComponent } from './handler.component'; | ||
|
||
describe('HandlerComponent', () => { | ||
let component: HandlerComponent; | ||
let fixture: ComponentFixture<HandlerComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [HandlerComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(HandlerComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Component } from '@angular/core'; | ||
import { MatButtonModule } from '@angular/material/button'; | ||
import { MatCardModule } from '@angular/material/card'; | ||
import { MatIconModule } from '@angular/material/icon'; | ||
|
||
@Component({ | ||
selector: 'app-handler', | ||
standalone: true, | ||
imports: [MatIconModule, MatCardModule, MatButtonModule], | ||
templateUrl: './handler.component.html', | ||
styleUrl: './handler.component.scss' | ||
}) | ||
export class HandlerComponent { | ||
|
||
registerHandler(protocol: string, parameter: string) { | ||
// navigator.registerProtocolHandler(protocol, `./index.html?${parameter}=%s`); | ||
navigator.registerProtocolHandler(protocol, `/index.html?${parameter}=%s`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters