mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Disable media context menus in IV.
This commit is contained in:
@@ -516,6 +516,7 @@ QByteArray Parser::block(
|
||||
const auto id = Number(photo.id);
|
||||
result = tag("a", {
|
||||
{ "href", href },
|
||||
{ "oncontextmenu", data.vurl() ? QByteArray() : "return false;" },
|
||||
{ "data-context", data.vurl() ? QByteArray() : "viewer-photo" + id },
|
||||
}, result) + caption(data.vcaption());
|
||||
return result;
|
||||
@@ -576,6 +577,7 @@ QByteArray Parser::block(
|
||||
const auto href = resource("video" + id);
|
||||
result = tag("a", {
|
||||
{ "href", href },
|
||||
{ "oncontextmenu", "return false;" },
|
||||
{ "data-context", "viewer-video" + id },
|
||||
}, result);
|
||||
}
|
||||
@@ -745,6 +747,7 @@ QByteArray Parser::block(const MTPDpageBlockAudio &data) {
|
||||
const auto src = documentFullUrl(audio);
|
||||
return tag("figure", tag("audio", {
|
||||
{ "src", src },
|
||||
{ "oncontextmenu", "return false;" },
|
||||
{ "controls", std::nullopt },
|
||||
}) + caption(data.vcaption()));
|
||||
}
|
||||
|
Reference in New Issue
Block a user