我现在正在photoswipe-ui-default.js
文件内部禁用共享按钮。但是,我想知道是否可以从该代码之外进行操作?
答案 0 :(得分:1)
好吧,我只是通过文档中列出的选项将其禁用:https://photoswipe.com/documentation/options.html
否则,您可以执行以下操作:
proctype Sender(chan in, out)
{ byte mt; /* message data */
bit at; /* alternation bit transmitted */
bit ar; /* alternation bit received */
FETCH; /* get a new message */
out!data(mt,at); /* send it */
do
::in?ack(ar) -> /* await response */
if
::(ar == at) -> /* correct send */
FETCH; /* get a new message */
at=1-at /* toggle bit */
::else -> /* there was a send error */
skip /* don’t fetch */
fi;
out!data(mt,at)
::in?error(ar) -> /* recv error */
out!data(mt,at)
od}