如何在使用javascript或jquery按键5秒后触发f11效果?

时间:2017-04-28 19:16:40

标签: javascript jquery

如何在使用javascript或jquery按键5秒后触发f11效果?

1 个答案:

答案 0 :(得分:0)

不幸的是,只有在用户操作后立即使用全屏API(例如按下按钮)时才允许使用全屏API。我已经过测试,1秒的延迟是最高的,似乎可靠地工作。浏览器可能会拒绝任何更长的内容,而不是来自用户操作。

如果您发现它有用,请输入1秒延迟的代码:

git checkout stash@{n}^  # notice the "^". 

# Now you're in a detached head in the parent commit of the stash.
# It can be applied cleanly:
git stash apply stash@{n}

# Now save only the diffs you're interested in:
git stash -p

# remove the rest of the old stash
git checkout -- .  # be careful or you could remove unrelated changes

# go back to the branch where you want to apply the smaller stash
git checkout <my previous branch>

# apply the smaller stash
git stash pop