自定义TextMate刷新浏览器脚本
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了自定义TextMate刷新浏览器脚本相关的知识,希望对你有一定的参考价值。
refreshes Chrome + Safari without bringing them into focus. If Chrome is hidden, then no refresh occurs.
osascript >/dev/null <<EOL tell application "Safari" do javascript "if(window.location.hostname.indexOf('.local') != -1 || window.location.hostname.indexOf('.dev') || window.location.href.indexOf('file://') != -1) { window.location.reload(); }" in first document end tell EOL osascript > /dev/null <<'APPLESCRIPT' tell application "System Events" set isVisible to visible of process "Google Chrome" end tell tell application "Google Chrome" if isVisible then tell active tab of first window execute javascript "window.location.reload()" end tell end if end tell APPLESCRIPT exit 0
以上是关于自定义TextMate刷新浏览器脚本的主要内容,如果未能解决你的问题,请参考以下文章