1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-21 02:33:46 +00:00
This commit is contained in:
Oscar Hinton
2021-03-16 17:44:31 +01:00
committed by GitHub
parent 35ecbcc11a
commit 1ea8762eeb
22 changed files with 516 additions and 141 deletions

View File

@@ -1,4 +1,5 @@
import * as DuoWebSDK from 'duo_web_sdk';
import { getQsParam } from './common';
// tslint:disable-next-line
require('./duo.scss');
@@ -27,22 +28,6 @@ document.addEventListener('DOMContentLoaded', event => {
}
});
function getQsParam(name: string) {
const url = window.location.href;
name = name.replace(/[\[\]]/g, '\\$&');
const regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)');
const results = regex.exec(url);
if (!results) {
return null;
}
if (!results[2]) {
return '';
}
return decodeURIComponent(results[2].replace(/\+/g, ' '));
}
function invokeCSCode(data: string) {
try {
(window as any).invokeCSharpAction(data);