logicr
V2EX  ›  Node.js

如何防止 Android 网页自动复制红包码自动复制到剪切板?

  •  
  •   logicr · Aug 20, 2018 · 5172 views
    This topic created in 3021 days ago, the information mentioned may be changed or developed.
    场景:我用 Fusion App 将网页做成客户端,但是在看视频的时候点击播放或者其他按钮就会触发自动复制红宝码的事件。
    问题:怎么用 jQuery 来阻止,播放那块是 iframe。
    2 replies  •  2018-08-20 23:24:01 +08:00
    8qwe24657913
    8qwe24657913
    Aug 20, 2018
    1
    同域 iframe 可以 hook Document.prototype.execCommand DataTransfer.prototype.setData Clipboard.prototype.write Clipboard.prototype.writeText,跨域 iframe 只能用 iframe sandbox 强行禁掉脚本执行,也许就无法播放了
    logicr
    logicr
    OP
    Aug 20, 2018
    2
    @8qwe24657913 谢谢,应该是跨域的吧,我能做的就是外部添加一点点 Query,我想问有没有可以屏蔽掉点击触发的捆绑的事件的方法,比如覆盖掉之类的。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2050 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 82ms · UTC 15:06 · PVG 23:06 · LAX 07:06 · JFK 10:06
    ♥ Do have faith in what you're doing.