diff options
| author | bobzel <zzzman@gmail.com> | 2025-03-06 16:17:47 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2025-03-06 16:17:47 -0500 |
| commit | 5ad858090f3006631062877d90120e3cc505fada (patch) | |
| tree | 9f87a8e1e7098a1025f6f4aac332dbc854db5be3 /src/client/views/PreviewCursor.tsx | |
| parent | 9c2a7c14fd9d0e44609aab30c6323583162009db (diff) | |
| parent | adaa107aac8558fa6f46e6ba1263c650c212d506 (diff) | |
Merge branch 'master' into aarav_edit
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( |
