Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F9913112
report.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
699 B
Referenced Files
None
Subscribers
None
report.js
View Options
function
copyText
(
text
)
{
if
(
!
navigator
.
clipboard
||
!
window
.
isSecureContext
)
{
return
Promise
.
reject
(
new
Error
(
'Clipboard API is unavailable'
));
}
return
navigator
.
clipboard
.
writeText
(
text
);
}
document
.
addEventListener
(
'click'
,
event
=>
{
const
link
=
event
.
target
.
closest
(
'[data-copy-url]'
);
if
(
!
link
)
return
;
event
.
preventDefault
();
const
url
=
link
.
getAttribute
(
'data-copy-url'
);
if
(
!
url
)
return
;
copyText
(
url
)
.
then
(()
=>
{
const
original
=
link
.
textContent
;
link
.
textContent
=
'Copied URL to clipboard'
;
window
.
setTimeout
(()
=>
{
link
.
textContent
=
original
;
},
2000
);
})
.
catch
(()
=>
(
window
.
location
.
href
=
url
));
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Aug 1, 6:25 PM (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
603389
Default Alt Text
report.js (699 B)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment