是否可以从外部禁用共享按钮?

时间:2019-05-24 08:51:03

标签: javascript photoswipe

我现在正在photoswipe-ui-default.js文件内部禁用共享按钮。但是,我想知道是否可以从该代码之外进行操作?

1 个答案:

答案 0 :(得分:1)

好吧,我只是通过文档中列出的选项将其禁用:https://photoswipe.com/documentation/options.html

Image of documentation

否则,您可以执行以下操作:

  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}

来自:Hide all elements with class using plain Javascript