diff options
| author | A.J. Shulman <Shulman.aj@gmail.com> | 2025-02-24 16:10:29 -0500 |
|---|---|---|
| committer | A.J. Shulman <Shulman.aj@gmail.com> | 2025-02-24 16:10:29 -0500 |
| commit | 7b0bd66a0ad22b5a5cb17e76e811b59c6c7ca729 (patch) | |
| tree | 7ee37b74c8ba511ac59160f9b11f251861faab1d /src/client/views/PreviewCursor.tsx | |
| parent | a26c670b49a8631779869baf493135a59b92f523 (diff) | |
| parent | 383a8a2f017c12c578537d3cb3005e00be019bd7 (diff) | |
Merge branch 'master' into ajs-finalagent
Diffstat (limited to 'src/client/views/PreviewCursor.tsx')
| -rw-r--r-- | src/client/views/PreviewCursor.tsx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/client/views/PreviewCursor.tsx b/src/client/views/PreviewCursor.tsx index 7e597879d..eb4e75f74 100644 --- a/src/client/views/PreviewCursor.tsx +++ b/src/client/views/PreviewCursor.tsx @@ -46,8 +46,6 @@ export class PreviewCursor extends ObservableReactComponent<object> { this.Visible = false; }); - // tests for URL and makes web document - const re = /^https?:\/\//g; const plain = e.clipboardData.getData('text/plain'); if (plain && newPoint) { // tests for youtube and makes video document @@ -62,7 +60,7 @@ export class PreviewCursor extends ObservableReactComponent<object> { y: newPoint[1], }; this._slowLoadDocuments?.(plain.split('v=')[1].split('&')[0], options, generatedDocuments, '', undefined, this._addDocument ?? returnFalse).then(batch.end); - } else if (re.test(plain)) { + } else if ((/^https?:\/\//g).test(plain)) { // tests for URL and makes web document const url = plain; if (!url.startsWith(window.location.href)) { undoable( |
